@bjsdistribution/dms-client-return 0.1.81-prod → 0.1.82-prod

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.
Files changed (37) hide show
  1. package/dist/components/client-portal/ReturnAfterSearchBar.js +5 -5
  2. package/dist/components/client-portal/ReturnAfterSearchBar.js.map +1 -1
  3. package/dist/components/order-daily-overview/header-filters/Styledfilters.js +10 -11
  4. package/dist/components/order-daily-overview/header-filters/Styledfilters.js.map +1 -1
  5. package/dist/components/order-daily-overview/header-filters/overViewFilter.js +7 -11
  6. package/dist/components/order-daily-overview/header-filters/overViewFilter.js.map +1 -1
  7. package/dist/components/order-daily-overview/index.js +5 -4
  8. package/dist/components/order-daily-overview/index.js.map +1 -1
  9. package/dist/components/order-daily-overview/return-after-table/ReturnAfterTable.js +18 -18
  10. package/dist/components/order-daily-overview/return-after-table/ReturnAfterTable.js.map +1 -1
  11. package/dist/components/order-daily-overview/return-after-table/table/OrderTable.js +0 -1
  12. package/dist/components/order-daily-overview/return-after-table/table/OrderTable.js.map +1 -1
  13. package/dist/components/order-daily-overview/return-order-table/return-orders-filters/returnstyles.js +74 -77
  14. package/dist/components/order-daily-overview/return-order-table/return-orders-filters/returnstyles.js.map +1 -1
  15. package/dist/components/order-daily-overview/store/store.js +33 -33
  16. package/dist/components/order-daily-overview/store/store.js.map +1 -1
  17. package/dist/components/order-daily-overview/table/table-data/styles.js +117 -363
  18. package/dist/components/order-daily-overview/table/table-data/styles.js.map +1 -1
  19. package/dist/components/order-view/general-information/dropdowns/Print.js +11 -11
  20. package/dist/components/order-view/general-information/dropdowns/Print.js.map +1 -1
  21. package/dist/components/order-view/index.js +154 -133
  22. package/dist/components/order-view/index.js.map +1 -1
  23. package/dist/components/order-view/store.js +160 -144
  24. package/dist/components/order-view/store.js.map +1 -1
  25. package/dist/components/order-view/toolbox-resources/collapsed-content/index.js +16 -0
  26. package/dist/components/order-view/toolbox-resources/collapsed-content/index.js.map +1 -0
  27. package/dist/components/order-view/toolbox-resources/expanded-content/index.js +534 -0
  28. package/dist/components/order-view/toolbox-resources/expanded-content/index.js.map +1 -0
  29. package/dist/components/utils.js +5 -4
  30. package/dist/components/utils.js.map +1 -1
  31. package/dist/types/components/order-daily-overview/return-order-table/return-orders-filters/returnstyles.d.ts +1 -1
  32. package/dist/types/components/order-daily-overview/table/table-data/styles.d.ts +8 -22
  33. package/dist/types/components/order-view/store.d.ts +6 -0
  34. package/dist/types/components/order-view/toolbox-resources/collapsed-content/index.d.ts +2 -0
  35. package/dist/types/components/order-view/toolbox-resources/expanded-content/index.d.ts +2 -0
  36. package/dist/types/components/utils.d.ts +1 -0
  37. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sources":["../../../../../src/components/order-daily-overview/table/table-data/styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const ColumStyle = styled.div`\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: center;\n gap: 7px;\n`;\n\nexport const GreyBox = styled.div`\n display: flex;\n padding: 3px 12px;\n align-items: flex-start;\n gap: 24px;\n border-radius: 6px;\n background: rgba(153, 153, 153, 0.1);\n`;\n// Styled components\nexport const StyledTableWrapper = styled.div`\n overflow-x: auto;\n max-height: calc(100vh - 396px);\n /* box-shadow: 0px 0px 30px 6px rgba(46, 45, 116, 0.05); */\n &::-webkit-scrollbar {\n width: 5px;\n border-radius: 100px;\n height: 5px;\n }\n\n &::-webkit-scrollbar-track {\n background: #777;\n border-radius: 100px;\n }\n\n &::-webkit-scrollbar-thumb {\n background: #7b61ff;\n border-radius: 100px;\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background: #7b61ff;\n }\n`;\n\nexport const StyledTable = styled.table`\n border-spacing: 0 10px;\n width: 100%;\n table-layout: fixed;\n /* min-width: 1600px; */\n thead {\n position: sticky;\n top: 10px;\n z-index: 1;\n background: #fff;\n box-shadow: 0px 0px 1px #ffffff, 0px -10px 1px #ffffff;\n tr {\n border-radius: 40px;\n border-spacing: 0 10px;\n font-family: 'lato', sans-serif;\n .emailInvoiceCheckbox {\n padding-right: 0px;\n width: 0;\n > div {\n width: fit-content;\n }\n }\n .emailInvoiceNo {\n padding-left: 12px;\n }\n .emailInvoiceShare {\n width: 100px;\n }\n th {\n color: #3a3630;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n padding: 11px 15px;\n background: #f0f2f2;\n border-right: none;\n border-left: none;\n text-align: left;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-width: 1px 0;\n &:first-child {\n border-radius: 100px 0 0 100px;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n }\n &:last-child {\n border-radius: 0px 100px 100px 0;\n border-right: 1px solid rgba(0, 0, 0, 0.08);\n }\n }\n }\n }\n tbody {\n max-height: 400px;\n overflow-y: auto;\n tr {\n td {\n color: #3a3630;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n padding: 12px 15px;\n background: #fff;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-right: none;\n border-left: none;\n word-break: break-word;\n\n .shareIconContainer {\n display: flex;\n width: 24px;\n height: 24px;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 10px;\n flex-shrink: 0;\n border-radius: 15px;\n background: #edebe8;\n cursor: pointer;\n }\n .statuscontainer {\n display: flex;\n padding: 6px 10px;\n justify-content: center;\n align-items: center;\n gap: 5px;\n flex: 1 0 0;\n border-radius: 22px;\n background: rgba(41, 204, 106, 0.15);\n }\n }\n &:nth-child(even) td {\n background: #f6fbff;\n }\n td:first-child {\n border-radius: 100px 0 0 100px;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n }\n td:last-child {\n border-radius: 0px 100px 100px 0;\n border-right: 1px solid rgba(0, 0, 0, 0.08);\n }\n .flex {\n display: flex;\n flex-direction: row;\n gap: 5px;\n height: 29px;\n align-items: center;\n }\n\n &.insideTable {\n td {\n border-radius: 0;\n border: none;\n &:last-child {\n border-radius: 0;\n border-right: none;\n }\n }\n table {\n border-spacing: 0;\n width: 100%;\n border-radius: 5px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n overflow: hidden;\n border-top-left-radius: 15px;\n border-top-right-radius: 15px;\n thead {\n tr {\n border-bottom: none;\n th {\n padding: 14px 20px;\n text-align: left;\n border-top: 0;\n border-right: 0;\n border-left: 0;\n background: #f8fafc;\n\n &:first-child {\n border-radius: 0;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n border-top-left-radius: 15px;\n }\n &:last-child {\n border-radius: 0;\n }\n }\n }\n }\n tbody {\n tr {\n td {\n padding: 14px 20px;\n text-align: left;\n border-bottom: 1px solid rgba(58, 54, 48, 0.15);\n background: #fff;\n > svg {\n transform: scale(1.5);\n background-color: #edebe8;\n border-radius: 20px;\n padding: 5px;\n }\n &:last-child {\n border-radius: 0;\n border-right: none;\n }\n }\n }\n }\n }\n }\n }\n }\n .actions {\n display: flex;\n align-items: center;\n gap: 20px;\n > svg {\n transform: scale(1.5);\n background-color: #edebe8;\n border-radius: 20px;\n padding: 5px;\n }\n\n .close-icon {\n transform: scale(1.3);\n background-color: transparent;\n border-radius: 0;\n padding: 0;\n }\n }\n`;\n\nexport const StyledThBase = styled.th`\n color: #3a3630;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n padding: 11px 15px;\n background: #f0f2f2;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-right: none;\n border-left: none;\n text-align: left;\n`;\n\nexport const StyledTdBasic = styled.td`\n color: #3a3630;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n padding: 15px;\n background: #fff;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-right: none;\n border-left: none;\n`;\n\nexport const StyledFlex = styled.div`\n display: flex;\n gap: 8px;\n align-items: center;\n em {\n padding-left: 8px;\n border-left: 2px dotted #758588;\n font-style: normal;\n }\n span {\n display: block;\n line-height: 1;\n &:first-child {\n margin-bottom: 5px;\n }\n }\n`;\nexport const StyledRoundedBorder = styled.div`\n border-radius: 30px;\n border: 1px solid #edefef;\n background: #f6fbff;\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nexport const RouteName = styled.div`\n font-weight: 600;\n color: #09f;\n margin-bottom: 6px;\n`;\n\nexport const StyledFlexGap4 = styled.div`\n display: flex;\n gap: 4px;\n /* align-items: center; */\n`;\n\nexport const TomtomName = styled.div`\n color: #29cc6a;\n font-size: 13px;\n font-weight: 600;\n line-height: 24px;\n`;\nexport const StyledLineBreak = styled.div``;\nexport const Weight = styled.div`\n font-size: 10px;\n font-style: normal;\n font-weight: 700;\n line-height: 16px;\n`;\n\nexport const StyledIconCover = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n span {\n margin-top: 4px;\n &.ascending svg path:first-child {\n fill: #000;\n }\n &.descending svg path:last-child {\n fill: #000;\n }\n }\n`;\n\nexport const TomtomCover = styled.div`\n transform: scale(0.5);\n`;\n\nexport const CustomDrop = styled.div`\n border-radius: 20px;\n border: 1px solid #e2e0db;\n background: #fff;\n display: flex;\n padding: 4px 8px;\n gap: 8px;\n align-items: center;\n cursor: pointer;\n &.active .drop {\n transform: rotate(180deg);\n }\n`;\n\nexport const CoverCustomDrop = styled.div`\n position: relative;\n`;\n\nexport const IconCoverData = styled.div`\n display: flex;\n gap: 8px;\n align-items: center;\n svg {\n cursor: pointer;\n }\n`;\n\n// For route details\nexport const StyledCollapseWrapper = styled.div`\n border-radius: 15px;\n border: 1px solid #e3e3e3;\n background: #fff;\n box-shadow: 0px 4px 30px 0px rgba(46, 45, 116, 0.05);\n padding-bottom: 10px;\n`;\n\nexport const StyledCollapseHeadWrapper = styled.div`\n border-bottom: 1px solid #e3e3e3;\n background: #f8fafc;\n display: flex;\n padding: 10px 15px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-radius: 15px 15px 0 0;\n`;\n\nexport const StyledCollapseBody = styled.div`\n /* padding-left: 45px; */\n position: relative;\n padding-right: 15px;\n`;\n\nexport const StyledTh = styled(StyledThBase)`\n background: none;\n padding: 0px;\n border-radius: 0 !important;\n border: none;\n padding: 14px 20px;\n border-radius: 15px 0px 0px 0px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\n\n background: #f8fafc;\n`;\n\nexport const StyledTd = styled(StyledTdBasic)`\n background: none;\n border: none;\n padding: 0;\n td td {\n padding: 0 10px;\n min-width: 140px;\n max-width: 140px;\n &:nth-child(3) {\n min-width: 210px;\n max-width: 210px;\n }\n }\n`;\n\nexport const StyledDateWrapper = styled.div`\n border-radius: 100px;\n border: 1px solid rgba(0, 0, 0, 0.08);\n background: #faf9f9;\n padding: 6px 8px;\n color: #888075;\n font-size: 12px;\n font-weight: 400;\n line-height: 16px;\n display: inline-block;\n`;\n\nexport const StyledLocationName = styled.div`\n color: #fc7743;\n`;\n\nexport const StyledToggleStatus = styled.div`\n border-radius: 20px;\n border: 1px solid rgba(233, 82, 82, 0.5);\n background: rgba(233, 82, 82, 0.15);\n padding: 2px 8px;\n display: flex;\n cursor: pointer;\n max-width: 70px;\n\n &.active .coverArrow {\n transform: rotate(0deg);\n position: relative;\n top: 2px;\n }\n .coverArrow {\n transform: rotate(180deg);\n position: relative;\n top: -2px;\n }\n\n .circle {\n width: 24px;\n height: 24px;\n border-radius: 100px;\n border: 1px solid #e95252;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n &:after {\n content: '';\n width: 10px;\n height: 10px;\n border-radius: 100px;\n background: #e95252;\n }\n }\n`;\n\nexport const StyledTimeTrack = styled.div`\n border-radius: 12px;\n background: #fff;\n\n position: absolute;\n top: 86px;\n left: 3px;\n min-width: 36px;\n span {\n padding: 2px 6px;\n color: #687d9b;\n font-weight: 600;\n font-size: 11px;\n position: relative;\n z-index: 2;\n background: #fff;\n border-radius: 100px;\n border: 1px solid #edefef;\n }\n\n i {\n width: 2px;\n height: 36px;\n background: #7b91b0;\n display: block;\n position: absolute;\n top: 58%;\n transform: translateY(-50%);\n left: 0;\n right: 0;\n margin: 0 auto;\n z-index: 1;\n &:after,\n &::before {\n width: 5px;\n height: 5px;\n display: block;\n background: #7b91b0;\n position: absolute;\n top: -5px;\n content: '';\n border-radius: 100px;\n left: -1px;\n }\n &:after {\n top: auto;\n bottom: -4px;\n }\n }\n`;\n\nexport const StyledWeight = styled.div`\n font-size: 13px;\n color: #e95252;\n`;\nexport const StyledCube = styled(StyledWeight)`\n font-size: 10px;\n`;\n\nexport const Header = styled.th`\n color: #3a3630;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n padding: 11px 15px;\n background: #f0f2f2;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-right: none;\n border-left: none;\n text-align: left;\n`;\n\nexport const Back = styled.div`\n border-radius: 20px;\n border: 1px solid var(--contextual-blue, #6396e5);\n box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);\n color: #6396e5;\n align-content: center;\n padding: 4px 12px;\n height: 28px;\n cursor: pointer;\n &:hover {\n background-color: #89b8ff;\n color: white;\n }\n`;\n\nexport const Remove = styled.div`\n border-radius: 20px;\n border: 1px solid rgba(233, 82, 82, 0.5);\n box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);\n color: #e95252;\n align-content: center;\n padding: 4px 12px;\n height: 28px;\n cursor: pointer;\n &:hover {\n background-color: #ff7b7b;\n color: white;\n }\n`;\n\nexport const Buttons = styled.div`\n display: flex;\n flex-direction: row;\n gap: 10px;\n white-space: nowrap;\n align-items: center;\n`;\nexport const EmptyDataContainer = styled.div`\n display: flex;\n justify-content: center;\n`;\n\nexport const ClearAll = styled.div`\n border-radius: 20px;\n border: 1px solid #edebe8;\n background: #fff;\n display: flex;\n padding: 6px 6px;\n justify-content: center;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n\n &.active {\n background: #313130;\n & > div {\n color: #fff;\n }\n }\n`;\nexport const StyledFilterBtnIcon = styled.div`\n display: flex;\n width: 24px;\n height: 24px;\n justify-content: center;\n align-items: center;\n border-radius: 20px;\n border: 1px solid #e2e0db;\n background: #b2b3b3;\n .cross {\n position: relative;\n &:after {\n display: inline-block;\n content: 'X';\n font-style: normal;\n font-size: 14px;\n color: #000;\n }\n }\n`;\nexport const StyledFilterBtnLabel = styled.div`\n color: #6a7378;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: 16px;\n white-space: nowrap;\n`;\n"],"names":["ColumStyle","styled","GreyBox","StyledTableWrapper","StyledTable","StyledThBase","StyledTdBasic","StyledWeight","EmptyDataContainer","ClearAll","StyledFilterBtnIcon","StyledFilterBtnLabel"],"mappings":";AAEO,MAAMA,IAAaC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQpBC,IAAUD,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASjBE,IAAqBF,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAyB5BG,IAAcH,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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AOM,CAAY;AAAA;AAAA;AAIvBN,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcTA,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeLA,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeNA,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOvB,MAAMO,IAAqBP,EAAO;AAAA;AAAA;AAAA,GAK5BQ,IAAWR,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAkBlBS,IAAsBT,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAoB7BU,IAAuBV,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
