Skip to content

Commit

Permalink
Merge pull request #68 from borisgrigorov/fixes
Browse files Browse the repository at this point in the history
Make Minimal Draft & Broker fields optional.
  • Loading branch information
borisgrigorov authored Aug 13, 2024
2 parents 06f0535 + 8d55a7a commit 3fde280
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 17 deletions.
4 changes: 2 additions & 2 deletions admin/src/payload/collections/shared/YachtAndCharterFields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const yachtsAndCharterCommonFields = (type: 'charter' | 'yacht'): Field[]
},
name: 'broker',
type: 'relationship',
required: true,
required: false,
relationTo: 'users',
hasMany: false,
},
Expand Down Expand Up @@ -193,7 +193,7 @@ export const yachtsAndCharterCommonFields = (type: 'charter' | 'yacht'): Field[]
},
name: 'minDraft',
type: 'number',
required: true,
required: false,
},
{
label: {
Expand Down
24 changes: 15 additions & 9 deletions admin/src/payload/generated-schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -3946,7 +3946,7 @@ type Yacht {
price: Float!
LOA: Float!
beam: Float!
broker(locale: LocaleInputType, fallbackLocale: FallbackLocaleInputType): User!
broker(locale: LocaleInputType, fallbackLocale: FallbackLocaleInputType): User
builder: String!
category: String
city: String
Expand All @@ -3958,7 +3958,7 @@ type Yacht {
state: String
material: String
maxDraft: Float!
minDraft: Float!
minDraft: Float
region: String
rooms: Float!
sleeps: Float!
Expand Down Expand Up @@ -4810,6 +4810,7 @@ input Yacht_broker_operator {
in: [JSON]
not_in: [JSON]
all: [JSON]
exists: Boolean
}

input Yacht_builder_operator {
Expand Down Expand Up @@ -4922,6 +4923,7 @@ input Yacht_minDraft_operator {
greater_than: Float
less_than_equal: Float
less_than: Float
exists: Boolean
}

input Yacht_region_operator {
Expand Down Expand Up @@ -6267,7 +6269,7 @@ type Charter {
price: Charter_Price
LOA: Float!
beam: Float!
broker(locale: LocaleInputType, fallbackLocale: FallbackLocaleInputType): User!
broker(locale: LocaleInputType, fallbackLocale: FallbackLocaleInputType): User
builder: String!
category: String
city: String
Expand All @@ -6279,7 +6281,7 @@ type Charter {
state: String
material: String
maxDraft: Float!
minDraft: Float!
minDraft: Float
region: String
rooms: Float!
sleeps: Float!
Expand Down Expand Up @@ -7234,6 +7236,7 @@ input Charter_broker_operator {
in: [JSON]
not_in: [JSON]
all: [JSON]
exists: Boolean
}

input Charter_builder_operator {
Expand Down Expand Up @@ -7346,6 +7349,7 @@ input Charter_minDraft_operator {
greater_than: Float
less_than_equal: Float
less_than: Float
exists: Boolean
}

input Charter_region_operator {
Expand Down Expand Up @@ -13928,7 +13932,7 @@ type NewConstruction {
price: Float!
LOA: Float!
beam: Float!
broker(locale: LocaleInputType, fallbackLocale: FallbackLocaleInputType): User!
broker(locale: LocaleInputType, fallbackLocale: FallbackLocaleInputType): User
builder: String!
category: String
city: String
Expand All @@ -13940,7 +13944,7 @@ type NewConstruction {
state: String
material: String
maxDraft: Float!
minDraft: Float!
minDraft: Float
region: String
rooms: Float!
sleeps: Float!
Expand Down Expand Up @@ -14803,6 +14807,7 @@ input NewConstruction_broker_operator {
in: [JSON]
not_in: [JSON]
all: [JSON]
exists: Boolean
}

input NewConstruction_builder_operator {
Expand Down Expand Up @@ -14915,6 +14920,7 @@ input NewConstruction_minDraft_operator {
greater_than: Float
less_than_equal: Float
less_than: Float
exists: Boolean
}

input NewConstruction_region_operator {
Expand Down Expand Up @@ -28274,7 +28280,7 @@ input mutationYachtInput {
state: String
material: String
maxDraft: Float!
minDraft: Float!
minDraft: Float
region: String
rooms: Float!
sleeps: Float!
Expand Down Expand Up @@ -28430,7 +28436,7 @@ input mutationCharterInput {
state: String
material: String
maxDraft: Float!
minDraft: Float!
minDraft: Float
region: String
rooms: Float!
sleeps: Float!
Expand Down Expand Up @@ -28801,7 +28807,7 @@ input mutationNewConstructionInput {
state: String
material: String
maxDraft: Float!
minDraft: Float!
minDraft: Float
region: String
rooms: Float!
sleeps: Float!
Expand Down
12 changes: 6 additions & 6 deletions admin/src/payload/payload-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ export interface Yacht {
price: number;
LOA: number;
beam: number;
broker: string | User;
broker?: (string | null) | User;
builder: string;
category?: string | null;
city?: string | null;
Expand All @@ -588,7 +588,7 @@ export interface Yacht {
state?: string | null;
material: string;
maxDraft: number;
minDraft: number;
minDraft?: number | null;
region?: string | null;
rooms: number;
sleeps: number;
Expand Down Expand Up @@ -651,7 +651,7 @@ export interface Charter {
};
LOA: number;
beam: number;
broker: string | User;
broker?: (string | null) | User;
builder: string;
category?: string | null;
city?: string | null;
Expand All @@ -663,7 +663,7 @@ export interface Charter {
state?: string | null;
material: string;
maxDraft: number;
minDraft: number;
minDraft?: number | null;
region?: string | null;
rooms: number;
sleeps: number;
Expand Down Expand Up @@ -902,7 +902,7 @@ export interface NewConstruction {
price: number;
LOA: number;
beam: number;
broker: string | User;
broker?: (string | null) | User;
builder: string;
category?: string | null;
city?: string | null;
Expand All @@ -914,7 +914,7 @@ export interface NewConstruction {
state?: string | null;
material: string;
maxDraft: number;
minDraft: number;
minDraft?: number | null;
region?: string | null;
rooms: number;
sleeps: number;
Expand Down

0 comments on commit 3fde280

Please sign in to comment.