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;
|
||||
media: Media;
|
||||
blogs: Blog;
|
||||
interests: Interest;
|
||||
forms: Form;
|
||||
'form-submissions': FormSubmission;
|
||||
'payload-locked-documents': PayloadLockedDocument;
|
||||
@ -26,7 +25,6 @@ export interface Config {
|
||||
users: UsersSelect<false> | UsersSelect<true>;
|
||||
media: MediaSelect<false> | MediaSelect<true>;
|
||||
blogs: BlogsSelect<false> | BlogsSelect<true>;
|
||||
interests: InterestsSelect<false> | InterestsSelect<true>;
|
||||
forms: FormsSelect<false> | FormsSelect<true>;
|
||||
'form-submissions': FormSubmissionsSelect<false> | FormSubmissionsSelect<true>;
|
||||
'payload-locked-documents': PayloadLockedDocumentsSelect<false> | PayloadLockedDocumentsSelect<true>;
|
||||
@ -36,12 +34,8 @@ export interface Config {
|
||||
db: {
|
||||
defaultIDType: number;
|
||||
};
|
||||
globals: {
|
||||
'consultation-datetime': ConsultationDatetime;
|
||||
};
|
||||
globalsSelect: {
|
||||
'consultation-datetime': ConsultationDatetimeSelect<false> | ConsultationDatetimeSelect<true>;
|
||||
};
|
||||
globals: {};
|
||||
globalsSelect: {};
|
||||
locale: null;
|
||||
user: User & {
|
||||
collection: 'users';
|
||||
@ -133,18 +127,6 @@ export interface Blog {
|
||||
updatedAt: 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
|
||||
* via the `definition` "forms".
|
||||
@ -334,10 +316,6 @@ export interface PayloadLockedDocument {
|
||||
relationTo: 'blogs';
|
||||
value: number | Blog;
|
||||
} | null)
|
||||
| ({
|
||||
relationTo: 'interests';
|
||||
value: number | Interest;
|
||||
} | null)
|
||||
| ({
|
||||
relationTo: 'forms';
|
||||
value: number | Form;
|
||||
@ -434,15 +412,6 @@ export interface BlogsSelect<T extends boolean = true> {
|
||||
updatedAt?: 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
|
||||
* via the `definition` "forms_select".
|
||||
@ -616,60 +585,6 @@ export interface PayloadMigrationsSelect<T extends boolean = true> {
|
||||
updatedAt?: 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
|
||||
* via the `definition` "auth".
|
||||
|
@ -1,8 +1,8 @@
|
||||
// storage-adapter-import-placeholder
|
||||
import { postgresAdapter } from "@payloadcms/db-postgres";
|
||||
import { payloadCloudPlugin } from "@payloadcms/payload-cloud";
|
||||
import { s3Storage } from "@payloadcms/storage-s3";
|
||||
import { formBuilderPlugin } from "@payloadcms/plugin-form-builder";
|
||||
import { s3Storage } from "@payloadcms/storage-s3";
|
||||
import path from "path";
|
||||
import { buildConfig } from "payload";
|
||||
import sharp from "sharp";
|
||||
@ -11,8 +11,6 @@ import { fileURLToPath } from "url";
|
||||
import { Blogs } from "@/collections/Blogs";
|
||||
import { Media } from "@/collections/Media";
|
||||
import { Users } from "@/collections/Users";
|
||||
import { Interests } from "@/collections/consultations/Interests";
|
||||
import { ConsultationDateTime } from "@/collections/consultations/consultation-datetime";
|
||||
import {
|
||||
BoldFeature,
|
||||
FixedToolbarFeature,
|
||||
@ -47,8 +45,7 @@ export default buildConfig({
|
||||
},
|
||||
theme: "dark",
|
||||
},
|
||||
collections: [Users, Media, Blogs, Interests],
|
||||
globals: [ConsultationDateTime],
|
||||
collections: [Users, Media, Blogs],
|
||||
secret: process.env.PAYLOAD_SECRET || "",
|
||||
typescript: {
|
||||
outputFile: path.resolve(dirname, "payload-types.ts"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user