Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit 9e10acd

Browse files
committed
add: button to add new reservation to series
Refs: TILA-3348
1 parent f0cf390 commit 9e10acd

16 files changed

Lines changed: 726 additions & 307 deletions

File tree

apps/admin-ui/gql/gql-types.ts

Lines changed: 143 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -7195,6 +7195,43 @@ export type SearchReservationUnitsQuery = {
71957195
} | null;
71967196
};
71977197

7198+
export type StaffAdjustReservationTimeMutationVariables = Exact<{
7199+
input: ReservationStaffAdjustTimeMutationInput;
7200+
}>;
7201+
7202+
export type StaffAdjustReservationTimeMutation = {
7203+
staffAdjustReservationTime?: {
7204+
pk?: number | null;
7205+
begin?: string | null;
7206+
end?: string | null;
7207+
state?: ReservationStateChoice | null;
7208+
} | null;
7209+
};
7210+
7211+
export type ChangeReservationTimeFragment = {
7212+
id: string;
7213+
pk?: number | null;
7214+
begin: string;
7215+
end: string;
7216+
type?: ReservationTypeChoice | null;
7217+
bufferTimeAfter: number;
7218+
bufferTimeBefore: number;
7219+
recurringReservation?: {
7220+
pk?: number | null;
7221+
id: string;
7222+
weekdays?: Array<number | null> | null;
7223+
beginDate?: string | null;
7224+
endDate?: string | null;
7225+
} | null;
7226+
reservationUnit: Array<{
7227+
id: string;
7228+
pk?: number | null;
7229+
bufferTimeBefore: number;
7230+
bufferTimeAfter: number;
7231+
reservationStartInterval: ReservationStartInterval;
7232+
}>;
7233+
};
7234+
71987235
export type ReservationUnitPricingFragment = {
71997236
pricings: Array<{
72007237
id: string;
@@ -7400,19 +7437,6 @@ export type ReservationsQuery = {
74007437
} | null;
74017438
};
74027439

7403-
export type StaffAdjustReservationTimeMutationVariables = Exact<{
7404-
input: ReservationStaffAdjustTimeMutationInput;
7405-
}>;
7406-
7407-
export type StaffAdjustReservationTimeMutation = {
7408-
staffAdjustReservationTime?: {
7409-
pk?: number | null;
7410-
begin?: string | null;
7411-
end?: string | null;
7412-
state?: ReservationStateChoice | null;
7413-
} | null;
7414-
};
7415-
74167440
export type ReservationApplicationLinkQueryVariables = Exact<{
74177441
id: Scalars["ID"]["input"];
74187442
}>;
@@ -7703,13 +7727,30 @@ export type RecurringReservationQuery = {
77037727
rejectionReason: RejectionReadinessChoice;
77047728
}>;
77057729
reservations: Array<{
7730+
state?: ReservationStateChoice | null;
77067731
id: string;
77077732
pk?: number | null;
77087733
begin: string;
77097734
end: string;
7710-
state?: ReservationStateChoice | null;
7735+
type?: ReservationTypeChoice | null;
7736+
bufferTimeAfter: number;
7737+
bufferTimeBefore: number;
77117738
paymentOrder: Array<{ id: string; status?: OrderStatus | null }>;
7712-
reservationUnit: Array<{ id: string; pk?: number | null }>;
7739+
reservationUnit: Array<{
7740+
id: string;
7741+
pk?: number | null;
7742+
bufferTimeBefore: number;
7743+
bufferTimeAfter: number;
7744+
reservationStartInterval: ReservationStartInterval;
7745+
unit?: { id: string; pk?: number | null } | null;
7746+
}>;
7747+
recurringReservation?: {
7748+
pk?: number | null;
7749+
id: string;
7750+
weekdays?: Array<number | null> | null;
7751+
beginDate?: string | null;
7752+
endDate?: string | null;
7753+
} | null;
77137754
}>;
77147755
} | null;
77157756
};
@@ -9318,6 +9359,31 @@ export const ReservationsInIntervalFragmentDoc = gql`
93189359
affectedReservationUnits
93199360
}
93209361
`;
9362+
export const ChangeReservationTimeFragmentDoc = gql`
9363+
fragment ChangeReservationTime on ReservationNode {
9364+
id
9365+
pk
9366+
begin
9367+
end
9368+
type
9369+
bufferTimeAfter
9370+
bufferTimeBefore
9371+
recurringReservation {
9372+
pk
9373+
id
9374+
weekdays
9375+
beginDate
9376+
endDate
9377+
}
9378+
reservationUnit {
9379+
id
9380+
pk
9381+
bufferTimeBefore
9382+
bufferTimeAfter
9383+
reservationStartInterval
9384+
}
9385+
}
9386+
`;
93219387
export const PricingFieldsFragmentDoc = gql`
93229388
fragment PricingFields on ReservationUnitPricingNode {
93239389
id
@@ -12497,6 +12563,62 @@ export type SearchReservationUnitsQueryResult = Apollo.QueryResult<
1249712563
SearchReservationUnitsQuery,
1249812564
SearchReservationUnitsQueryVariables
1249912565
>;
12566+
export const StaffAdjustReservationTimeDocument = gql`
12567+
mutation StaffAdjustReservationTime(
12568+
$input: ReservationStaffAdjustTimeMutationInput!
12569+
) {
12570+
staffAdjustReservationTime(input: $input) {
12571+
pk
12572+
begin
12573+
end
12574+
state
12575+
}
12576+
}
12577+
`;
12578+
export type StaffAdjustReservationTimeMutationFn = Apollo.MutationFunction<
12579+
StaffAdjustReservationTimeMutation,
12580+
StaffAdjustReservationTimeMutationVariables
12581+
>;
12582+
12583+
/**
12584+
* __useStaffAdjustReservationTimeMutation__
12585+
*
12586+
* To run a mutation, you first call `useStaffAdjustReservationTimeMutation` within a React component and pass it any options that fit your needs.
12587+
* When your component renders, `useStaffAdjustReservationTimeMutation` returns a tuple that includes:
12588+
* - A mutate function that you can call at any time to execute the mutation
12589+
* - An object with fields that represent the current status of the mutation's execution
12590+
*
12591+
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
12592+
*
12593+
* @example
12594+
* const [staffAdjustReservationTimeMutation, { data, loading, error }] = useStaffAdjustReservationTimeMutation({
12595+
* variables: {
12596+
* input: // value for 'input'
12597+
* },
12598+
* });
12599+
*/
12600+
export function useStaffAdjustReservationTimeMutation(
12601+
baseOptions?: Apollo.MutationHookOptions<
12602+
StaffAdjustReservationTimeMutation,
12603+
StaffAdjustReservationTimeMutationVariables
12604+
>
12605+
) {
12606+
const options = { ...defaultOptions, ...baseOptions };
12607+
return Apollo.useMutation<
12608+
StaffAdjustReservationTimeMutation,
12609+
StaffAdjustReservationTimeMutationVariables
12610+
>(StaffAdjustReservationTimeDocument, options);
12611+
}
12612+
export type StaffAdjustReservationTimeMutationHookResult = ReturnType<
12613+
typeof useStaffAdjustReservationTimeMutation
12614+
>;
12615+
export type StaffAdjustReservationTimeMutationResult =
12616+
Apollo.MutationResult<StaffAdjustReservationTimeMutation>;
12617+
export type StaffAdjustReservationTimeMutationOptions =
12618+
Apollo.BaseMutationOptions<
12619+
StaffAdjustReservationTimeMutation,
12620+
StaffAdjustReservationTimeMutationVariables
12621+
>;
1250012622
export const UpdateStaffReservationDocument = gql`
1250112623
mutation UpdateStaffReservation(
1250212624
$input: ReservationStaffModifyMutationInput!
@@ -12755,62 +12877,6 @@ export type ReservationsQueryResult = Apollo.QueryResult<
1275512877
ReservationsQuery,
1275612878
ReservationsQueryVariables
1275712879
>;
12758-
export const StaffAdjustReservationTimeDocument = gql`
12759-
mutation StaffAdjustReservationTime(
12760-
$input: ReservationStaffAdjustTimeMutationInput!
12761-
) {
12762-
staffAdjustReservationTime(input: $input) {
12763-
pk
12764-
begin
12765-
end
12766-
state
12767-
}
12768-
}
12769-
`;
12770-
export type StaffAdjustReservationTimeMutationFn = Apollo.MutationFunction<
12771-
StaffAdjustReservationTimeMutation,
12772-
StaffAdjustReservationTimeMutationVariables
12773-
>;
12774-
12775-
/**
12776-
* __useStaffAdjustReservationTimeMutation__
12777-
*
12778-
* To run a mutation, you first call `useStaffAdjustReservationTimeMutation` within a React component and pass it any options that fit your needs.
12779-
* When your component renders, `useStaffAdjustReservationTimeMutation` returns a tuple that includes:
12780-
* - A mutate function that you can call at any time to execute the mutation
12781-
* - An object with fields that represent the current status of the mutation's execution
12782-
*
12783-
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
12784-
*
12785-
* @example
12786-
* const [staffAdjustReservationTimeMutation, { data, loading, error }] = useStaffAdjustReservationTimeMutation({
12787-
* variables: {
12788-
* input: // value for 'input'
12789-
* },
12790-
* });
12791-
*/
12792-
export function useStaffAdjustReservationTimeMutation(
12793-
baseOptions?: Apollo.MutationHookOptions<
12794-
StaffAdjustReservationTimeMutation,
12795-
StaffAdjustReservationTimeMutationVariables
12796-
>
12797-
) {
12798-
const options = { ...defaultOptions, ...baseOptions };
12799-
return Apollo.useMutation<
12800-
StaffAdjustReservationTimeMutation,
12801-
StaffAdjustReservationTimeMutationVariables
12802-
>(StaffAdjustReservationTimeDocument, options);
12803-
}
12804-
export type StaffAdjustReservationTimeMutationHookResult = ReturnType<
12805-
typeof useStaffAdjustReservationTimeMutation
12806-
>;
12807-
export type StaffAdjustReservationTimeMutationResult =
12808-
Apollo.MutationResult<StaffAdjustReservationTimeMutation>;
12809-
export type StaffAdjustReservationTimeMutationOptions =
12810-
Apollo.BaseMutationOptions<
12811-
StaffAdjustReservationTimeMutation,
12812-
StaffAdjustReservationTimeMutationVariables
12813-
>;
1281412880
export const ReservationApplicationLinkDocument = gql`
1281512881
query ReservationApplicationLink($id: ID!) {
1281612882
recurringReservation(id: $id) {
@@ -13109,22 +13175,22 @@ export const RecurringReservationDocument = gql`
1310913175
rejectionReason
1311013176
}
1311113177
reservations {
13112-
id
13113-
pk
13114-
begin
13115-
end
13178+
...ChangeReservationTime
1311613179
state
1311713180
paymentOrder {
1311813181
id
1311913182
status
1312013183
}
1312113184
reservationUnit {
13122-
id
13123-
pk
13185+
unit {
13186+
id
13187+
pk
13188+
}
1312413189
}
1312513190
}
1312613191
}
1312713192
}
13193+
${ChangeReservationTimeFragmentDoc}
1312813194
`;
1312913195

1313013196
/**

0 commit comments

Comments
 (0)