84 lines
2.3 KiB
TypeScript
84 lines
2.3 KiB
TypeScript
import { format, parseISO } from 'date-fns'
|
|
import { TiPuzzleOutline } from 'react-icons/ti'
|
|
import { defineField, defineType } from 'sanity'
|
|
|
|
import weddingpost from './weddingpost'
|
|
import weddingPackage from './weddingPackage'
|
|
import gallery from 'schemas/gallery'
|
|
|
|
export default {
|
|
name: 'WeddingSection',
|
|
title: 'Wedding Page',
|
|
icon: TiPuzzleOutline,
|
|
type: 'document',
|
|
fields: [
|
|
{
|
|
name: 'title',
|
|
title: 'Title Page',
|
|
description: 'Judul halaman',
|
|
type: 'string',
|
|
validation: (rule) => rule.required(),
|
|
},
|
|
{
|
|
name: 'subtitle',
|
|
title: 'Sub Title Page',
|
|
description: 'Sub judul halaman',
|
|
type: 'string',
|
|
validation: (rule) => rule.required(),
|
|
},
|
|
{
|
|
name: 'coverImage',
|
|
title: 'Image',
|
|
description: 'Image untuk cover',
|
|
type: 'image',
|
|
options: {
|
|
hotspot: true,
|
|
},
|
|
},
|
|
{
|
|
name: 'descriptionTitle',
|
|
title: 'Description Title',
|
|
description: 'Judul deskripsi',
|
|
type: 'string',
|
|
validation: (rule) => rule.required(),
|
|
},
|
|
defineField({
|
|
name: 'content',
|
|
title: 'Description',
|
|
description: 'kontent deskripsi',
|
|
type: 'array',
|
|
of: [{ type: 'block' }],
|
|
}),
|
|
{
|
|
name: 'Wedding',
|
|
title: 'Wedding Gallery',
|
|
description: 'Tambahkan gallery wedding',
|
|
type: 'array',
|
|
of: [
|
|
{
|
|
type: 'reference',
|
|
to: { type: gallery.name },
|
|
},
|
|
],
|
|
},
|
|
defineField({
|
|
title: 'Pixieset URL',
|
|
name: 'pixiesetURL',
|
|
type: 'url',
|
|
description: 'Alamat album di Pixieset',
|
|
}),
|
|
{
|
|
name: 'Weddingpackage',
|
|
title: 'Wedding Package',
|
|
description: 'Daftar paket wedding',
|
|
type: 'array',
|
|
of: [
|
|
{
|
|
type: 'reference',
|
|
to: { type: weddingPackage.name },
|
|
},
|
|
],
|
|
},
|
|
],
|
|
}
|