1
+ {"version":3,"file":"styles.js","sources":["../../../../../src/components/order-daily-overview/table/table-data/styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const ColumStyle = styled.div`\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: center;\n gap: 7px;\n`;\n\nexport const GreyBox = styled.div`\n display: flex;\n padding: 2px 8px;\n align-items: flex-start;\n gap: 12px;\n border-radius: 6px;\n background: rgba(153, 153, 153, 0.1);\n`;\n\nexport const StyledTableWrapper = styled.div`\n overflow-x: auto;\n max-height: calc(100vh - 360px);\n // padding-top: 10px;\n background: #fff;\n &::-webkit-scrollbar {\n width: 5px;\n border-radius: 100px;\n height: 5px;\n }\n\n &::-webkit-scrollbar-track {\n background: #777;\n border-radius: 100px;\n }\n\n &::-webkit-scrollbar-thumb {\n background: #7b61ff;\n border-radius: 100px;\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background: #7b61ff;\n }\n`;\n\nexport const StyledTable = styled.table`\n border-spacing: 0 4px;\n width: 100%;\n table-layout: fixed;\n\n thead {\n position: sticky;\n top: 0;\n z-index: 10;\n background: #fff;\n box-shadow: 0px 0px 1px #ffffff, 0px -10px 1px #ffffff;\n tr {\n border-radius: 40px;\n border-spacing: 0 4px;\n font-family: 'lato', sans-serif;\n th {\n color: #3a3630;\n font-size: 13px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n padding: 6px 8px;\n background: #f0f2f2;\n border-right: none;\n border-left: none;\n text-align: left;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-width: 1px 0;\n &:first-child {\n border-radius: 100px 0 0 100px;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n }\n &:last-child {\n border-radius: 0px 100px 100px 0;\n border-right: 1px solid rgba(0, 0, 0, 0.08);\n }\n }\n }\n }\n tbody {\n max-height: 400px;\n overflow-y: auto;\n tr {\n td {\n color: #3a3630;\n font-size: 12px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n padding: 5px 8px;\n background: #fff;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-right: none;\n border-left: none;\n word-break: break-word;\n }\n &:nth-child(even) td {\n background: #f6fbff;\n }\n td:first-child {\n border-radius: 100px 0 0 100px;\n border-left: 1px solid rgba(0, 0, 0, 0.08);\n }\n td:last-child {\n border-radius: 0px 100px 100px 0;\n border-right: 1px solid rgba(0, 0, 0, 0.08);\n }\n }\n }\n`;\n\nexport const StyledThBase = styled.th`\n color: #3a3630;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n padding: 11px 15px;\n background: #f0f2f2;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-right: none;\n border-left: none;\n text-align: left;\n`;\n\nexport const StyledTdBasic = styled.td`\n color: #3a3630;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n padding: 15px;\n background: #fff;\n border: 1px solid rgba(0, 0, 0, 0.08);\n border-right: none;\n border-left: none;\n`;\n\nexport const StyledFlex = styled.div`\n display: flex;\n gap: 8px;\n align-items: center;\n em {\n padding-left: 8px;\n border-left: 2px dotted #758588;\n font-style: normal;\n }\n span {\n display: block;\n line-height: 1;\n &:first-child {\n margin-bottom: 5px;\n }\n }\n`;\nexport const StyledRoundedBorder = styled.div`\n border-radius: 30px;\n border: 1px solid #edefef;\n background: #f6fbff;\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nexport const RouteName = styled.div`\n font-weight: 600;\n color: #09f;\n margin-bottom: 6px;\n`;\n\nexport const StyledFlexGap4 = styled.div`\n display: flex;\n gap: 4px;\n /* align-items: center; */\n`;\n\nexport const TomtomName = styled.div`\n color: #29cc6a;\n font-size: 13px;\n font-weight: 600;\n line-height: 24px;\n`;\nexport const StyledLineBreak = styled.div``;\nexport const Weight = styled.div`\n font-size: 10px;\n font-style: normal;\n font-weight: 700;\n line-height: 16px;\n`;\n\nexport const StyledIconCover = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n span {\n margin-top: 4px;\n &.ascending svg path:first-child {\n fill: #000;\n }\n &.descending svg path:last-child {\n fill: #000;\n }\n }\n`;\n\nexport const TomtomCover = styled.div`\n transform: scale(0.5);\n`;\n\nexport const CustomDrop = styled.div`\n background: #fff;\n border-radius: 12px;\n padding: 10px;\n box-shadow: 0px 4px 30px 0px rgba(46, 45, 116, 0.05);\n`;\n\nexport const TableFilterColumn = styled.div`\n display: flex;\n align-items: flex-start;\n flex-direction: column;\n gap: 8px;\n button {\n font-size: 13px;\n }\n .input {\n border-radius: 20px;\n border: 1px solid #d0d5dd;\n input {\n font-size: 13px;\n }\n }\n`;\n\nexport const DropHeading = styled.div`\n color: #6a7378;\n font-size: 13px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n`;\n\nexport const StyledDateRange = styled.div`\n .ant-picker {\n border-radius: 20px;\n }\n input {\n font-size: 13px;\n }\n`;\n\nexport const ActionCover = styled.div`\n border-radius: 30px;\n border: 1px solid #edebe8;\n background: #fff;\n display: flex;\n padding: 5px 6px;\n justify-content: center;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n\n &.active {\n background: #313130;\n & > div {\n color: #fff;\n }\n }\n`;\n\nexport const TableIconCover = styled.div`\n display: flex;\n width: 24px;\n height: 24px;\n justify-content: center;\n align-items: center;\n border-radius: 20px;\n border: 1px solid #e2e0db;\n background: #edebe8;\n`;\n\nexport const Label = styled.div`\n color: #6a7378;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: 16px;\n white-space: nowrap;\n`;\n\nexport const ActionTypeCover = styled.div`\n border-radius: 30px;\n border: 1px solid #edebe8;\n background: #fff;\n display: flex;\n padding: 5px 6px;\n justify-content: center;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n\n &.active {\n background: #313130;\n & > div {\n color: #fff;\n }\n }\n`;\n\nexport const ActionTypeLabel = styled.div`\n color: #6a7378;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: 16px;\n white-space: nowrap;\n`;\n\nexport const Buttons = styled.div`\n display: flex;\n flex-direction: row;\n gap: 10px;\n white-space: nowrap;\n align-items: center;\n`;\nexport const EmptyDataContainer = styled.div`\n display: flex;\n justify-content: center;\n`;\n\nexport const ClearAll = styled.div`\n border-radius: 20px;\n border: 1px solid #edebe8;\n background: #fff;\n display: flex;\n padding: 6px 6px;\n justify-content: center;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n\n &.active {\n background: #313130;\n & > div {\n color: #fff;\n }\n }\n`;\nexport const StyledFilterBtnIcon = styled.div`\n display: flex;\n width: 24px;\n height: 24px;\n justify-content: center;\n align-items: center;\n border-radius: 20px;\n border: 1px solid #e2e0db;\n background: #b2b3b3;\n .cross {\n position: relative;\n &:after {\n display: inline-block;\n content: 'X';\n font-style: normal;\n font-size: 14px;\n color: #000;\n }\n }\n`;\nexport const StyledFilterBtnLabel = styled.div`\n color: #6a7378;\n font-size: 13px;\n font-style: normal;\n font-weight: 400;\n line-height: 16px;\n white-space: nowrap;\n`;\n"],"names":["ColumStyle","styled","GreyBox","StyledTableWrapper","StyledTable","EmptyDataContainer","ClearAll","StyledFilterBtnIcon","StyledFilterBtnLabel"],"mappings":";AAEO,MAAMA,IAAaC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQpBC,IAAUD,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASjBE,IAAqBF,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GA0B5BG,IAAcH,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAuENA,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcNA,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAaVA,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBEA,EAAO;AAAA;AAAA;AAAA;AAAA;A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A;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAoB7BO,IAAuBP,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
@@ -1,39 +1,39 @@
1
1
  import { jsx as t, jsxs as f } from "react/jsx-runtime";
2
2
  import { useMemo as v } from "react";
3
- import l from "styled-components";
3
+ import i from "styled-components";
4
4
  import { PrintMenu as g } from "../../fakedata.js";
5
5
  import { useOrderDetails as _ } from "../../store.js";
6
6
  import { Space as h, Dropdown as b } from "antd";
7
7
  import y from "../../../../assets/icons/ArrowDownIcon.js";
8
8
  import { getBaseEndpoint as w } from "@bjsdistribution/dms-component-library";
9
9
  function T() {
10
- const [n] = _(), s = n?.gsit_order_id, i = v(() => n?.id, [n]), a = () => {
10
+ const [o] = _(), s = o?.gsit_order_id, l = v(() => o?.id, [o]), a = () => {
11
11
  const e = process.env.REACT_APP_PROJECT_ENV, r = process.env.REACT_APP_API_PATH;
12
12
  return r === "https://us.dms.api.bjshomedelivery.com" ? "release_us" : r === "https://development.dms.api.bjshomedelivery.com" ? "development" : r === "https://staging.dms.api.bjshomedelivery.com" ? "staging" : e === "release_uk" ? "release_uk" : e === "release_us" ? "release_us" : e === "staging" ? "staging" : "development";
13
13
  }, d = () => {
14
14
  switch (a()) {
15
15
  case "release_uk":
16
16
  case "release_us":
17
- return "https://us.toolbox.bjshomedelivery.com/api/v1/gsit";
17
+ return "https://us.api.bjshomedelivery.com/v2/orders/labels";
18
18
  case "staging":
19
- return "https://staging.toolbox.bjshomedelivery.com/api/v1/gsit";
19
+ return "https://staging.api.bjshomedelivery.com/v2/orders/labels";
20
20
  default:
21
- return "https://development.toolbox.bjshomedelivery.com/api/v1/gsit";
21
+ return "https://api.development.bjshomedelivery.com/v2/orders/labels";
22
22
  }
23
23
  }, c = (e) => {
24
- const r = e?.toLowerCase()?.replaceAll(" ", ""), o = d();
25
- return s ? r === "returnlabels" ? `${o}/generate_labels?pdf=true&product_type=Return&order_id=${s}` : "" : (console.error("Missing orderId. Cannot generate Return Labels URL."), "");
24
+ const r = e?.toLowerCase()?.replaceAll(" ", ""), n = d();
25
+ return s ? r === "returnlabels" ? `${n}/generate_labels?pdf=true&product_type=Return&order_id=${s}` : "" : (console.error("Missing orderId. Cannot generate Return Labels URL."), "");
26
26
  }, u = (e) => {
27
- const r = e?.value, o = w();
27
+ const r = e?.value, n = w();
28
28
  if (r)
29
29
  if (r === "returncovernote")
30
30
  window.open(
31
- `${o}/orders/return_cover_notes/?order_id=${i}`,
31
+ `${n}/orders/return_cover_notes/?order_id=${l}`,
32
32
  "_blank"
33
33
  );
34
34
  else if (r === "proofofdelivery")
35
35
  window.open(
36
- `${o}/orders/generate_note/?order_id=${i}&output_format=pdf`,
36
+ `${n}/orders/generate_note/?order_id=${l}&output_format=pdf`,
37
37
  "_blank"
38
38
  );
39
39
  else {
@@ -64,7 +64,7 @@ function T() {
64
64
  /* @__PURE__ */ t(y, { fill: "#f0f2f2" })
65
65
  ] }) }) }) });
