@salesgenterp/ui-components 0.4.468 → 0.4.469
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/index.js +23 -4
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +23 -4
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2858,9 +2858,19 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
2858
2858
|
});
|
|
2859
2859
|
};
|
|
2860
2860
|
var onDateChange = function onDateChange(data) {
|
|
2861
|
+
var startDate = moment(data === null || data === void 0 ? void 0 : data.startDate).startOf('day');
|
|
2862
|
+
var endDate = moment(data === null || data === void 0 ? void 0 : data.endDate).endOf('day');
|
|
2863
|
+
var newDates = {
|
|
2864
|
+
startDate: getUTCTime({
|
|
2865
|
+
time: startDate
|
|
2866
|
+
}),
|
|
2867
|
+
endDate: getUTCTime({
|
|
2868
|
+
time: endDate
|
|
2869
|
+
})
|
|
2870
|
+
};
|
|
2861
2871
|
setSelectDates(function (prev) {
|
|
2862
2872
|
var _extends2;
|
|
2863
|
-
return _extends({}, prev, (_extends2 = {}, _extends2[value === 0 ? 'recentInvoices' : 'salesOrders'] =
|
|
2873
|
+
return _extends({}, prev, (_extends2 = {}, _extends2[value === 0 ? 'recentInvoices' : 'salesOrders'] = newDates, _extends2));
|
|
2864
2874
|
});
|
|
2865
2875
|
setTriggerTableData(getRandomString());
|
|
2866
2876
|
};
|
|
@@ -7330,9 +7340,10 @@ var CardRow = function CardRow(_ref) {
|
|
|
7330
7340
|
setQuantity(row === null || row === void 0 ? void 0 : row.quantity);
|
|
7331
7341
|
}, [row]);
|
|
7332
7342
|
var onChangeQuantity = function onChangeQuantity(product) {
|
|
7333
|
-
handleIncrementDecrement(product, product);
|
|
7334
7343
|
if ((product === null || product === void 0 ? void 0 : product.quantity) <= 0 || (product === null || product === void 0 ? void 0 : product.availableQuantity) <= 0) {
|
|
7335
7344
|
return handleRemoveProduct(product);
|
|
7345
|
+
} else {
|
|
7346
|
+
handleIncrementDecrement(product, product);
|
|
7336
7347
|
}
|
|
7337
7348
|
};
|
|
7338
7349
|
var onChangeInput = function onChangeInput(e) {
|
|
@@ -13151,6 +13162,14 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
|
|
|
13151
13162
|
React.useEffect(function () {
|
|
13152
13163
|
(function () {
|
|
13153
13164
|
try {
|
|
13165
|
+
var _cartData$cartLineIte;
|
|
13166
|
+
var isQuantityZero = cartData === null || cartData === void 0 ? void 0 : (_cartData$cartLineIte = cartData.cartLineItemDtoList) === null || _cartData$cartLineIte === void 0 ? void 0 : _cartData$cartLineIte.some(function (data) {
|
|
13167
|
+
return (data === null || data === void 0 ? void 0 : data.quantity) <= 0;
|
|
13168
|
+
});
|
|
13169
|
+
if (isQuantityZero) {
|
|
13170
|
+
alert('Product quantity must be greater than 0');
|
|
13171
|
+
window.location.replace("/cart");
|
|
13172
|
+
}
|
|
13154
13173
|
var _temp9 = function () {
|
|
13155
13174
|
if (customer) {
|
|
13156
13175
|
return Promise.resolve(taxFunction()).then(function (taxAmount) {
|
|
@@ -13172,8 +13191,8 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
|
|
|
13172
13191
|
var taxFunction = function taxFunction() {
|
|
13173
13192
|
try {
|
|
13174
13193
|
var taxAmount = totalTaxAmount || 0;
|
|
13175
|
-
var _temp11 = function (_cartData$
|
|
13176
|
-
if (shippingAddressId && (cartData === null || cartData === void 0 ? void 0 : (_cartData$
|
|
13194
|
+
var _temp11 = function (_cartData$cartLineIte2) {
|
|
13195
|
+
if (shippingAddressId && (cartData === null || cartData === void 0 ? void 0 : (_cartData$cartLineIte2 = cartData.cartLineItemDtoList) === null || _cartData$cartLineIte2 === void 0 ? void 0 : _cartData$cartLineIte2.length) > 0 && shippingAddressId && (shippingAddressId !== previousShippingAddressIdRef.current || (cartData === null || cartData === void 0 ? void 0 : cartData.cartSubTotal) !== previousSubTotalRef.current)) {
|
|
13177
13196
|
previousShippingAddressIdRef.current = shippingAddressId;
|
|
13178
13197
|
var _temp10 = _catch(function () {
|
|
13179
13198
|
return Promise.resolve(getTaxData({
|