Skip to content

Commit

Permalink
Merge branch 'master' into 722-backend-add-booking-history-crud-service
Browse files Browse the repository at this point in the history
  • Loading branch information
choden-dev authored Aug 3, 2024
2 parents 3431de7 + 0f16f01 commit f4f6363
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 1 deletion.
9 changes: 9 additions & 0 deletions client/sanity.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ export default defineConfig({
S.document().schemaType("home-page").documentId("home-page")
),

S.listItem()
.title("Lodge Information")
.id("lodge-information")
.child(
S.document()
.schemaType("lodge-information")
.documentId("lodge-information")
),

// Regular document types
S.documentTypeListItem("about-item").title("About Item"),
S.documentTypeListItem("contact-detail").title("Contact Detail")
Expand Down
3 changes: 2 additions & 1 deletion client/sanity/schema.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { AboutItemSchema } from "@/models/sanity/AboutItem/Schema"
import { ContactDetailSchema } from "@/models/sanity/ContactDetail/Schema"
import { HomePageSchema } from "@/models/sanity/HomePage/Schema"
import { LodgeInfoSchema } from "@/models/sanity/LodgeInfo/Schema"
import { type SchemaTypeDefinition } from "sanity"

export const schema: { types: SchemaTypeDefinition[] } = {
types: [AboutItemSchema, HomePageSchema, ContactDetailSchema]
types: [AboutItemSchema, HomePageSchema, ContactDetailSchema, LodgeInfoSchema]
}
22 changes: 22 additions & 0 deletions client/src/models/sanity/LodgeInfo/Schema.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { SchemaTypeDefinition, defineField } from "sanity"

export const LodgeInfoSchema: SchemaTypeDefinition = {
name: "lodge-information",
title: "Lodge Information",
description: "What to display to the user before they enter the booking view",
type: "document",
fields: [
defineField({
name: "information",
description: "An overview of what the user gets out of booking the lodge",
type: "array",
of: [{ type: "block" }]
}),
defineField({
name: "images",
description: "Images used to promote the lodge",
type: "array",
of: [{ type: "image" }]
})
]
}
2 changes: 2 additions & 0 deletions client/src/models/sanity/LodgeInfo/Utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export const LODGE_INFORMATION_GROQ_QUERY =
`[_type == "lodge-information"]` as const

0 comments on commit f4f6363

Please sign in to comment.