66
66
  }
67
- const P = l.div``, k = l(h)`
67
+ const P = i.div``, k = i(h)`
68
68
  .ant-space-item {
69
69
  color: #6a7378;
70
70
  text-align: center;
@@ -1 +1 @@
1
- {"version":3,"file":"Print.js","sources":["../../../../../src/components/order-view/general-information/dropdowns/Print.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport styled from 'styled-components';\nimport { PrintMenu } from '../../fakedata';\nimport { useOrderDetails } from '../../store';\nimport { Dropdown, Space } from 'antd';\nimport ArrowDownIcon from '../../../../assets/icons/ArrowDownIcon';\nimport { getBaseEndpoint } from '@bjsdistribution/dms-component-library';\n\nfunction Print() {\n const [orderDetails] = useOrderDetails();\n const gsitId = orderDetails?.gsit_order_id;\n\n const orderId = useMemo(() => {\n return orderDetails?.id;\n }, [orderDetails]);\n\n const getEnvironment = ():\n | 'development'\n | 'release_us'\n | 'release_uk'\n | 'staging' => {\n const projectEnv = process.env.REACT_APP_PROJECT_ENV;\n const apiPath = process.env.REACT_APP_API_PATH;\n\n if (apiPath === 'https://us.dms.api.bjshomedelivery.com') {\n return 'release_us';\n }\n if (apiPath === 'https://development.dms.api.bjshomedelivery.com') {\n return 'development';\n }\n if (apiPath === 'https://staging.dms.api.bjshomedelivery.com') {\n return 'staging';\n }\n\n if (projectEnv === 'release_uk') {\n return 'release_uk';\n }\n if (projectEnv === 'release_us') {\n return 'release_us';\n }\n if (projectEnv === 'staging') {\n return 'staging';\n }\n return 'development';\n };\n\n const getBaseUrl = (): string => {\n const environment = getEnvironment();\n switch (environment) {\n case 'release_uk':\n case 'release_us':\n return 'https://us.toolbox.bjshomedelivery.com/api/v1/gsit';\n case 'staging':\n return 'https://staging.toolbox.bjshomedelivery.com/api/v1/gsit';\n default:\n return 'https://development.toolbox.bjshomedelivery.com/api/v1/gsit';\n }\n };\n\n const getUrl = (option: string) => {\n const val = option?.toLowerCase()?.replaceAll(' ', '');\n const baseUrl = getBaseUrl();\n\n if (!gsitId) {\n console.error('Missing orderId. Cannot generate Return Labels URL.');\n return '';\n }\n if (val === 'returnlabels') {\n return `${baseUrl}/generate_labels?pdf=true&product_type=Return&order_id=${gsitId}`;\n } else {\n return '';\n }\n };\n\n const handleSelectChange = (selectedOption: any) => {\n const selectedValue = selectedOption?.value;\n const baseEndpoint = getBaseEndpoint();\n if (selectedValue) {\n //return\n if (selectedValue === 'returncovernote') {\n window.open(\n `${baseEndpoint}/orders/return_cover_notes/?order_id=${orderId}`,\n '_blank'\n );\n //proof\n } else if (selectedValue === 'proofofdelivery') {\n window.open(\n `${baseEndpoint}/orders/generate_note/?order_id=${orderId}&output_format=pdf`,\n '_blank'\n );\n } else {\n const url = getUrl(selectedValue);\n window.open(url, '_blank');\n }\n }\n };\n\n // const optionToLabelKey: Record<string, keyof typeof orderDetails.labels> = {\n // proofofdelivery: 'deliver',\n // returnlabels: 'return',\n // returncovernote: 'collect',\n // };\n\n // const isOptionDisabled = (optionValue: string) => {\n // const labels = orderDetails?.labels || {};\n // const labelKey = optionToLabelKey[optionValue];\n\n // if (!labelKey) return false;\n // return !labels[labelKey];\n // };\n\n const filteredOptions = PrintMenu?.map((option: any) => ({\n key: option.value,\n label: option.label,\n value: option.value,\n }));\n\n const menuItems = {\n items: filteredOptions?.map((option: any) => {\n // const disabled = isOptionDisabled(option.value);\n\n return {\n key: option.value,\n label: (\n <div\n onClick={e => {\n e.stopPropagation();\n // if (!disabled) {\n handleSelectChange(option);\n // }\n }}\n // style={{\n // color: disabled ? '#bfbfbf' : undefined,\n // cursor: disabled ? 'not-allowed' : 'pointer',\n // }}\n >\n {option.label}\n </div>\n ),\n // disabled,\n };\n }),\n };\n\n return (\n <Container>\n <Dropdown menu={menuItems} trigger={['hover']}>\n <a onClick={e => e.preventDefault()} style={{ cursor: 'pointer' }}>\n <StyledSpace>\n PRINT\n <ArrowDownIcon fill={'#f0f2f2'} />\n </StyledSpace>\n </a>\n </Dropdown>\n </Container>\n );\n}\n\nconst Container = styled.div``;\n\nconst StyledSpace = styled(Space)`\n .ant-space-item {\n color: #6a7378;\n text-align: center;\n font-family: Lato;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n }\n`;\n\nexport default Print;\n"],"names":["Print","orderDetails","useOrderDetails","gsitId","orderId","useMemo","getEnvironment","projectEnv","apiPath","getBaseUrl","getUrl","option","val","baseUrl","handleSelectChange","selectedOption","selectedValue","baseEndpoint","getBaseEndpoint","url","menuItems","PrintMenu","jsx","e","Container","Dropdown","jsxs","StyledSpace","ArrowDownIcon","styled","Space"],"mappings":";;;;;;;;AAQA,SAASA,IAAQ;AACf,QAAM,CAACC,CAAY,IAAIC,EAAA,GACjBC,IAASF,GAAc,eAEvBG,IAAUC,EAAQ,MACfJ,GAAc,IACpB,CAACA,CAAY,CAAC,GAEXK,IAAiB,MAIN;AACf,UAAMC,IAAa,QAAA,IAAY,uBACzBC,IAAU,QAAA,IAAY;AAE5B,WAAIA,MA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;AAAA,UAMC,UAAAA,EAAO;AAAA,QAAA;AAAA,MAAA;AAAA;AAAA,IACV,EAIL;AAAA,EAAA;AAGH,SACE,gBAAAW,EAACE,KACC,4BAACC,GAAA,EAAS,MAAML,GAAW,SAAS,CAAC,OAAO,GAC1C,UAAA,gBAAAE,EAAC,OAAE,SAAS,CAAA,MAAK,EAAE,eAAA,GAAkB,OAAO,EAAE,QAAQ,UAAA,GACpD,UAAA,gBAAAI,EAACC,GAAA,EAAY,UAAA;AAAA,IAAA;AAAA,IAEX,gBAAAL,EAACM,GAAA,EAAc,MAAM,WAAW;AAAA,EAAA,GAClC,EAAA,CACF,EAAA,CACF,GACF;AAEJ;AAEA,MAAMJ,IAAYK,EAAO,OAEnBF,IAAcE,EAAOC,CAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
1
+ {"version":3,"file":"Print.js","sources":["../../../../../src/components/order-view/general-information/dropdowns/Print.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport styled from 'styled-components';\nimport { PrintMenu } from '../../fakedata';\nimport { useOrderDetails } from '../../store';\nimport { Dropdown, Space } from 'antd';\nimport ArrowDownIcon from '../../../../assets/icons/ArrowDownIcon';\nimport { getBaseEndpoint } from '@bjsdistribution/dms-component-library';\n\nfunction Print() {\n const [orderDetails] = useOrderDetails();\n const gsitId = orderDetails?.gsit_order_id;\n\n const orderId = useMemo(() => {\n return orderDetails?.id;\n }, [orderDetails]);\n\n const getEnvironment = ():\n | 'development'\n | 'release_us'\n | 'release_uk'\n | 'staging' => {\n const projectEnv = process.env.REACT_APP_PROJECT_ENV;\n const apiPath = process.env.REACT_APP_API_PATH;\n\n if (apiPath === 'https://us.dms.api.bjshomedelivery.com') {\n return 'release_us';\n }\n if (apiPath === 'https://development.dms.api.bjshomedelivery.com') {\n return 'development';\n }\n if (apiPath === 'https://staging.dms.api.bjshomedelivery.com') {\n return 'staging';\n }\n\n if (projectEnv === 'release_uk') {\n return 'release_uk';\n }\n if (projectEnv === 'release_us') {\n return 'release_us';\n }\n if (projectEnv === 'staging') {\n return 'staging';\n }\n return 'development';\n };\n\n const getBaseUrl = (): string => {\n const environment = getEnvironment();\n switch (environment) {\n case 'release_uk':\n case 'release_us':\n return 'https://us.api.bjshomedelivery.com/v2/orders/labels';\n case 'staging':\n return 'https://staging.api.bjshomedelivery.com/v2/orders/labels';\n default:\n return 'https://api.development.bjshomedelivery.com/v2/orders/labels';\n }\n };\n\n const getUrl = (option: string) => {\n const val = option?.toLowerCase()?.replaceAll(' ', '');\n const baseUrl = getBaseUrl();\n\n if (!gsitId) {\n console.error('Missing orderId. Cannot generate Return Labels URL.');\n return '';\n }\n if (val === 'returnlabels') {\n return `${baseUrl}/generate_labels?pdf=true&product_type=Return&order_id=${gsitId}`;\n } else {\n return '';\n }\n };\n\n const handleSelectChange = (selectedOption: any) => {\n const selectedValue = selectedOption?.value;\n const baseEndpoint = getBaseEndpoint();\n if (selectedValue) {\n //return\n if (selectedValue === 'returncovernote') {\n window.open(\n `${baseEndpoint}/orders/return_cover_notes/?order_id=${orderId}`,\n '_blank'\n );\n //proof\n } else if (selectedValue === 'proofofdelivery') {\n window.open(\n `${baseEndpoint}/orders/generate_note/?order_id=${orderId}&output_format=pdf`,\n '_blank'\n );\n } else {\n const url = getUrl(selectedValue);\n window.open(url, '_blank');\n }\n }\n };\n\n // const optionToLabelKey: Record<string, keyof typeof orderDetails.labels> = {\n // proofofdelivery: 'deliver',\n // returnlabels: 'return',\n // returncovernote: 'collect',\n // };\n\n // const isOptionDisabled = (optionValue: string) => {\n // const labels = orderDetails?.labels || {};\n // const labelKey = optionToLabelKey[optionValue];\n\n // if (!labelKey) return false;\n // return !labels[labelKey];\n // };\n\n const filteredOptions = PrintMenu?.map((option: any) => ({\n key: option.value,\n label: option.label,\n value: option.value,\n }));\n\n const menuItems = {\n items: filteredOptions?.map((option: any) => {\n // const disabled = isOptionDisabled(option.value);\n\n return {\n key: option.value,\n label: (\n <div\n onClick={e => {\n e.stopPropagation();\n // if (!disabled) {\n handleSelectChange(option);\n // }\n }}\n // style={{\n // color: disabled ? '#bfbfbf' : undefined,\n // cursor: disabled ? 'not-allowed' : 'pointer',\n // }}\n >\n {option.label}\n </div>\n ),\n // disabled,\n };\n }),\n };\n\n return (\n <Container>\n <Dropdown menu={menuItems} trigger={['hover']}>\n <a onClick={e => e.preventDefault()} style={{ cursor: 'pointer' }}>\n <StyledSpace>\n PRINT\n <ArrowDownIcon fill={'#f0f2f2'} />\n </StyledSpace>\n </a>\n </Dropdown>\n </Container>\n );\n}\n\nconst Container = styled.div``;\n\nconst StyledSpace = styled(Space)`\n .ant-space-item {\n color: #6a7378;\n text-align: center;\n font-family: Lato;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n }\n`;\n\nexport default Print;\n"],"names":["Print","orderDetails","useOrderDetails","gsitId","orderId","useMemo","getEnvironment","projectEnv","apiPath","getBaseUrl","getUrl","option","val","baseUrl","handleSelectChange","selectedOption","selectedValue","baseEndpoint","getBaseEndpoint","url","menuItems","PrintMenu","jsx","e","Container","Dropdown","jsxs","StyledSpace","ArrowDownIcon","styled","Space"],"mappings":";;;;;;;;AAQA,SAASA,IAAQ;AACf,QAAM,CAACC,CAAY,IAAIC,EAAA,GACjBC,IAASF,GAAc,eAEvBG,IAAUC,EAAQ,MACfJ,GAAc,IACpB,CAACA,CAAY,CAAC,GAEXK,IAAiB,MAIN;AACf,UAAMC,IAAa,QAAA,IAAY,uBACzBC,IAAU,QAAA,IAAY;AAE5B,WAAIA,MAAY,2CACP,eAELA,MAAY,oDACP,gBAELA,MAAY,gDACP,YAGLD,MAAe,eACV,eAELA,MAAe,eACV,eAELA,MAAe,YACV,YAEF;AAAA,EACT,GAEME,IAAa,MAAc;AAE/B,YADoBH,EAAA,GACZ;AAAA,MACN,KAAK;AAAA,MACL,KAAK;AACH,eAAO;AAAA,MACT,KAAK;AACH,eAAO;AAAA,MACT;AACE,eAAO;AAAA,IAAA;AAAA,EAEb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AAI,EAACC,GAAA,EAAY,UAAA;AAAA,IAAA;AAAA,IAEX,gBAAAL,EAACM,GAAA,EAAc,MAAM,WAAW;AAAA,EAAA,GAClC,EAAA,CACF,EAAA,CACF,GACF;AAEJ;AAEA,MAAMJ,IAAYK,EAAO,OAEnBF,IAAcE,EAAOC,CAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
@@ -1,37 +1,38 @@
1
1
  import { jsxs as v, jsx as r } from "react/jsx-runtime";
2
- import { useState as z, useEffect as o, useRef as Gt } from "react";
2
+ import { useState as Z, useEffect as o, useRef as Ut } from "react";
3
3
  import p from "styled-components";
4
- import Tt from "./order-details/index.js";
5
- import Rt from "./notes/index.js";
6
- import xt from "./system-event-logs/expanded-content/index.js";
7
- import bt from "./general-information/index.js";
8
- import wt from "./products-info/index.js";
9
- import Ut from "./order-actions/index.js";
10
- import { useAxios as m, useApiHook as i, DocumentTitle as $t } from "@bjsdistribution/dms-component-library";
11
- import { useOrderId as Nt, useGsitOrderId as Ht, useOrderDetails as Ft, usePrevOrderDetails as kt, useStatusDetails as Kt, useDepotOptions as Vt, useCustomerInfo as jt, useLocationOptions as qt, useOrderProductsResources as zt, useGsitCUstomerId as Jt, useOrderProductId as Yt, useCUstomerId as Zt, useRouteId as Bt, useLiveRecalling as Mt, useGlobalStateHitOrder as Qt, usegetClientData as Wt, useGlobalEscData as Xt, useOrderProductSystemLogs as te } from "./store.js";
12
- import { useLocation as ee } from "react-router-dom";
13
- import { notification as oe, message as J } from "antd";
14
- import se from "./details-filters/DetailsFilters.js";
15
- import { useSubContracterData as re, useIsShowNorthSouth as ae } from "../store.js";
16
- import ie from "./notification/index.js";
17
- import ne from "./order-resources/expanded-content/index.js";
18
- import { useAllOrderStatus as de, setResourcesCall as ce } from "./order-actions/store.js";
19
- import { POSTCODE_LABEL as le } from "../../common/utils.js";
20
- import { getEnvironment as ue } from "./utils.js";
21
- import { useAtom as fe } from "jotai";
22
- function He({ locationloading: Y }) {
23
- oe.config({
4
+ import Nt from "./order-details/index.js";
5
+ import kt from "./notes/index.js";
6
+ import Ht from "./system-event-logs/expanded-content/index.js";
7
+ import Ft from "./general-information/index.js";
8
+ import Kt from "./products-info/index.js";
9
+ import Vt from "./order-actions/index.js";
10
+ import { useAxios as u, useApiHook as i, DocumentTitle as jt } from "@bjsdistribution/dms-component-library";
11
+ import { useOrderId as qt, useGsitOrderId as zt, useOrderDetails as Jt, usePrevOrderDetails as Yt, useStatusDetails as Zt, useDepotOptions as Qt, useCustomerInfo as Bt, useLocationOptions as Mt, useOrderProductsResources as Wt, useGsitCUstomerId as Xt, useOrderProductId as te, useCUstomerId as ee, useRouteId as oe, useLiveRecalling as se, useGlobalStateHitOrder as re, usegetClientData as ae, useGlobalEscData as ne, useEpodImages as ie, skeletonTomTom as de, useOrderProductSystemLogs as ce } from "./store.js";
12
+ import { useLocation as le } from "react-router-dom";
13
+ import { notification as ue, message as Q } from "antd";
14
+ import fe from "./details-filters/DetailsFilters.js";
15
+ import { useSubContracterData as me, useIsShowNorthSouth as pe, useClientPortal as ge } from "../store.js";
16
+ import he from "./notification/index.js";
17
+ import De from "./order-resources/expanded-content/index.js";
18
+ import { useAllOrderStatus as _e, setResourcesCall as Se } from "./order-actions/store.js";
19
+ import { POSTCODE_LABEL as Ie } from "../../common/utils.js";
20
+ import { getEnvironment as Oe } from "./utils.js";
21
+ import Pe from "./toolbox-resources/expanded-content/index.js";
22
+ import { useAtom as B } from "jotai";
23
+ function Qe({ locationloading: M }) {
24
+ ue.config({
24
25
  top: 150
25
26
  });
26
- const [s, y] = Nt(), [Z, G] = Ht(), [n, B] = Ft(), [, M] = kt(), [, g] = z(!1), [, Q] = Kt(), [, T] = Vt(), [R, W] = jt(), [, X] = qt(), [tt, x] = zt(), [h, et] = Jt(), [, ot] = Yt(), [, st] = Zt(), [, rt] = Bt(), [b] = Mt(), [, at] = re(), [w] = Qt(), [, it] = de(), U = n?.id, [$] = fe(ce), [, nt] = Wt(), [, N] = Xt(), [, dt] = ae();
27
+ const [s, y] = qt(), [W, G] = zt(), [a, X] = Jt(), [, tt] = Yt(), [, g] = Z(!1), [, et] = Zt(), [, x] = Qt(), [R, ot] = Bt(), [, st] = Mt(), [rt, b] = Wt(), [h, at] = Xt(), [, nt] = te(), [, it] = ee(), [, dt] = oe(), [$] = se(), [, ct] = me(), [w] = re(), [, lt] = _e(), U = a?.id, [N] = B(Se), [, ut] = ae(), [, k] = ne(), [, ft] = pe(), [, mt] = ie(), [, pt] = B(de), [gt] = ge();
27
28
  o(() => {
28
- it(n?.status_value);
29
- }, [n?.status_value]);
29
+ lt(a?.status_value);
30
+ }, [a?.status_value]);
30
31
  const {
31
32
  data: D,
32
- fetchData: ct,
33
+ fetchData: ht,
33
34
  loading: H
34
- } = m({
35
+ } = u({
35
36
  endpoint: "/events/get/event/",
36
37
  method: "GET",
37
38
  pagination: { page: 1, per_page: 100 },
@@ -43,10 +44,10 @@ function He({ locationloading: Y }) {
43
44
  }
44
45
  ],
45
46
  showLoader: !1
46
- }), S = ee(), [F, lt] = z([]), {
47
- data: ut,
48
- loading: ft,
49
- setShouldPerformAction: mt
47
+ }), _ = le(), [F, Dt] = Z([]), {
48
+ data: _t,
49
+ loading: St,
50
+ setShouldPerformAction: It
50
51
  } = i({
51
52
  endpoint: "orders/",
52
53
  method: "GET",
@@ -54,42 +55,42 @@ function He({ locationloading: Y }) {
54
55
  performAction: !1
55
56
  });
56
57
  o(() => {
57
- const t = new URLSearchParams(S.search);
58
+ const t = new URLSearchParams(_.search);
58
59
  if (t?.toString()) {
59
60
  const e = [];
60
- t?.forEach((a, f) => {
61
- f === "order" ? e.push({
61
+ t?.forEach((n, m) => {
62
+ m === "order" ? e.push({
62
63
  field: "gsit_order_id",
63
64
  op: "=",
64
- value: a
65
+ value: n
65
66
  }) : e.push({
66
- field: f,
67
+ field: m,
67
68
  op: "=",
68
- value: a
69
+ value: n
69
70
  });
70
- }), lt(e), F && (mt(!0), y(ut?.data[0]?.id));
71
+ }), Dt(e), F && (It(!0), y(_t?.data[0]?.id));
71
72
  } else {
72
- const e = S.pathname.split("/");
73
+ const e = _.pathname.split("/");
73
74
  y(e[e?.length - 1]);
74
75
  }
75
- }, [S.search, ft]);
76
+ }, [_.search, St]);
76
77
  const {
77
78
  data: c,
78
- loading: _,
79
- setShouldPerformAction: pt
79
+ loading: S,
80
+ setShouldPerformAction: Ot
80
81
  } = i({
81
82
  endpoint: `orders/${s}`,
82
83
  method: "GET",
83
84
  performAction: !1
84
85
  }), {
85
- data: u,
86
+ data: f,
86
87
  loading: I,
87
- setShouldPerformAction: k
88
+ setShouldPerformAction: K
88
89
  } = i({
89
90
  endpoint: `/orders/get_live_status/${s}`,
90
91
  method: "GET",
91
92
  performAction: !1
92
- }), { data: O, loading: A } = i({
93
+ }), { data: O, loading: P } = i({
93
94
  endpoint: "/depot/",
94
95
  method: "GET",
95
96
  filters: [{ field: "visibility", op: "=", value: !0 }],
@@ -97,15 +98,15 @@ function He({ locationloading: Y }) {
97
98
  pagination: { is_pagination: !1 }
98
99
  });
99
100
  o(() => {
100
- s && (pt(w), k(!b));
101
- }, [s, b, w]), o(() => {
102
- if (g(_), c && c.data) {
101
+ s && (Ot(w), K(!$));
102
+ }, [s, $, w]), o(() => {
103
+ if (g(S), c && c.data) {
103
104
  const t = c?.data;
104
- B(t[0]), st(t[0]?.customer_id), rt(t[0]?.order_routes?.route_id), G(t[0]?.gsit_order_id), ot(t[0]?.id), W({
105
+ X(t[0]), it(t[0]?.customer_id), dt(t[0]?.order_routes?.route_id), G(t[0]?.gsit_order_id), nt(t[0]?.id), ot({
105
106
  recipient_name: t[0]?.order_recipient?.recipient_name ?? null,
106
107
  postcode: t[0]?.order_recipient?.postcode ?? null,
107
108
  return_action: t[0]?.return_action ?? null
108
- }), M(t[0]), c?.data[0]?.gsit_order_id ? localStorage.setItem(
109
+ }), tt(t[0]), c?.data[0]?.gsit_order_id ? localStorage.setItem(
109
110
  "dbSyncAPICall",
110
111
  JSON.stringify({
111
112
  status: !0,
@@ -116,44 +117,44 @@ function He({ locationloading: Y }) {
116
117
  return () => {
117
118
  localStorage.removeItem("dbSyncAPICall");
118
119
  };
119
- }, [_]), o(() => {
120
- if (g(I), u && u.data) {
121
- const t = u?.data;
122
- t && Q(t);
120
+ }, [S]), o(() => {
121
+ if (g(I), f && f.data) {
122
+ const t = f?.data;
123
+ t && et(t);
123
124
  }
124
- }, [I, u]);
125
+ }, [I, f]);
125
126
  const {
126
- fetchData: gt,
127
- loading: ht,
128
- data: P
129
- } = m({
127
+ fetchData: Pt,
128
+ loading: Et,
129
+ data: E
130
+ } = u({
130
131
  endpoint: "/v1/client/list",
131
132
  method: "GET"
132
133
  });
133
134
  o(() => {
134
- s && (gt(), Ot());
135
+ s && (Pt(), yt());
135
136
  }, [s]), o(() => {
136
- if (P && P?.data) {
137
- const t = P?.data;
138
- nt(t);
137
+ if (E && E?.data) {
138
+ const t = E?.data;
139
+ ut(t);
139
140
  }
140
- }, [ht]), o(() => {
141
- if (g(A), O && O.data) {
141
+ }, [Et]), o(() => {
142
+ if (g(P), O && O.data) {
142
143
  const t = O?.data;
143
144
  if (t.length > 0) {
144
- const e = t?.map((a) => ({
145
- label: a.name,
146
- value: a.id
145
+ const e = t?.map((n) => ({
146
+ label: n.name,
147
+ value: n.id
147
148
  }));
148
- T(e);
149
+ x(e);
149
150
  } else
150
- T([]);
151
+ x([]);
151
152
  }
152
- }, [A]);
153
+ }, [P]);
153
154
  const {
154
- data: K,
155
+ data: V,
155
156
  setShouldPerformAction: d,
156
- loading: Dt
157
+ loading: At
157
158
  } = i({
158
159
  endpoint: `/orders/${s}/order_resources/`,
159
160
  method: "GET",
@@ -161,44 +162,63 @@ function He({ locationloading: Y }) {
161
162
  showLoader: !1
162
163
  });
163
164
  o(() => {
164
- s && ($ ? (d(!1), setTimeout(() => {
165
+ s && (N ? (d(!1), setTimeout(() => {
165
166
  d(!0);
166
167
  }, 200)) : d(!0));
167
- }, [s, d, $]), o(() => {
168
+ }, [s, d, N]), o(() => {
168
169
  s && d(!0);
169
170
  }, [s, d]), o(() => {
170
- s && x(K);
171
- }, [K, tt, x]), o(() => () => {
172
- et((t) => ({ ...t, id: void 0 }));
171
+ s && b(V);
172
+ }, [V, rt, b]);
173
+ const {
174
+ data: A,
175
+ loading: j,
176
+ fetchData: Lt
177
+ } = u({
178
+ endpoint: `orders/${s}/epod_resources/?finance=false`,
179
+ method: "GET"
180
+ });
181
+ o(() => {
182
+ s && (Lt(), a?.order_recipient?.postcode != null && J({
183
+ endPointQuery: `?postcode=${a?.order_recipient?.postcode}`
184
+ }));
185
+ }, [s]), o(() => {
186
+ if (A && A?.data) {
187
+ const t = A?.data?.resources;
188
+ mt(t);
189
+ }
190
+ pt(j);
191
+ }, [j]), o(() => () => {
192
+ at((t) => ({ ...t, id: void 0 }));
173
193
  }, []);
174
194
  const {
175
- data: E,
176
- loading: St,
177
- setShouldPerformAction: V
195
+ data: L,
196
+ loading: Ct,
197
+ setShouldPerformAction: q
178
198
  } = i({
179
199
  endpoint: `/return_locations/?customer_id=${h?.id}`,
180
200
  method: "GET",
181
201
  performAction: !1
182
202
  });
183
203
  o(() => {
184
- h?.id ? V(!0) : V(!1);
204
+ h?.id ? q(!0) : q(!1);
185
205
  }, [h]), o(() => {
186
- if (E && E?.data) {
187
- const t = E?.data?.map((e) => ({
206
+ if (L && L?.data) {
207
+ const t = L?.data?.map((e) => ({
188
208
  label: e?.location_name + ", " + e?.postcode,
189
209
  value: e?.token,
190
210
  is_default: e?.is_default === "True"
191
211
  }));
192
- X(t);
212
+ st(t);
193
213
  }
194
- }, [St]);
195
- const [, _t] = te();
214
+ }, [Ct]);
215
+ const [, Tt] = ce();
196
216
  o(() => {
197
- D && D?.data && _t(D?.data);
198
- }, [H]), o(() => (Z && ct(), () => {
217
+ D && D?.data && Tt(D?.data);
218
+ }, [H]), o(() => (W && ht(), () => {
199
219
  G(void 0);
200
220
  }), [U]);
201
- const { data: l, loading: It } = i({
221
+ const { data: l, loading: vt } = i({
202
222
  endpoint: "/sub-contractor/sub_contractor/get/",
203
223
  method: "GET"
204
224
  });
@@ -210,99 +230,100 @@ function He({ locationloading: Y }) {
210
230
  name: e.name
211
231
  })
212
232
  );
213
- at(t);
233
+ ct(t);
214
234
  }
215
- }, [l, l, It]);
235
+ }, [l, l, vt]);
216
236
  const {
217
- data: j,
218
- fetchData: Ot,
219
- loading: At
220
- } = m({
237
+ data: z,
238
+ fetchData: yt,
239
+ loading: Gt
240
+ } = u({
221
241
  endpoint: `/orders/escalations/${s}`,
222
242
  method: "GET"
223
243
  });
224
244
  o(() => {
225
- if (j?.data) {
226
- const e = j?.data?.sort(
227
- (f, yt) => new Date(yt?.created_at).getTime() - new Date(f?.created_at).getTime()
228
- ), a = e != null && e.length > 0;
229
- N(a ? e : []);
245
+ if (z?.data) {
246
+ const e = z?.data?.sort(
247
+ (m, wt) => new Date(wt?.created_at).getTime() - new Date(m?.created_at).getTime()
248
+ ), n = e != null && e.length > 0;
249
+ k(n ? e : []);
230
250
  }
231
- }, [At]);
232
- const Pt = `${R?.recipient_name}, ${R?.postcode}`, L = ue(), { fetchData: Et } = m({
251
+ }, [Gt]);
252
+ const xt = `${R?.recipient_name}, ${R?.postcode}`, C = Oe(), { fetchData: J } = u({
233
253
  endpoint: "v1/orders/customs/postcode/check/",
234
254
  method: "GET"
235
- }), Lt = async () => {
255
+ }), Rt = async () => {
236
256
  try {
237
- const t = await Et({
238
- endPointQuery: `?postcode=${n?.order_recipient?.postcode}`
257
+ const t = await J({
258
+ endPointQuery: `?postcode=${a?.order_recipient?.postcode}`
239
259
  });
240
260
  if (t?.code === 200) {
241
261
  const e = t?.data?.order_customs_postcodes;
242
- dt(e);
262
+ ft(e);
243
263
  } else
244
- J.open({
264
+ Q.open({
245
265
  type: "error",
246
266
  //@ts-ignore
247
267
  content: t?.error || "Something went wrong"
248
268
  });
249
269
  } catch {
250
- J.open({
270
+ Q.open({
251
271
  type: "error",
252
- content: `Failed to check ${le.toLowerCase()}. Please try again.`
272
+ content: `Failed to check ${Ie.toLowerCase()}. Please try again.`
253
273
  });
254
274
  }
255
- }, C = {
275
+ }, T = {
256
276
  UK: /\b(?:[A-Za-z][A-HJ-Ya-hj-y]?[0-9][0-9A-Za-z]? ?[0-9][A-Za-z]{2}|[Gg][Ii][Rr] ?0[Aa]{2})\b/,
257
277
  IRISH: /^(?:^[AC-FHKNPRTV-Y][0-9]{2}|D6W)[ -]?[0-9AC-FHKNPRTV-Y]{4}$/,
258
278
  US: /^\d{5}(-\d{4})?$/
259
- }, Ct = L === "development" || L === "staging" || L === "release_uk", vt = (t) => Ct ? C.UK.test(t) || C.IRISH.test(t) : C.US.test(t), q = Gt(!1);
279
+ }, bt = C === "development" || C === "staging" || C === "release_uk", $t = (t) => bt ? T.UK.test(t) || T.IRISH.test(t) : T.US.test(t), Y = Ut(!1);
260
280
  return o(() => {
261
- const t = n?.order_recipient?.postcode?.trim();
262
- t && vt(t) && !q.current && (q.current = !0, Lt());
263
- }, [n?.order_recipient?.postcode]), /* @__PURE__ */ v(me, { children: [
264
- /* @__PURE__ */ r($t, { title: Pt }),
265
- /* @__PURE__ */ r(bt, { statusDataLoading: I }),
266
- /* @__PURE__ */ r(se, {}),
267
- /* @__PURE__ */ r(ie, {}),
281
+ const t = a?.order_recipient?.postcode?.trim();
282
+ t && $t(t) && !Y.current && (Y.current = !0, Rt());
283
+ }, [a?.order_recipient?.postcode]), /* @__PURE__ */ v(Ee, { children: [
284
+ /* @__PURE__ */ r(jt, { title: xt }),
285
+ /* @__PURE__ */ r(Ft, { statusDataLoading: I }),
286
+ /* @__PURE__ */ r(fe, {}),
287
+ /* @__PURE__ */ r(he, {}),
268
288
  /* @__PURE__ */ r(
269
- Tt,
289
+ Nt,
270
290
  {
271
- orderLoading: _,
272
- depotDataLoading: A
291
+ orderLoading: S,
292
+ depotDataLoading: P
273
293
  }
274
294
  ),
275
- /* @__PURE__ */ r(wt, { locationloading: Y }),
276
- /* @__PURE__ */ v(pe, { children: [
277
- /* @__PURE__ */ r(ge, { children: /* @__PURE__ */ r(Rt, {}) }),
278
- /* @__PURE__ */ v(he, { children: [
279
- /* @__PURE__ */ r(ne, { loading: Dt }),
280
- /* @__PURE__ */ r(xt, { loading: H })
295
+ /* @__PURE__ */ r(Kt, { locationloading: M }),
296
+ /* @__PURE__ */ v(Ae, { children: [
297
+ /* @__PURE__ */ r(Le, { children: /* @__PURE__ */ r(kt, {}) }),
298
+ /* @__PURE__ */ v(Ce, { children: [
299
+ /* @__PURE__ */ r(De, { loading: At }),
300
+ !gt && /* @__PURE__ */ r(Pe, {}),
301
+ /* @__PURE__ */ r(Ht, { loading: H })
281
302
  ] })
282
303
  ] }),
283
- /* @__PURE__ */ r(Ut, {})
304
+ /* @__PURE__ */ r(Vt, {})
284
305
  ] });
285
306
  }
286
- const me = p.div`
307
+ const Ee = p.div`
287
308
  display: flex;
288
309
  flex-direction: column;
289
310
  gap: 10px;
290
311
  padding-bottom: 30px;
291
- `, pe = p.div`
312
+ `, Ae = p.div`
292
313
  display: flex;
293
314
  gap: 15px;
294
315
  @media (max-width: 1024px) {
295
316
  display: contents;
296
317
  }
297
- `, ge = p.div`
318
+ `, Le = p.div`
298
319
  flex: 1;
299
- `, he = p.div`
320
+ `, Ce = p.div`
300
321
  flex: 1;
301
322
  display: flex;
302
323
  flex-direction: column;
303
324
  gap: 15px;
304
325
  `;
305
326
  export {
306
- He as default
327
+ Qe as default
307
328
  };
308
329
  //# sourceMappingURL=index.js.map