@dropins/storefront-purchase-order 0.0.1-alpha1 → 0.0.1-alpha3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/addPurchaseOrderComment/addPurchaseOrderComment.d.ts +4 -0
- package/api/addPurchaseOrderComment/graphql/addPurchaseOrderComment.graphql.d.ts +18 -0
- package/api/addPurchaseOrderComment/index.d.ts +18 -0
- package/api/addPurchaseOrderItemsToCart/addPurchaseOrderItemsToCart.d.ts +4 -0
- package/api/addPurchaseOrderItemsToCart/graphql/addPurchaseOrderItemsToCart.graphql.d.ts +18 -0
- package/api/addPurchaseOrderItemsToCart/index.d.ts +18 -0
- package/api/approvePurchaseOrders/approvePurchaseOrders.d.ts +10 -0
- package/api/approvePurchaseOrders/graphql/approvePurchaseOrders.graphql.d.ts +18 -0
- package/api/approvePurchaseOrders/index.d.ts +18 -0
- package/api/cancelPurchaseOrders/cancelPurchaseOrders.d.ts +10 -0
- package/api/cancelPurchaseOrders/graphql/cancelPurchaseOrders.graphql.d.ts +18 -0
- package/api/cancelPurchaseOrders/index.d.ts +18 -0
- package/api/createPurchaseOrderApprovalRule/createPurchaseOrderApprovalRule.d.ts +4 -0
- package/api/createPurchaseOrderApprovalRule/graphql/createPurchaseOrderApprovalRule.graphql.d.ts +18 -0
- package/api/createPurchaseOrderApprovalRule/index.d.ts +18 -0
- package/api/deletePurchaseOrderApprovalRule/deletePurchaseOrderApprovalRule.d.ts +9 -0
- package/api/deletePurchaseOrderApprovalRule/graphql/deletePurchaseOrderApprovalRule.graphql.d.ts +18 -0
- package/api/deletePurchaseOrderApprovalRule/index.d.ts +18 -0
- package/api/fragments.d.ts +18 -0
- package/api/getPurchaseOrder/getPurchaseOrder.d.ts +6 -0
- package/api/getPurchaseOrder/graphql/getPurchaseOrder.graphql.d.ts +18 -0
- package/api/getPurchaseOrder/index.d.ts +18 -0
- package/api/getPurchaseOrderApprovalRuleMetadata/getPurchaseOrderApprovalRuleMetadata.d.ts +4 -0
- package/api/getPurchaseOrderApprovalRuleMetadata/graphql/getPurchaseOrderApprovalRuleMetadata.graphql.d.ts +18 -0
- package/api/getPurchaseOrderApprovalRuleMetadata/index.d.ts +18 -0
- package/api/getPurchaseOrders/getPurchaseOrders.d.ts +12 -0
- package/api/getPurchaseOrders/graphql/getPurchaseOrders.graphql.d.ts +18 -0
- package/api/getPurchaseOrders/index.d.ts +18 -0
- package/api/graphql/PurchaseOrdersFragment.graphql.d.ts +18 -0
- package/api/index.d.ts +30 -0
- package/api/placeOrderForPurchaseOrder/graphql/placeOrderForPurchaseOrder.graphql.d.ts +18 -0
- package/api/placeOrderForPurchaseOrder/index.d.ts +18 -0
- package/api/placeOrderForPurchaseOrder/placeOrderForPurchaseOrder.d.ts +4 -0
- package/api/placePurchaseOrder/graphql/placePurchaseOrder.graphql.d.ts +18 -0
- package/api/placePurchaseOrder/index.d.ts +18 -0
- package/api/placePurchaseOrder/placePurchaseOrder.d.ts +6 -0
- package/api/rejectPurchaseOrders/graphql/rejectPurchaseOrders.graphql.d.ts +18 -0
- package/api/rejectPurchaseOrders/index.d.ts +18 -0
- package/api/rejectPurchaseOrders/rejectPurchaseOrders.d.ts +10 -0
- package/api/updatePurchaseOrderApprovalRule/graphql/updatePurchaseOrderApprovalRule.graphql.d.ts +18 -0
- package/api/updatePurchaseOrderApprovalRule/index.d.ts +18 -0
- package/api/updatePurchaseOrderApprovalRule/updatePurchaseOrderApprovalRule.d.ts +4 -0
- package/api/validatePurchaseOrders/graphql/validatePurchaseOrders.graphql.d.ts +18 -0
- package/api/validatePurchaseOrders/index.d.ts +18 -0
- package/api/validatePurchaseOrders/validatePurchaseOrders.d.ts +10 -0
- package/api.js +285 -1
- package/api.js.map +1 -1
- package/chunks/PurchaseOrdersTableActions.js +4 -0
- package/chunks/PurchaseOrdersTableActions.js.map +1 -0
- package/chunks/getPurchaseOrders.js +113 -0
- package/chunks/getPurchaseOrders.js.map +1 -0
- package/chunks/useCustomerRolePermissions.js +4 -0
- package/chunks/useCustomerRolePermissions.js.map +1 -0
- package/components/PurchaseOrdersHeader/PurchaseOrdersHeader.d.ts +7 -0
- package/components/PurchaseOrdersHeader/index.d.ts +19 -0
- package/components/PurchaseOrdersTable/PurchaseOrdersTable.d.ts +5 -0
- package/components/PurchaseOrdersTable/index.d.ts +19 -0
- package/components/PurchaseOrdersTableActions/PurchaseOrdersTableActions.d.ts +5 -0
- package/components/PurchaseOrdersTableActions/index.d.ts +19 -0
- package/components/index.d.ts +19 -1
- package/configs/companyPurchaseOrders.config.d.ts +4 -0
- package/configs/customerPurchaseOrders.config.d.ts +4 -0
- package/configs/index.d.ts +21 -0
- package/configs/pageSize.config.d.ts +22 -0
- package/configs/purchaseOrderApprovalRules.config.d.ts +4 -0
- package/containers/CompanyPurchaseOrders/CompanyPurchaseOrders.d.ts +5 -0
- package/containers/CompanyPurchaseOrders/index.d.ts +19 -0
- package/containers/CompanyPurchaseOrders.d.ts +3 -0
- package/containers/CompanyPurchaseOrders.js +4 -0
- package/containers/CompanyPurchaseOrders.js.map +1 -0
- package/containers/CustomerPurchaseOrders/CustomerPurchaseOrders.d.ts +5 -0
- package/containers/CustomerPurchaseOrders/index.d.ts +19 -0
- package/containers/CustomerPurchaseOrders.d.ts +3 -0
- package/containers/CustomerPurchaseOrders.js +4 -0
- package/containers/CustomerPurchaseOrders.js.map +1 -0
- package/containers/RequireApprovalPurchaseOrders/RequireApprovalPurchaseOrders.d.ts +5 -0
- package/containers/RequireApprovalPurchaseOrders/index.d.ts +19 -0
- package/containers/RequireApprovalPurchaseOrders.d.ts +3 -0
- package/containers/RequireApprovalPurchaseOrders.js +4 -0
- package/containers/RequireApprovalPurchaseOrders.js.map +1 -0
- package/containers/index.d.ts +3 -1
- package/data/models/cart-model.d.ts +40 -0
- package/data/models/customer-order-model.d.ts +128 -0
- package/data/models/customer-role-permissions-model.d.ts +35 -0
- package/data/models/index.d.ts +23 -1
- package/data/models/purchase-order-approval-rule-metadata-model.d.ts +33 -0
- package/data/models/purchase-order-approval-rule-model.d.ts +50 -0
- package/data/models/purchase-order-comment-model.d.ts +39 -0
- package/data/models/purchase-order-model.d.ts +75 -0
- package/data/transforms/index.d.ts +22 -1
- package/data/transforms/transform-cart.d.ts +4 -0
- package/data/transforms/transform-customer-order.d.ts +4 -0
- package/data/transforms/transform-customer-role-permissions.d.ts +20 -0
- package/data/transforms/transform-purchase-order-approval-rule-metadata.d.ts +4 -0
- package/data/transforms/transform-purchase-order-approval-rule.d.ts +4 -0
- package/data/transforms/transform-purchase-order-comment.d.ts +4 -0
- package/data/transforms/transform-purchase-order.d.ts +4 -0
- package/hooks/index.d.ts +19 -0
- package/hooks/useCustomerRolePermissions.d.ts +18 -0
- package/hooks/usePurchaseOrders.d.ts +4 -0
- package/i18n/en_US.json.d.ts +87 -2
- package/lib/case-converter.d.ts +25 -0
- package/lib/fetch-error.d.ts +21 -0
- package/lib/formatDate.d.ts +24 -0
- package/lib/getRange.d.ts +6 -0
- package/lib/index.d.ts +7 -0
- package/lib/isValidUrl.d.ts +2 -0
- package/lib/network-error.d.ts +22 -0
- package/mocks/index.d.ts +2832 -0
- package/mocks/storybook/index.d.ts +29 -0
- package/package.json +1 -1
- package/render.js +2 -1
- package/render.js.map +1 -1
- package/types/api/api.enums.types.d.ts +21 -0
- package/types/api/index.d.ts +2 -0
- package/types/components/index.d.ts +4 -0
- package/types/components/pagination.types.d.ts +27 -0
- package/types/components/purchaseOrdersTable.types.d.ts +38 -0
- package/types/components/purchaseOrdersTableActions.d.ts +8 -0
- package/types/containers/companyPurchaseOrders.types.d.ts +13 -0
- package/types/containers/customerPurchaseOrders.types.d.ts +13 -0
- package/types/containers/index.d.ts +4 -0
- package/types/containers/requireApprovalPurchaseOrders.types.d.ts +13 -0
- package/types/hooks/index.d.ts +2 -0
- package/types/hooks/usePurchaseOrders.types.d.ts +41 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomerPurchaseOrders.js","sources":["/@dropins/storefront-purchase-order/src/containers/CustomerPurchaseOrders/CustomerPurchaseOrders.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { classes, Container } from '@adobe-commerce/elsie/lib';\nimport {\n PurchaseOrdersTable,\n PurchaseOrdersHeader,\n} from '@/b2b-purchase-order/components';\nimport {\n usePurchaseOrders,\n useCustomerRolePermissions,\n} from '@/b2b-purchase-order/hooks';\nimport { CustomerPurchaseOrdersProps } from '@/b2b-purchase-order/types/containers';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { defaultPageSizeConfig } from '@/b2b-purchase-order/configs';\nimport { EnumPurchaseOrdersView } from '@/b2b-purchase-order/types/api';\n\nexport const CustomerPurchaseOrders: Container<CustomerPurchaseOrdersProps> = ({\n initialPageSize = defaultPageSizeConfig,\n routePurchaseOrderDetails,\n setColumns,\n setRowsData,\n className = '',\n withHeader = true,\n withWrapper = true,\n skeletonRowCount = 5,\n}) => {\n const view = EnumPurchaseOrdersView.CUSTOMER_PURCHASE_ORDERS;\n\n const t = useText({\n headerText: 'PurchaseOrders.customerPurchaseOrders.containerTitle',\n actionView: 'PurchaseOrders.purchaseOrdersTable.actionView',\n poNumber: 'PurchaseOrders.purchaseOrdersTable.tableColumns.poNumber',\n orderNumber: 'PurchaseOrders.purchaseOrdersTable.tableColumns.orderNumber',\n createdDate: 'PurchaseOrders.purchaseOrdersTable.tableColumns.createdDate',\n updatedDate: 'PurchaseOrders.purchaseOrdersTable.tableColumns.updatedDate',\n createdBy: 'PurchaseOrders.purchaseOrdersTable.tableColumns.createdBy',\n status: 'PurchaseOrders.purchaseOrdersTable.tableColumns.status',\n total: 'PurchaseOrders.purchaseOrdersTable.tableColumns.total',\n action: 'PurchaseOrders.purchaseOrdersTable.tableColumns.action',\n noPurchaseOrders: 'PurchaseOrders.customerPurchaseOrders.noPurchaseOrders',\n });\n\n const { permissions, loadingPermissions } = useCustomerRolePermissions();\n const {\n pageSizeConfig,\n loading,\n paginationConfig,\n tableConfig,\n totalCount,\n alertMessageConfig,\n } = usePurchaseOrders({\n view,\n routePurchaseOrderDetails,\n setColumns,\n setRowsData,\n initialPageSize,\n permissions,\n loadingPermissions,\n t,\n });\n\n return (\n <div\n className={classes(['purchase-orders', className])}\n data-testid=\"purchase-orders-container\"\n >\n {withHeader ? <PurchaseOrdersHeader headerText={t.headerText} /> : null}\n <PurchaseOrdersTable\n totalCount={totalCount}\n columns={tableConfig.columns}\n rows={tableConfig.rows}\n paginationConfig={paginationConfig}\n loading={loading}\n skeletonRowCount={skeletonRowCount}\n pageSizeConfig={pageSizeConfig}\n emptyTitle={t.noPurchaseOrders}\n alertMessageConfig={alertMessageConfig}\n withWrapper={withWrapper}\n />\n </div>\n );\n};\n"],"names":["CustomerPurchaseOrders","initialPageSize","defaultPageSizeConfig","routePurchaseOrderDetails","setColumns","setRowsData","className","withHeader","withWrapper","skeletonRowCount","view","EnumPurchaseOrdersView","t","useText","permissions","loadingPermissions","useCustomerRolePermissions","pageSizeConfig","loading","paginationConfig","tableConfig","totalCount","alertMessageConfig","usePurchaseOrders","jsxs","classes","jsx","PurchaseOrdersHeader","PurchaseOrdersTable"],"mappings":"ocA+BO,MAAMA,EAAiE,CAAC,CAC7E,gBAAAC,EAAkBC,EAClB,0BAAAC,EACA,WAAAC,EACA,YAAAC,EACA,UAAAC,EAAY,GACZ,WAAAC,EAAa,GACb,YAAAC,EAAc,GACd,iBAAAC,EAAmB,CACrB,IAAM,CACJ,MAAMC,EAAOC,EAAuB,yBAE9BC,EAAIC,EAAQ,CAChB,WAAY,uDACZ,WAAY,gDACZ,SAAU,2DACV,YAAa,8DACb,YAAa,8DACb,YAAa,8DACb,UAAW,4DACX,OAAQ,yDACR,MAAO,wDACP,OAAQ,yDACR,iBAAkB,wDAAA,CACnB,EAEK,CAAE,YAAAC,EAAa,mBAAAC,CAAA,EAAuBC,EAAA,EACtC,CACJ,eAAAC,EACA,QAAAC,EACA,iBAAAC,EACA,YAAAC,EACA,WAAAC,EACA,mBAAAC,CAAA,EACEC,EAAkB,CACpB,KAAAb,EACA,0BAAAP,EACA,WAAAC,EACA,YAAAC,EACA,gBAAAJ,EACA,YAAAa,EACA,mBAAAC,EACA,EAAAH,CAAA,CACD,EAED,OACEY,EAAC,MAAA,CACC,UAAWC,EAAQ,CAAC,kBAAmBnB,CAAS,CAAC,EACjD,cAAY,4BAEX,SAAA,CAAAC,EAAamB,EAACC,EAAA,CAAqB,WAAYf,EAAE,WAAY,EAAK,KACnEc,EAACE,EAAA,CACC,WAAAP,EACA,QAASD,EAAY,QACrB,KAAMA,EAAY,KAClB,iBAAAD,EACA,QAAAD,EACA,iBAAAT,EACA,eAAAQ,EACA,WAAYL,EAAE,iBACd,mBAAAU,EACA,YAAAd,CAAA,CAAA,CACF,CAAA,CAAA,CAGN"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Container } from '@dropins/tools/types/elsie/src/lib';
|
|
2
|
+
import { RequireApprovalPurchaseOrdersProps } from '../../types/containers';
|
|
3
|
+
|
|
4
|
+
export declare const RequireApprovalPurchaseOrders: Container<RequireApprovalPurchaseOrdersProps>;
|
|
5
|
+
//# sourceMappingURL=RequireApprovalPurchaseOrders.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export * from './RequireApprovalPurchaseOrders';
|
|
18
|
+
export { RequireApprovalPurchaseOrders as default } from './RequireApprovalPurchaseOrders';
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! Copyright 2025 Adobe
|
|
2
|
+
All Rights Reserved. */
|
|
3
|
+
import{jsxs as R,jsx as r}from"@dropins/tools/preact-jsx-runtime.js";import{classes as D}from"@dropins/tools/lib.js";import{E as M,u as S,a as j,P as w,b as x,d as E}from"../chunks/useCustomerRolePermissions.js";import{P as q}from"../chunks/PurchaseOrdersTableActions.js";import{useText as N}from"@dropins/tools/i18n.js";import"@dropins/tools/components.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/preact-hooks.js";import"../chunks/getPurchaseOrders.js";import"@dropins/tools/fetch-graphql.js";const F=({initialPageSize:l=E,routePurchaseOrderDetails:d,setColumns:u,setRowsData:c,className:i="",withHeader:p=!0,withWrapper:n=!0,skeletonRowCount:h=5})=>{const O=M.CUSTOMER_APPROVAL_PURCHASE_ORDERS,e=N({headerText:"PurchaseOrders.requireApprovalPurchaseOrders.containerTitle",actionView:"PurchaseOrders.purchaseOrdersTable.actionView",poNumber:"PurchaseOrders.purchaseOrdersTable.tableColumns.poNumber",orderNumber:"PurchaseOrders.purchaseOrdersTable.tableColumns.orderNumber",createdDate:"PurchaseOrders.purchaseOrdersTable.tableColumns.createdDate",updatedDate:"PurchaseOrders.purchaseOrdersTable.tableColumns.updatedDate",createdBy:"PurchaseOrders.purchaseOrdersTable.tableColumns.createdBy",status:"PurchaseOrders.purchaseOrdersTable.tableColumns.status",total:"PurchaseOrders.purchaseOrdersTable.tableColumns.total",action:"PurchaseOrders.purchaseOrdersTable.tableColumns.action",selectAllAriaLabel:"PurchaseOrders.purchaseOrdersTable.tableColumns.selectAllAriaLabel",noPurchaseOrders:"PurchaseOrders.requireApprovalPurchaseOrders.noPurchaseOrders",alertHeaderApprove:"PurchaseOrders.alertMessages.header.approve",alertHeaderReject:"PurchaseOrders.alertMessages.header.reject",alertHeaderError:"PurchaseOrders.alertMessages.header.error",alertDescriptionApprove:"PurchaseOrders.alertMessages.description.approve",alertDescriptionReject:"PurchaseOrders.alertMessages.description.reject",alertDescriptionError:"PurchaseOrders.alertMessages.description.error"}),{permissions:m,loadingPermissions:P}=S(),{totalCount:s,loading:a,tableConfig:t,paginationConfig:b,pageSizeConfig:g,selectedOrderIds:C,handleRejectSelected:T,handleApproveSelected:A,isRequireApprovalPOsView:v,alertMessageConfig:f,pendingApprovalCount:o}=j({view:O,routePurchaseOrderDetails:d,setColumns:u,setRowsData:c,initialPageSize:l,permissions:m,loadingPermissions:P,t:e});return R("div",{className:D(["require-approval-purchase-orders",i]),"data-testid":"require-approval-purchase-orders-container",children:[p?r(w,{headerText:e.headerText,tagNumber:o>0?String(o):void 0}):null,r(x,{header:v&&s>0?r(q,{loading:a,selectedCount:C.length,handleRejectSelected:T,handleApproveSelected:A}):null,totalCount:s,columns:t.columns,rows:t.rows,paginationConfig:b,loading:a,skeletonRowCount:h,pageSizeConfig:g,emptyTitle:e.noPurchaseOrders,alertMessageConfig:f,withWrapper:n})]})};export{F as RequireApprovalPurchaseOrders,F as default};
|
|
4
|
+
//# sourceMappingURL=RequireApprovalPurchaseOrders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RequireApprovalPurchaseOrders.js","sources":["/@dropins/storefront-purchase-order/src/containers/RequireApprovalPurchaseOrders/RequireApprovalPurchaseOrders.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { classes, Container } from '@adobe-commerce/elsie/lib';\nimport {\n PurchaseOrdersTable,\n PurchaseOrdersHeader,\n PurchaseOrdersTableActions,\n} from '@/b2b-purchase-order/components';\nimport {\n usePurchaseOrders,\n useCustomerRolePermissions,\n} from '@/b2b-purchase-order/hooks';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { defaultPageSizeConfig } from '@/b2b-purchase-order/configs';\nimport { EnumPurchaseOrdersView } from '@/b2b-purchase-order/types/api';\nimport { RequireApprovalPurchaseOrdersProps } from '@/b2b-purchase-order/types/containers';\n\nexport const RequireApprovalPurchaseOrders: Container<\n RequireApprovalPurchaseOrdersProps\n> = ({\n initialPageSize = defaultPageSizeConfig,\n routePurchaseOrderDetails,\n setColumns,\n setRowsData,\n className = '',\n withHeader = true,\n withWrapper = true,\n skeletonRowCount = 5,\n}) => {\n const view = EnumPurchaseOrdersView.CUSTOMER_APPROVAL_PURCHASE_ORDERS;\n\n const t = useText({\n headerText: 'PurchaseOrders.requireApprovalPurchaseOrders.containerTitle',\n actionView: 'PurchaseOrders.purchaseOrdersTable.actionView',\n poNumber: 'PurchaseOrders.purchaseOrdersTable.tableColumns.poNumber',\n orderNumber: 'PurchaseOrders.purchaseOrdersTable.tableColumns.orderNumber',\n createdDate: 'PurchaseOrders.purchaseOrdersTable.tableColumns.createdDate',\n updatedDate: 'PurchaseOrders.purchaseOrdersTable.tableColumns.updatedDate',\n createdBy: 'PurchaseOrders.purchaseOrdersTable.tableColumns.createdBy',\n status: 'PurchaseOrders.purchaseOrdersTable.tableColumns.status',\n total: 'PurchaseOrders.purchaseOrdersTable.tableColumns.total',\n action: 'PurchaseOrders.purchaseOrdersTable.tableColumns.action',\n selectAllAriaLabel:\n 'PurchaseOrders.purchaseOrdersTable.tableColumns.selectAllAriaLabel',\n noPurchaseOrders:\n 'PurchaseOrders.requireApprovalPurchaseOrders.noPurchaseOrders',\n alertHeaderApprove: 'PurchaseOrders.alertMessages.header.approve',\n alertHeaderReject: 'PurchaseOrders.alertMessages.header.reject',\n alertHeaderError: 'PurchaseOrders.alertMessages.header.error',\n alertDescriptionApprove: 'PurchaseOrders.alertMessages.description.approve',\n alertDescriptionReject: 'PurchaseOrders.alertMessages.description.reject',\n alertDescriptionError: 'PurchaseOrders.alertMessages.description.error',\n });\n\n const { permissions, loadingPermissions } = useCustomerRolePermissions();\n const {\n totalCount,\n loading,\n tableConfig,\n paginationConfig,\n pageSizeConfig,\n selectedOrderIds,\n handleRejectSelected,\n handleApproveSelected,\n isRequireApprovalPOsView,\n alertMessageConfig,\n pendingApprovalCount,\n } = usePurchaseOrders({\n view,\n routePurchaseOrderDetails,\n setColumns,\n setRowsData,\n initialPageSize,\n permissions,\n loadingPermissions,\n t,\n });\n\n return (\n <div\n className={classes(['require-approval-purchase-orders', className])}\n data-testid=\"require-approval-purchase-orders-container\"\n >\n {withHeader ? (\n <PurchaseOrdersHeader\n headerText={t.headerText}\n tagNumber={\n pendingApprovalCount > 0 ? String(pendingApprovalCount) : undefined\n }\n />\n ) : null}\n <PurchaseOrdersTable\n header={\n isRequireApprovalPOsView && totalCount > 0 ? (\n <PurchaseOrdersTableActions\n loading={loading}\n selectedCount={selectedOrderIds.length}\n handleRejectSelected={handleRejectSelected}\n handleApproveSelected={handleApproveSelected}\n />\n ) : null\n }\n totalCount={totalCount}\n columns={tableConfig.columns}\n rows={tableConfig.rows}\n paginationConfig={paginationConfig}\n loading={loading}\n skeletonRowCount={skeletonRowCount}\n pageSizeConfig={pageSizeConfig}\n emptyTitle={t.noPurchaseOrders}\n alertMessageConfig={alertMessageConfig}\n withWrapper={withWrapper}\n />\n </div>\n );\n};\n"],"names":["RequireApprovalPurchaseOrders","initialPageSize","defaultPageSizeConfig","routePurchaseOrderDetails","setColumns","setRowsData","className","withHeader","withWrapper","skeletonRowCount","view","EnumPurchaseOrdersView","t","useText","permissions","loadingPermissions","useCustomerRolePermissions","totalCount","loading","tableConfig","paginationConfig","pageSizeConfig","selectedOrderIds","handleRejectSelected","handleApproveSelected","isRequireApprovalPOsView","alertMessageConfig","pendingApprovalCount","usePurchaseOrders","jsxs","classes","jsx","PurchaseOrdersHeader","PurchaseOrdersTable","PurchaseOrdersTableActions"],"mappings":"ggBAgCO,MAAMA,EAET,CAAC,CACH,gBAAAC,EAAkBC,EAClB,0BAAAC,EACA,WAAAC,EACA,YAAAC,EACA,UAAAC,EAAY,GACZ,WAAAC,EAAa,GACb,YAAAC,EAAc,GACd,iBAAAC,EAAmB,CACrB,IAAM,CACJ,MAAMC,EAAOC,EAAuB,kCAE9BC,EAAIC,EAAQ,CAChB,WAAY,8DACZ,WAAY,gDACZ,SAAU,2DACV,YAAa,8DACb,YAAa,8DACb,YAAa,8DACb,UAAW,4DACX,OAAQ,yDACR,MAAO,wDACP,OAAQ,yDACR,mBACE,qEACF,iBACE,gEACF,mBAAoB,8CACpB,kBAAmB,6CACnB,iBAAkB,4CAClB,wBAAyB,mDACzB,uBAAwB,kDACxB,sBAAuB,gDAAA,CACxB,EAEK,CAAE,YAAAC,EAAa,mBAAAC,CAAA,EAAuBC,EAAA,EACtC,CACJ,WAAAC,EACA,QAAAC,EACA,YAAAC,EACA,iBAAAC,EACA,eAAAC,EACA,iBAAAC,EACA,qBAAAC,EACA,sBAAAC,EACA,yBAAAC,EACA,mBAAAC,EACA,qBAAAC,CAAA,EACEC,EAAkB,CACpB,KAAAlB,EACA,0BAAAP,EACA,WAAAC,EACA,YAAAC,EACA,gBAAAJ,EACA,YAAAa,EACA,mBAAAC,EACA,EAAAH,CAAA,CACD,EAED,OACEiB,EAAC,MAAA,CACC,UAAWC,EAAQ,CAAC,mCAAoCxB,CAAS,CAAC,EAClE,cAAY,6CAEX,SAAA,CAAAC,EACCwB,EAACC,EAAA,CACC,WAAYpB,EAAE,WACd,UACEe,EAAuB,EAAI,OAAOA,CAAoB,EAAI,MAAA,CAAA,EAG5D,KACJI,EAACE,EAAA,CACC,OACER,GAA4BR,EAAa,EACvCc,EAACG,EAAA,CACC,QAAAhB,EACA,cAAeI,EAAiB,OAChC,qBAAAC,EACA,sBAAAC,CAAA,CAAA,EAEA,KAEN,WAAAP,EACA,QAASE,EAAY,QACrB,KAAMA,EAAY,KAClB,iBAAAC,EACA,QAAAF,EACA,iBAAAT,EACA,eAAAY,EACA,WAAYT,EAAE,iBACd,mBAAAc,EACA,YAAAlB,CAAA,CAAA,CACF,CAAA,CAAA,CAGN"}
|
package/containers/index.d.ts
CHANGED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export interface CartModel {
|
|
18
|
+
cart: {
|
|
19
|
+
id: string;
|
|
20
|
+
items: {
|
|
21
|
+
uid: string;
|
|
22
|
+
quantity: number;
|
|
23
|
+
product: {
|
|
24
|
+
uid: string;
|
|
25
|
+
name: string;
|
|
26
|
+
sku: string;
|
|
27
|
+
};
|
|
28
|
+
}[];
|
|
29
|
+
pagination?: {
|
|
30
|
+
currentPage: number;
|
|
31
|
+
pageSize: number;
|
|
32
|
+
totalPages: number;
|
|
33
|
+
totalCount: number;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
userErrors: Array<{
|
|
37
|
+
message: string;
|
|
38
|
+
}>;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=cart-model.d.ts.map
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export interface Money {
|
|
18
|
+
value: number;
|
|
19
|
+
currency: string;
|
|
20
|
+
}
|
|
21
|
+
export interface Coupon {
|
|
22
|
+
code: string;
|
|
23
|
+
label: string;
|
|
24
|
+
}
|
|
25
|
+
export interface GiftCard {
|
|
26
|
+
code: string;
|
|
27
|
+
appliedBalance: Money;
|
|
28
|
+
currentBalance: Money;
|
|
29
|
+
}
|
|
30
|
+
export interface CustomerAddress {
|
|
31
|
+
firstname: string;
|
|
32
|
+
lastname: string;
|
|
33
|
+
street: string[];
|
|
34
|
+
city: string;
|
|
35
|
+
region: string;
|
|
36
|
+
postcode: string;
|
|
37
|
+
countryCode: string;
|
|
38
|
+
telephone: string;
|
|
39
|
+
company: string;
|
|
40
|
+
}
|
|
41
|
+
export interface PaymentMethod {
|
|
42
|
+
name: string;
|
|
43
|
+
type: string;
|
|
44
|
+
additionalData: Record<string, any>;
|
|
45
|
+
}
|
|
46
|
+
export interface OrderItem {
|
|
47
|
+
id: string;
|
|
48
|
+
productName: string;
|
|
49
|
+
productSku: string;
|
|
50
|
+
quantityOrdered: number;
|
|
51
|
+
quantityShipped: number;
|
|
52
|
+
quantityInvoiced: number;
|
|
53
|
+
quantityRefunded: number;
|
|
54
|
+
price: Money;
|
|
55
|
+
total: Money;
|
|
56
|
+
}
|
|
57
|
+
export interface Shipment {
|
|
58
|
+
id: string;
|
|
59
|
+
number: string;
|
|
60
|
+
tracking: ShipmentTracking[];
|
|
61
|
+
comments: ShipmentComment[];
|
|
62
|
+
items: ShipmentItem[];
|
|
63
|
+
}
|
|
64
|
+
export interface ShipmentTracking {
|
|
65
|
+
number: string;
|
|
66
|
+
carrier: string;
|
|
67
|
+
title: string;
|
|
68
|
+
}
|
|
69
|
+
export interface ShipmentComment {
|
|
70
|
+
message: string;
|
|
71
|
+
timestamp: string;
|
|
72
|
+
}
|
|
73
|
+
export interface ShipmentItem {
|
|
74
|
+
id: string;
|
|
75
|
+
productName: string;
|
|
76
|
+
productSku: string;
|
|
77
|
+
quantityShipped: number;
|
|
78
|
+
}
|
|
79
|
+
export interface CustomerInfo {
|
|
80
|
+
firstname: string;
|
|
81
|
+
lastname: string;
|
|
82
|
+
email: string;
|
|
83
|
+
}
|
|
84
|
+
export interface OrderTotal {
|
|
85
|
+
baseGrandTotal: Money;
|
|
86
|
+
grandTotal: Money;
|
|
87
|
+
subtotal: Money;
|
|
88
|
+
totalTax: Money;
|
|
89
|
+
totalShipping: Money;
|
|
90
|
+
discounts: OrderDiscount[];
|
|
91
|
+
}
|
|
92
|
+
export interface OrderDiscount {
|
|
93
|
+
label: string;
|
|
94
|
+
amount: Money;
|
|
95
|
+
}
|
|
96
|
+
export interface CustomerOrderModel {
|
|
97
|
+
appliedCoupons: Coupon[];
|
|
98
|
+
appliedGiftCards: GiftCard[];
|
|
99
|
+
availableActions: string[];
|
|
100
|
+
billingAddress: CustomerAddress;
|
|
101
|
+
carrier: string;
|
|
102
|
+
comments: string[];
|
|
103
|
+
creditMemos: any[];
|
|
104
|
+
customAttributes: Record<string, any>[];
|
|
105
|
+
customerInfo: CustomerInfo;
|
|
106
|
+
email: string;
|
|
107
|
+
giftMessage: string;
|
|
108
|
+
giftReceiptIncluded: boolean;
|
|
109
|
+
giftWrapping: any;
|
|
110
|
+
id: string;
|
|
111
|
+
invoices: any[];
|
|
112
|
+
isVirtual: boolean;
|
|
113
|
+
items: OrderItem[];
|
|
114
|
+
itemsEligibleForReturn: any[];
|
|
115
|
+
number: string;
|
|
116
|
+
orderDate: string;
|
|
117
|
+
orderStatusChangeDate: string;
|
|
118
|
+
paymentMethods: PaymentMethod[];
|
|
119
|
+
printedCardIncluded: boolean;
|
|
120
|
+
returns: any;
|
|
121
|
+
shipments: Shipment[];
|
|
122
|
+
shippingAddress: CustomerAddress;
|
|
123
|
+
shippingMethod: string;
|
|
124
|
+
status: string;
|
|
125
|
+
token: string;
|
|
126
|
+
total: OrderTotal;
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=customer-order-model.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export interface CustomerRolePermissionsModel {
|
|
18
|
+
isAdmin: boolean;
|
|
19
|
+
purchaseOrderEnabled: boolean;
|
|
20
|
+
role: {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
};
|
|
24
|
+
permissions: {
|
|
25
|
+
purchaseOrderAll: boolean;
|
|
26
|
+
viewPurchaseOrders: boolean;
|
|
27
|
+
viewPurchaseOrdersForSubordinates: boolean;
|
|
28
|
+
viewPurchaseOrdersForCompany: boolean;
|
|
29
|
+
autoApprovePurchaseOrder: boolean;
|
|
30
|
+
superApprovePurchaseOrder: boolean;
|
|
31
|
+
viewApprovalRules: boolean;
|
|
32
|
+
manageApprovalRules: boolean;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=customer-role-permissions-model.d.ts.map
|
package/data/models/index.d.ts
CHANGED
|
@@ -1,2 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export * from './cart-model';
|
|
18
|
+
export * from './customer-order-model';
|
|
19
|
+
export * from './purchase-order-approval-rule-metadata-model';
|
|
20
|
+
export * from './purchase-order-approval-rule-model';
|
|
21
|
+
export * from './purchase-order-comment-model';
|
|
22
|
+
export * from './purchase-order-model';
|
|
23
|
+
export * from './customer-role-permissions-model';
|
|
2
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export interface CompanyRolePermissionsTree {
|
|
18
|
+
id: string;
|
|
19
|
+
sortOrder: number;
|
|
20
|
+
text: string;
|
|
21
|
+
children?: CompanyRolePermissionsTree[];
|
|
22
|
+
}
|
|
23
|
+
export interface CompanyRole {
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
usersCount: number;
|
|
27
|
+
permissions: CompanyRolePermissionsTree[];
|
|
28
|
+
}
|
|
29
|
+
export interface PurchaseOrderApprovalRuleMetadataModel {
|
|
30
|
+
availableAppliesTo: CompanyRole[];
|
|
31
|
+
availableRequiresApprovalFrom: CompanyRole[];
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=purchase-order-approval-rule-metadata-model.d.ts.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export interface PurchaseOrderApprovalRuleModel {
|
|
18
|
+
createdAt: string;
|
|
19
|
+
createdBy: string;
|
|
20
|
+
description: string;
|
|
21
|
+
updatedAt: string;
|
|
22
|
+
name: string;
|
|
23
|
+
status: string;
|
|
24
|
+
uid: string;
|
|
25
|
+
appliesToRoles: {
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
usersCount: number;
|
|
29
|
+
permissions: Array<{
|
|
30
|
+
id: string;
|
|
31
|
+
sortOrder: number;
|
|
32
|
+
text: string;
|
|
33
|
+
}>;
|
|
34
|
+
}[];
|
|
35
|
+
condition: {
|
|
36
|
+
attribute: string;
|
|
37
|
+
operator: string;
|
|
38
|
+
};
|
|
39
|
+
approverRoles: {
|
|
40
|
+
id: string;
|
|
41
|
+
name: string;
|
|
42
|
+
usersCount: number;
|
|
43
|
+
permissions: Array<{
|
|
44
|
+
id: string;
|
|
45
|
+
sortOrder: number;
|
|
46
|
+
text: string;
|
|
47
|
+
}>;
|
|
48
|
+
}[];
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=purchase-order-approval-rule-model.d.ts.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export interface PurchaseOrderCommentModel {
|
|
18
|
+
createdAt: string;
|
|
19
|
+
text: string;
|
|
20
|
+
uid: string;
|
|
21
|
+
author: {
|
|
22
|
+
allowRemoteShoppingAssistance: boolean;
|
|
23
|
+
confirmationStatus: string;
|
|
24
|
+
createdAt: string;
|
|
25
|
+
dateOfBirth: string;
|
|
26
|
+
email: string;
|
|
27
|
+
firstname: string;
|
|
28
|
+
gender: number;
|
|
29
|
+
jobTitle: string;
|
|
30
|
+
lastname: string;
|
|
31
|
+
middlename: string;
|
|
32
|
+
prefix: string;
|
|
33
|
+
status: string;
|
|
34
|
+
structureId: string;
|
|
35
|
+
suffix: string;
|
|
36
|
+
telephone: string;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=purchase-order-comment-model.d.ts.map
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export interface PurchaseOrderModel {
|
|
18
|
+
typename: string;
|
|
19
|
+
uid: string;
|
|
20
|
+
number: string;
|
|
21
|
+
status: string;
|
|
22
|
+
availableActions: string[];
|
|
23
|
+
approvalFlow: {
|
|
24
|
+
ruleName: string;
|
|
25
|
+
events: Array<{
|
|
26
|
+
message: string;
|
|
27
|
+
name: string;
|
|
28
|
+
role: string;
|
|
29
|
+
status: string;
|
|
30
|
+
updatedAt: string;
|
|
31
|
+
}>;
|
|
32
|
+
} | null;
|
|
33
|
+
comments?: Array<{
|
|
34
|
+
createdAt: string;
|
|
35
|
+
author: {
|
|
36
|
+
firstname: string;
|
|
37
|
+
lastname: string;
|
|
38
|
+
email: string;
|
|
39
|
+
};
|
|
40
|
+
text: string;
|
|
41
|
+
}>;
|
|
42
|
+
createdAt: string;
|
|
43
|
+
updatedAt: string;
|
|
44
|
+
createdBy: {
|
|
45
|
+
firstname: string;
|
|
46
|
+
lastname: string;
|
|
47
|
+
email: string;
|
|
48
|
+
};
|
|
49
|
+
historyLog?: Array<{
|
|
50
|
+
activity: string;
|
|
51
|
+
createdAt: string;
|
|
52
|
+
message: string;
|
|
53
|
+
uid: string;
|
|
54
|
+
}>;
|
|
55
|
+
order: {
|
|
56
|
+
orderNumber: string;
|
|
57
|
+
id: string;
|
|
58
|
+
};
|
|
59
|
+
quote: {
|
|
60
|
+
id: string;
|
|
61
|
+
prices: {
|
|
62
|
+
grandTotal: {
|
|
63
|
+
value: number;
|
|
64
|
+
currency: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
itemsV2: {
|
|
68
|
+
items?: Array<{
|
|
69
|
+
uid: string;
|
|
70
|
+
quantity: number;
|
|
71
|
+
}>;
|
|
72
|
+
};
|
|
73
|
+
} | null;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=purchase-order-model.d.ts.map
|
|
@@ -1,2 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export * from './transform-cart';
|
|
18
|
+
export * from './transform-customer-order';
|
|
19
|
+
export * from './transform-purchase-order-approval-rule-metadata';
|
|
20
|
+
export * from './transform-purchase-order-approval-rule';
|
|
21
|
+
export * from './transform-purchase-order-comment';
|
|
22
|
+
export * from './transform-purchase-order';
|
|
2
23
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CustomerRolePermissionsModel } from '../models/customer-role-permissions-model';
|
|
2
|
+
|
|
3
|
+
type PermissionsPayload = {
|
|
4
|
+
admin?: boolean;
|
|
5
|
+
[key: string]: boolean | undefined;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Transforms flat permissions object from auth/permissions event into CustomerRolePermissionsModel
|
|
9
|
+
*
|
|
10
|
+
* Permission Logic:
|
|
11
|
+
* - true: Permission granted
|
|
12
|
+
* - false: Permission disabled (overrides admin privileges - indicates PO feature is disabled)
|
|
13
|
+
* - Default: Admins get access, regular users don't
|
|
14
|
+
*
|
|
15
|
+
* @param permissionsData - Flat object with permission keys and admin flag
|
|
16
|
+
* @returns CustomerRolePermissionsModel
|
|
17
|
+
*/
|
|
18
|
+
export declare const transformPermissions: (permissionsData: PermissionsPayload | null | undefined) => CustomerRolePermissionsModel;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=transform-customer-role-permissions.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PurchaseOrderApprovalRuleMetadataModel } from '../models/purchase-order-approval-rule-metadata-model';
|
|
2
|
+
|
|
3
|
+
export declare const transformPurchaseOrderApprovalRuleMetadata: (response: any) => PurchaseOrderApprovalRuleMetadataModel;
|
|
4
|
+
//# sourceMappingURL=transform-purchase-order-approval-rule-metadata.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PurchaseOrderApprovalRuleModel } from '../models/purchase-order-approval-rule-model';
|
|
2
|
+
|
|
3
|
+
export declare const transformPurchaseOrderApprovalRule: (approvalRule: any) => PurchaseOrderApprovalRuleModel;
|
|
4
|
+
//# sourceMappingURL=transform-purchase-order-approval-rule.d.ts.map
|
package/hooks/index.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2025 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export * from './usePurchaseOrders';
|
|
18
|
+
export * from './useCustomerRolePermissions';
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CustomerRolePermissionsModel } from '../data/models';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Hook to consume customer role permissions from the auth/permissions event
|
|
5
|
+
*
|
|
6
|
+
* Initializes with last payload and subscribes to real-time updates.
|
|
7
|
+
* Transforms permissions data where:
|
|
8
|
+
* - true: Permission granted
|
|
9
|
+
* - false: Permission disabled (overrides admin - PO feature disabled)
|
|
10
|
+
* - Default: Admins get access, regular users don't
|
|
11
|
+
*
|
|
12
|
+
* @returns {permissions: CustomerRolePermissionsModel, loadingPermissions: boolean}
|
|
13
|
+
*/
|
|
14
|
+
export declare const useCustomerRolePermissions: () => {
|
|
15
|
+
permissions: CustomerRolePermissionsModel;
|
|
16
|
+
loadingPermissions: boolean;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=useCustomerRolePermissions.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { UsePurchaseOrdersParams, UsePurchaseOrdersReturn } from '../types/hooks';
|
|
2
|
+
|
|
3
|
+
export declare const usePurchaseOrders: ({ view, initialPageSize, routePurchaseOrderDetails, setColumns, setRowsData, t, permissions, loadingPermissions, }: UsePurchaseOrdersParams) => UsePurchaseOrdersReturn;
|
|
4
|
+
//# sourceMappingURL=usePurchaseOrders.d.ts.map
|