@atomsolution/sdk-merchant 1.5.3 → 1.5.4

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.
@@ -1,6 +1,5 @@
1
1
  type FileUploadTabProps = {
2
2
  taxDeductionMethod: "direct" | "credit";
3
- directTax?: number;
4
3
  };
5
- export default function FileUploadTab({ taxDeductionMethod, directTax, }: FileUploadTabProps): import("react/jsx-runtime").JSX.Element;
4
+ export default function FileUploadTab({ taxDeductionMethod, }: FileUploadTabProps): import("react/jsx-runtime").JSX.Element;
6
5
  export {};
@@ -6,7 +6,6 @@ type Props = {
6
6
  onClose: () => void;
7
7
  onSuccess: (data: CreatedProductResponse) => void;
8
8
  taxDeductionMethod: "direct" | "credit";
9
- directTax?: number;
10
9
  };
11
- declare const CreateProductConfirmModal: ({ checkedProducts, numCheckedProducts, open, onClose, onSuccess, taxDeductionMethod, directTax, }: Props) => import("react/jsx-runtime").JSX.Element;
10
+ declare const CreateProductConfirmModal: ({ checkedProducts, numCheckedProducts, open, onClose, onSuccess, taxDeductionMethod, }: Props) => import("react/jsx-runtime").JSX.Element;
12
11
  export default CreateProductConfirmModal;
@@ -1,6 +1,5 @@
1
1
  type Props = {
2
2
  taxDeductionMethod: "direct" | "credit";
3
- directTax?: number;
4
3
  };
5
- declare const ProductInfoPreview: ({ taxDeductionMethod, directTax }: Props) => import("react/jsx-runtime").JSX.Element;
4
+ declare const ProductInfoPreview: ({ taxDeductionMethod }: Props) => import("react/jsx-runtime").JSX.Element;
6
5
  export default ProductInfoPreview;
@@ -29252,14 +29252,12 @@ const CreateProductConfirmModal = ({
29252
29252
  open,
29253
29253
  onClose,
29254
29254
  onSuccess,
29255
- taxDeductionMethod,
29256
- directTax
29255
+ taxDeductionMethod
29257
29256
  }) => {
29258
29257
  const [loading, setLoading] = React.useState(false);
29259
29258
  const { translate } = useTranslation.useTranslation("batch-create-product");
29260
29259
  const handleCreateProducts = () => __async(exports, null, function* () {
29261
29260
  setLoading(true);
29262
- console.log(checkedProducts);
29263
29261
  const formattedProducts = checkedProducts.map((product) => ({
29264
29262
  code: product.code,
29265
29263
  name: product.name,
@@ -29267,7 +29265,7 @@ const CreateProductConfirmModal = ({
29267
29265
  img: product.img || "",
29268
29266
  unit: product.unit,
29269
29267
  cost: 0,
29270
- tax: taxDeductionMethod == "direct" ? directTax != null ? directTax : 0 : product.tax,
29268
+ tax: taxDeductionMethod == "direct" ? 0 : product.tax,
29271
29269
  status: 0,
29272
29270
  category_names: product.category
29273
29271
  }));
@@ -57925,7 +57923,7 @@ const ProductPreviewTable = ({
57925
57923
  )
57926
57924
  ] });
57927
57925
  };
57928
- const ProductInfoPreview = ({ taxDeductionMethod, directTax }) => {
57926
+ const ProductInfoPreview = ({ taxDeductionMethod }) => {
57929
57927
  const [showCreateProductConfirmModal, setShowCreateProductConfirmModal] = React.useState(false);
57930
57928
  const [showCreateSuccessModal, setShowSuccessModal] = React.useState(false);
57931
57929
  const [checkedProducts, setCheckedProducts] = React.useState([]);
@@ -57986,8 +57984,7 @@ const ProductInfoPreview = ({ taxDeductionMethod, directTax }) => {
57986
57984
  },
57987
57985
  numCheckedProducts: `${checkedProducts.length}/${sheetMappingData.length}`,
57988
57986
  checkedProducts,
57989
- taxDeductionMethod,
57990
- directTax
57987
+ taxDeductionMethod
57991
57988
  }
57992
57989
  ),
57993
57990
  /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
@@ -58002,8 +57999,7 @@ const ProductInfoPreview = ({ taxDeductionMethod, directTax }) => {
58002
57999
  ] });
58003
58000
  };
58004
58001
  function FileUploadTab({
58005
- taxDeductionMethod,
58006
- directTax
58002
+ taxDeductionMethod
58007
58003
  }) {
58008
58004
  const { isCheckData, isMappingData, uploadedFile, setUploadedFile } = useUploadStore();
58009
58005
  const setIsDirty = useWesapApiConfig_store.useUnsavedChangesStore((state) => state.setIsDirty);
@@ -58011,13 +58007,7 @@ function FileUploadTab({
58011
58007
  const { translate } = useTranslation.useTranslation("file");
58012
58008
  const formatSize = (size) => size < 1024 * 1024 ? `${(size / 1024).toFixed(1)} KB` : `${(size / (1024 * 1024)).toFixed(2)} MB`;
58013
58009
  if (isCheckData)
58014
- return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(
58015
- ProductInfoPreview,
58016
- {
58017
- taxDeductionMethod,
58018
- directTax
58019
- }
58020
- );
58010
+ return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(ProductInfoPreview, { taxDeductionMethod });
58021
58011
  return !isMappingData ? /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-8", children: [
58022
58012
  /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-6", children: [
58023
58013
  /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx("p", { className: "text-[#0E121B] font-bold text-[24px] leading-[30px]", children: translate("title") }),