@bjsdistribution/dms-client-return 0.0.7 → 0.0.9
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/dist/components/order-daily-overview/table/table-data/styles.d.ts +3 -3
- package/dist/components/order-view/view-reminder/reminder-styles.d.ts +2 -2
- package/dist/dms-client-return.cjs.development.js +9 -9
- package/dist/dms-client-return.cjs.development.js.map +1 -1
- package/dist/dms-client-return.cjs.production.min.js +1 -1
- package/dist/dms-client-return.cjs.production.min.js.map +1 -1
- package/dist/dms-client-return.esm.js +10 -10
- package/dist/dms-client-return.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/index.tsx +14 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState, useMemo, useRef, Suspense } from 'react';
|
|
2
|
-
import { useLocation, useParams, NavLink, useNavigate, Routes, Route
|
|
2
|
+
import { useLocation, useParams, NavLink, useNavigate, Routes, Route } from 'react-router-dom';
|
|
3
3
|
import styled, { css, keyframes } from 'styled-components';
|
|
4
4
|
import { Label as Label$h, Input as Input$1, TextArea, FormSection, displayValueOrNA, SelectDropdown, dropdownStyles, RadioButtonGroup as RadioButtonGroup$1, Switch, Button as Button$1, useApiHook, getBaseEndpoint, formatDateTime, Alert, Checkbox as Checkbox$1, SectionHeader, CrossIcon, AntSelect, AntTable, CustomRating, DeleteIcon, CancelationModal, CancelAndCompleteAction, filterDropdownStyles, BackgroundModal as BackgroundModal$1, AntModal } from '@bjsdistribution/dms-component-library';
|
|
5
5
|
import { useAtom, atom } from 'jotai';
|
|
@@ -10641,12 +10641,17 @@ var Container$1f = /*#__PURE__*/styled.div(_templateObject2$1I || (_templateObje
|
|
|
10641
10641
|
var DashBoardWrapper$3 = /*#__PURE__*/styled.section(_templateObject3$Z || (_templateObject3$Z = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n .Tableconatiner {\n border-radius: 12px;\n background: #fff;\n box-shadow: -2px 0px 12px 0px rgba(56, 71, 109, 0.1);\n display: block;\n padding: 15px 20px;\n }\n .headerWrap,\n .tableData,\n .styleCovered {\n transition: all ease 0.5s;\n }\n &.stickyTableHead {\n h2 {\n font-size: 21px;\n }\n .headerWrap {\n height: 84px;\n padding: 10px;\n border-radius: 0px 0px 15px 15px;\n > div {\n position: relative;\n z-index: 10;\n }\n }\n .styleCovered {\n margin-top: -32px;\n width: 67%;\n float: right;\n gap: 5px;\n padding-right: 11px;\n\n li {\n padding: 4px 10px 5px 5px;\n gap: 5px;\n .svgCover {\n width: 30px;\n height: 30px;\n svg {\n height: auto;\n width: 58%;\n }\n }\n .countDigit {\n font-size: 19px;\n }\n }\n .countMess {\n font-size: 13px;\n }\n }\n .dmsBulkFilter {\n min-height: unset;\n gap: 4px;\n > div {\n padding: 4px 12px;\n label {\n font-size: 11px;\n }\n }\n }\n\n .StyledFilterList {\n gap: 4px;\n li {\n height: 29px;\n padding: 3px 8px;\n gap: 4px;\n .StyledFilterBtnIcon {\n width: 20px;\n height: 20px;\n svh {\n width: 10px;\n height: auto;\n }\n }\n .StyledFilterBtnLabel {\n font-size: 13px;\n }\n }\n }\n .StyledFilterLabel {\n padding-left: 10px;\n span {\n font-size: 13px;\n }\n }\n .cardcontainer.tableData {\n max-height: calc(100vh - 310px);\n min-height: calc(100vh - 310px);\n }\n\n .tableData {\n max-height: calc(100vh - 320px);\n min-height: calc(100vh - 320px);\n\n margin-top: 8px;\n thead {\n position: sticky;\n top: 0;\n z-index: 9;\n th {\n font-size: 13px;\n padding: 2px 15px;\n }\n }\n }\n }\n"])));
|
|
10642
10642
|
|
|
10643
10643
|
function ReturnClient() {
|
|
10644
|
+
var _selectedClientString;
|
|
10644
10645
|
var LoadingMessage = function LoadingMessage() {
|
|
10645
10646
|
return React.createElement("div", null, "Loading...");
|
|
10646
10647
|
};
|
|
10647
10648
|
var _useTableName = useTableName(),
|
|
10648
10649
|
selectedClient = _useTableName[0];
|
|
10649
10650
|
var navigate = useNavigate();
|
|
10651
|
+
var selectedClientString = selectedClient == null ? void 0 : selectedClient.replace(/\s+/g, '-');
|
|
10652
|
+
selectedClientString = (_selectedClientString = selectedClientString) == null ? void 0 : _selectedClientString.toLowerCase();
|
|
10653
|
+
console.log(selectedClientString, 'selectedClient');
|
|
10654
|
+
console.log("../return/:" + selectedClientString);
|
|
10650
10655
|
useEffect(function () {
|
|
10651
10656
|
if (!location.pathname.includes('/return')) {
|
|
10652
10657
|
localStorage.removeItem('clientName');
|
|
@@ -10655,10 +10660,10 @@ function ReturnClient() {
|
|
|
10655
10660
|
}, [location.pathname]);
|
|
10656
10661
|
useEffect(function () {
|
|
10657
10662
|
if (selectedClient) {
|
|
10658
|
-
var
|
|
10659
|
-
navigate("
|
|
10663
|
+
var _selectedClientString2 = selectedClient.replace(/\s+/g, '-');
|
|
10664
|
+
navigate("return/" + _selectedClientString2);
|
|
10660
10665
|
}
|
|
10661
|
-
}, [selectedClient
|
|
10666
|
+
}, [selectedClient]);
|
|
10662
10667
|
return React.createElement(Suspense, {
|
|
10663
10668
|
fallback: React.createElement(LoadingMessage, null)
|
|
10664
10669
|
}, React.createElement(Routes, null, React.createElement(Route, {
|
|
@@ -10671,13 +10676,8 @@ function ReturnClient() {
|
|
|
10671
10676
|
path: "order-return/:id",
|
|
10672
10677
|
element: React.createElement(OrderView, null)
|
|
10673
10678
|
}), React.createElement(Route, {
|
|
10674
|
-
path: "
|
|
10679
|
+
path: "return/:name",
|
|
10675
10680
|
element: React.createElement(ReturnTable, null)
|
|
10676
|
-
}), React.createElement(Route, {
|
|
10677
|
-
path: "",
|
|
10678
|
-
element: selectedClient ? React.createElement(Navigate, {
|
|
10679
|
-
to: "returnclient/return/" + selectedClient
|
|
10680
|
-
}) : React.createElement(ReturnMainTable, null)
|
|
10681
10681
|
})));
|
|
10682
10682
|
}
|
|
10683
10683
|
|