fix: payload default config
This commit is contained in:
parent
845cbdb4e3
commit
20ec5e90b1
@ -20,6 +20,7 @@ import { StrikethroughFeatureClient as StrikethroughFeatureClient_e70f5e05f09f93
|
||||
import { UnderlineFeatureClient as UnderlineFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
|
||||
import { BoldFeatureClient as BoldFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
|
||||
import { ItalicFeatureClient as ItalicFeatureClient_e70f5e05f09f93e00b997edb1ef0c864 } from '@payloadcms/richtext-lexical/client'
|
||||
import { default as default_382980007b1adf7b8e8832707f1169fb } from '@/components/Logo/AdminLogo'
|
||||
|
||||
export const importMap = {
|
||||
"@payloadcms/richtext-lexical/rsc#RscEntryLexicalCell": RscEntryLexicalCell_44fe37237e0ebf4470c9990d8cb7b07e,
|
||||
@ -43,5 +44,6 @@ export const importMap = {
|
||||
"@payloadcms/richtext-lexical/client#StrikethroughFeatureClient": StrikethroughFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
|
||||
"@payloadcms/richtext-lexical/client#UnderlineFeatureClient": UnderlineFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
|
||||
"@payloadcms/richtext-lexical/client#BoldFeatureClient": BoldFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
|
||||
"@payloadcms/richtext-lexical/client#ItalicFeatureClient": ItalicFeatureClient_e70f5e05f09f93e00b997edb1ef0c864
|
||||
"@payloadcms/richtext-lexical/client#ItalicFeatureClient": ItalicFeatureClient_e70f5e05f09f93e00b997edb1ef0c864,
|
||||
"/components/Logo/AdminLogo#default": default_382980007b1adf7b8e8832707f1169fb
|
||||
}
|
||||
|
@ -28,4 +28,7 @@ export const Blogs: CollectionConfig = {
|
||||
editor: lexicalEditor({}),
|
||||
},
|
||||
],
|
||||
admin: {
|
||||
hideAPIURL: true,
|
||||
},
|
||||
};
|
||||
|
@ -13,4 +13,7 @@ export const Media: CollectionConfig = {
|
||||
},
|
||||
],
|
||||
upload: true,
|
||||
admin: {
|
||||
hideAPIURL: true,
|
||||
},
|
||||
};
|
||||
|
@ -4,6 +4,7 @@ export const Users: CollectionConfig = {
|
||||
slug: "users",
|
||||
admin: {
|
||||
useAsTitle: "email",
|
||||
hideAPIURL: true,
|
||||
},
|
||||
auth: true,
|
||||
fields: [
|
||||
|
@ -12,5 +12,6 @@ export const Interests: CollectionConfig = {
|
||||
admin: {
|
||||
group: "Consultation",
|
||||
description: "This is the procedure interests that can be selected when request a consultation",
|
||||
hideAPIURL: true,
|
||||
},
|
||||
};
|
||||
|
@ -45,11 +45,13 @@ export const ConsultationDateTime: GlobalConfig = {
|
||||
},
|
||||
{
|
||||
name: "start",
|
||||
label: "Start Time",
|
||||
type: "text",
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
name: "end",
|
||||
label: "End Time",
|
||||
type: "text",
|
||||
required: true,
|
||||
},
|
||||
@ -59,5 +61,6 @@ export const ConsultationDateTime: GlobalConfig = {
|
||||
admin: {
|
||||
group: "Consultation",
|
||||
description: "Date and time available for consultation",
|
||||
hideAPIURL: true,
|
||||
},
|
||||
};
|
||||
|
13
src/components/Logo/AdminLogo.tsx
Normal file
13
src/components/Logo/AdminLogo.tsx
Normal file
@ -0,0 +1,13 @@
|
||||
import Image from "next/image";
|
||||
|
||||
export default function AdminLogo() {
|
||||
return (
|
||||
<Image
|
||||
src="/assets/images/demo-slick/logo-dark.webp"
|
||||
alt="Cochise Oncology Logo"
|
||||
width={205}
|
||||
height={134}
|
||||
className="light-mode-logo"
|
||||
/>
|
||||
);
|
||||
}
|
@ -4,14 +4,14 @@ import { payloadCloudPlugin } from "@payloadcms/payload-cloud";
|
||||
import { s3Storage } from "@payloadcms/storage-s3";
|
||||
import path from "path";
|
||||
import { buildConfig } from "payload";
|
||||
import { fileURLToPath } from "url";
|
||||
import sharp from "sharp";
|
||||
import { fileURLToPath } from "url";
|
||||
|
||||
import { Users } from "./collections/Users";
|
||||
import { Media } from "./collections/Media";
|
||||
import { Blogs } from "./collections/Blogs";
|
||||
import { Interests } from "./collections/consultations/Interests";
|
||||
import { ConsultationDateTime } from "./collections/consultations/consultation-datetime";
|
||||
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";
|
||||
|
||||
const filename = fileURLToPath(import.meta.url);
|
||||
const dirname = path.dirname(filename);
|
||||
@ -20,8 +20,22 @@ export default buildConfig({
|
||||
admin: {
|
||||
user: Users.slug,
|
||||
importMap: {
|
||||
baseDir: path.resolve(dirname),
|
||||
// baseDir: path.resolve(dirname),
|
||||
baseDir: "@",
|
||||
},
|
||||
meta: {
|
||||
titleSuffix: "- Admin - Cochise Oncology",
|
||||
description: "Cochise Oncology",
|
||||
icons: [{ url: "/assets/images/demo-slick/logo-dark.webp" }],
|
||||
},
|
||||
components: {
|
||||
graphics: {
|
||||
Logo: {
|
||||
path: "/components/Logo/AdminLogo",
|
||||
},
|
||||
},
|
||||
},
|
||||
theme: "dark",
|
||||
},
|
||||
collections: [Users, Media, Blogs, Interests],
|
||||
globals: [ConsultationDateTime],
|
||||
|
Loading…
x
Reference in New Issue
Block a user