fix: remove unused payload collections
This commit is contained in:
parent
147f7242aa
commit
63d99a36dc
@ -1,17 +0,0 @@
|
|||||||
import type { CollectionConfig } from "payload";
|
|
||||||
|
|
||||||
export const Interests: CollectionConfig = {
|
|
||||||
slug: "interests",
|
|
||||||
fields: [
|
|
||||||
{
|
|
||||||
name: "interest",
|
|
||||||
type: "text",
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
admin: {
|
|
||||||
group: "Consultation",
|
|
||||||
description: "This is the procedure interests that can be selected when request a consultation",
|
|
||||||
hideAPIURL: true,
|
|
||||||
},
|
|
||||||
};
|
|
@ -1,66 +0,0 @@
|
|||||||
import type { GlobalConfig } from "payload";
|
|
||||||
|
|
||||||
export const ConsultationDateTime: GlobalConfig = {
|
|
||||||
slug: "consultation-datetime",
|
|
||||||
label: "Consultation Date & Time",
|
|
||||||
fields: [
|
|
||||||
{
|
|
||||||
name: "day",
|
|
||||||
type: "group",
|
|
||||||
fields: [
|
|
||||||
{
|
|
||||||
type: "checkbox",
|
|
||||||
name: "monday",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: "checkbox",
|
|
||||||
name: "tuesday",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: "checkbox",
|
|
||||||
name: "wednesday",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: "checkbox",
|
|
||||||
name: "thursday",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: "checkbox",
|
|
||||||
name: "friday",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: "checkbox",
|
|
||||||
name: "saturday",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "time",
|
|
||||||
type: "array",
|
|
||||||
fields: [
|
|
||||||
{
|
|
||||||
name: "name",
|
|
||||||
type: "text",
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "start",
|
|
||||||
label: "Start Time",
|
|
||||||
type: "text",
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "end",
|
|
||||||
label: "End Time",
|
|
||||||
type: "text",
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
admin: {
|
|
||||||
group: "Consultation",
|
|
||||||
description: "Date and time available for consultation",
|
|
||||||
hideAPIURL: true,
|
|
||||||
},
|
|
||||||
};
|
|
@ -14,7 +14,6 @@ export interface Config {
|
|||||||
users: User;
|
users: User;
|
||||||
media: Media;
|
media: Media;
|
||||||
blogs: Blog;
|
blogs: Blog;
|
||||||
interests: Interest;
|
|
||||||
forms: Form;
|
forms: Form;
|
||||||
'form-submissions': FormSubmission;
|
'form-submissions': FormSubmission;
|
||||||
'payload-locked-documents': PayloadLockedDocument;
|
'payload-locked-documents': PayloadLockedDocument;
|
||||||
@ -26,7 +25,6 @@ export interface Config {
|
|||||||
users: UsersSelect<false> | UsersSelect<true>;
|
users: UsersSelect<false> | UsersSelect<true>;
|
||||||
media: MediaSelect<false> | MediaSelect<true>;
|
media: MediaSelect<false> | MediaSelect<true>;
|
||||||
blogs: BlogsSelect<false> | BlogsSelect<true>;
|
blogs: BlogsSelect<false> | BlogsSelect<true>;
|
||||||
interests: InterestsSelect<false> | InterestsSelect<true>;
|
|
||||||
forms: FormsSelect<false> | FormsSelect<true>;
|
forms: FormsSelect<false> | FormsSelect<true>;
|
||||||
'form-submissions': FormSubmissionsSelect<false> | FormSubmissionsSelect<true>;
|
'form-submissions': FormSubmissionsSelect<false> | FormSubmissionsSelect<true>;
|
||||||
'payload-locked-documents': PayloadLockedDocumentsSelect<false> | PayloadLockedDocumentsSelect<true>;
|
'payload-locked-documents': PayloadLockedDocumentsSelect<false> | PayloadLockedDocumentsSelect<true>;
|
||||||
@ -36,12 +34,8 @@ export interface Config {
|
|||||||
db: {
|
db: {
|
||||||
defaultIDType: number;
|
defaultIDType: number;
|
||||||
};
|
};
|
||||||
globals: {
|
globals: {};
|
||||||
'consultation-datetime': ConsultationDatetime;
|
globalsSelect: {};
|
||||||
};
|
|
||||||
globalsSelect: {
|
|
||||||
'consultation-datetime': ConsultationDatetimeSelect<false> | ConsultationDatetimeSelect<true>;
|
|
||||||
};
|
|
||||||
locale: null;
|
locale: null;
|
||||||
user: User & {
|
user: User & {
|
||||||
collection: 'users';
|
collection: 'users';
|
||||||
@ -133,18 +127,6 @@ export interface Blog {
|
|||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* This is the procedure interests that can be selected when request a consultation
|
|
||||||
*
|
|
||||||
* This interface was referenced by `Config`'s JSON-Schema
|
|
||||||
* via the `definition` "interests".
|
|
||||||
*/
|
|
||||||
export interface Interest {
|
|
||||||
id: number;
|
|
||||||
interest: string;
|
|
||||||
updatedAt: string;
|
|
||||||
createdAt: string;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* This interface was referenced by `Config`'s JSON-Schema
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
* via the `definition` "forms".
|
* via the `definition` "forms".
|
||||||
@ -334,10 +316,6 @@ export interface PayloadLockedDocument {
|
|||||||
relationTo: 'blogs';
|
relationTo: 'blogs';
|
||||||
value: number | Blog;
|
value: number | Blog;
|
||||||
} | null)
|
} | null)
|
||||||
| ({
|
|
||||||
relationTo: 'interests';
|
|
||||||
value: number | Interest;
|
|
||||||
} | null)
|
|
||||||
| ({
|
| ({
|
||||||
relationTo: 'forms';
|
relationTo: 'forms';
|
||||||
value: number | Form;
|
value: number | Form;
|
||||||
@ -434,15 +412,6 @@ export interface BlogsSelect<T extends boolean = true> {
|
|||||||
updatedAt?: T;
|
updatedAt?: T;
|
||||||
createdAt?: T;
|
createdAt?: T;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* This interface was referenced by `Config`'s JSON-Schema
|
|
||||||
* via the `definition` "interests_select".
|
|
||||||
*/
|
|
||||||
export interface InterestsSelect<T extends boolean = true> {
|
|
||||||
interest?: T;
|
|
||||||
updatedAt?: T;
|
|
||||||
createdAt?: T;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* This interface was referenced by `Config`'s JSON-Schema
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
* via the `definition` "forms_select".
|
* via the `definition` "forms_select".
|
||||||
@ -616,60 +585,6 @@ export interface PayloadMigrationsSelect<T extends boolean = true> {
|
|||||||
updatedAt?: T;
|
updatedAt?: T;
|
||||||
createdAt?: T;
|
createdAt?: T;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* Date and time available for consultation
|
|
||||||
*
|
|
||||||
* This interface was referenced by `Config`'s JSON-Schema
|
|
||||||
* via the `definition` "consultation-datetime".
|
|
||||||
*/
|
|
||||||
export interface ConsultationDatetime {
|
|
||||||
id: number;
|
|
||||||
day?: {
|
|
||||||
monday?: boolean | null;
|
|
||||||
tuesday?: boolean | null;
|
|
||||||
wednesday?: boolean | null;
|
|
||||||
thursday?: boolean | null;
|
|
||||||
friday?: boolean | null;
|
|
||||||
saturday?: boolean | null;
|
|
||||||
};
|
|
||||||
time?:
|
|
||||||
| {
|
|
||||||
name: string;
|
|
||||||
start: string;
|
|
||||||
end: string;
|
|
||||||
id?: string | null;
|
|
||||||
}[]
|
|
||||||
| null;
|
|
||||||
updatedAt?: string | null;
|
|
||||||
createdAt?: string | null;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* This interface was referenced by `Config`'s JSON-Schema
|
|
||||||
* via the `definition` "consultation-datetime_select".
|
|
||||||
*/
|
|
||||||
export interface ConsultationDatetimeSelect<T extends boolean = true> {
|
|
||||||
day?:
|
|
||||||
| T
|
|
||||||
| {
|
|
||||||
monday?: T;
|
|
||||||
tuesday?: T;
|
|
||||||
wednesday?: T;
|
|
||||||
thursday?: T;
|
|
||||||
friday?: T;
|
|
||||||
saturday?: T;
|
|
||||||
};
|
|
||||||
time?:
|
|
||||||
| T
|
|
||||||
| {
|
|
||||||
name?: T;
|
|
||||||
start?: T;
|
|
||||||
end?: T;
|
|
||||||
id?: T;
|
|
||||||
};
|
|
||||||
updatedAt?: T;
|
|
||||||
createdAt?: T;
|
|
||||||
globalType?: T;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* This interface was referenced by `Config`'s JSON-Schema
|
* This interface was referenced by `Config`'s JSON-Schema
|
||||||
* via the `definition` "auth".
|
* via the `definition` "auth".
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
// storage-adapter-import-placeholder
|
// storage-adapter-import-placeholder
|
||||||
import { postgresAdapter } from "@payloadcms/db-postgres";
|
import { postgresAdapter } from "@payloadcms/db-postgres";
|
||||||
import { payloadCloudPlugin } from "@payloadcms/payload-cloud";
|
import { payloadCloudPlugin } from "@payloadcms/payload-cloud";
|
||||||
import { s3Storage } from "@payloadcms/storage-s3";
|
|
||||||
import { formBuilderPlugin } from "@payloadcms/plugin-form-builder";
|
import { formBuilderPlugin } from "@payloadcms/plugin-form-builder";
|
||||||
|
import { s3Storage } from "@payloadcms/storage-s3";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { buildConfig } from "payload";
|
import { buildConfig } from "payload";
|
||||||
import sharp from "sharp";
|
import sharp from "sharp";
|
||||||
@ -11,8 +11,6 @@ import { fileURLToPath } from "url";
|
|||||||
import { Blogs } from "@/collections/Blogs";
|
import { Blogs } from "@/collections/Blogs";
|
||||||
import { Media } from "@/collections/Media";
|
import { Media } from "@/collections/Media";
|
||||||
import { Users } from "@/collections/Users";
|
import { Users } from "@/collections/Users";
|
||||||
import { Interests } from "@/collections/consultations/Interests";
|
|
||||||
import { ConsultationDateTime } from "@/collections/consultations/consultation-datetime";
|
|
||||||
import {
|
import {
|
||||||
BoldFeature,
|
BoldFeature,
|
||||||
FixedToolbarFeature,
|
FixedToolbarFeature,
|
||||||
@ -47,8 +45,7 @@ export default buildConfig({
|
|||||||
},
|
},
|
||||||
theme: "dark",
|
theme: "dark",
|
||||||
},
|
},
|
||||||
collections: [Users, Media, Blogs, Interests],
|
collections: [Users, Media, Blogs],
|
||||||
globals: [ConsultationDateTime],
|
|
||||||
secret: process.env.PAYLOAD_SECRET || "",
|
secret: process.env.PAYLOAD_SECRET || "",
|
||||||
typescript: {
|
typescript: {
|
||||||
outputFile: path.resolve(dirname, "payload-types.ts"),
|
outputFile: path.resolve(dirname, "payload-types.ts"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user