Skip to content

Commit

Permalink
feat: add receipt code to admin
Browse files Browse the repository at this point in the history
  • Loading branch information
GravendeelJochem committed Dec 13, 2024
1 parent 98f30e8 commit fdc08cd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
createPackageTypeField,
createSameDayDeliveryField,
createSignatureField,
createReceiptCodeField,
} from './fields';
import {ALL_FIELDS, FIELD_CARRIER} from './field';

Expand Down Expand Up @@ -70,7 +71,7 @@ export const createShipmentOptionsForm = (orders?: OneOrMore<Plugin.ModelPdkOrde
createLargeFormatField(refs),
createHideSenderField(refs),
createSameDayDeliveryField(refs),

createReceiptCodeField(refs),
createInsuranceField(refs),
],
});
Expand Down
4 changes: 4 additions & 0 deletions apps/admin/src/forms/shipmentOptions/field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const PACKAGE_TYPE = 'packageType' satisfies keyof Shipment.ModelDelivery

export const AGE_CHECK = 'ageCheck' satisfies keyof Shipment.ModelShipmentOptions;

export const RECEIPT_CODE = 'receiptCode' satisfies keyof Shipment.ModelShipmentOptions;
export const DIRECT_RETURN = 'return' satisfies keyof Shipment.ModelShipmentOptions;

export const HIDE_SENDER = 'hideSender' satisfies keyof Shipment.ModelShipmentOptions;
Expand Down Expand Up @@ -64,6 +65,8 @@ export const FIELD_INSURANCE: FieldName = `${SHIPMENT_OPTIONS_PREFIX}.${INSURANC

export const FIELD_MANUAL_WEIGHT: FieldName = `${PHYSICAL_PROPERTIES_PREFIX}.${MANUAL_WEIGHT}`;

export const FIELD_RECEIPT_CODE: FieldName = `${SHIPMENT_OPTIONS_PREFIX}.${RECEIPT_CODE}`;

export const ALL_FIELDS = [
FIELD_AGE_CHECK,
FIELD_CARRIER,
Expand All @@ -77,4 +80,5 @@ export const ALL_FIELDS = [
FIELD_PACKAGE_TYPE,
FIELD_SAME_DAY_DELIVERY,
FIELD_SIGNATURE,
FIELD_RECEIPT_CODE,
] as const;
1 change: 1 addition & 0 deletions apps/admin/src/forms/shipmentOptions/fields/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ export * from './createRef';
export * from './createSameDayDeliveryField';
export * from './createShipmentOptionField';
export * from './createSignatureField';
export * from './createReceiptCodeField';
1 change: 1 addition & 0 deletions libs/common/src/types/php-pdk.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,7 @@ export namespace Shipment {
return?: boolean;
sameDayDelivery?: boolean;
signature?: boolean;
receiptCode?: boolean;
};

export type PostReturnShipmentsRequest = Base.Request;
Expand Down

0 comments on commit fdc08cd

Please sign in to comment.