@lancom/shared 0.0.121 → 0.0.122
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/assets/js/api/admin.js +7 -4
- package/package.json +1 -1
- package/store/product.js +5 -1
package/assets/js/api/admin.js
CHANGED
|
@@ -28,6 +28,9 @@ export default {
|
|
|
28
28
|
removeShop(id) {
|
|
29
29
|
return _delete(`admin/shops/${id}`);
|
|
30
30
|
},
|
|
31
|
+
fetchOrders(params) {
|
|
32
|
+
return _get(`admin/orders`, params);
|
|
33
|
+
},
|
|
31
34
|
fetchOrderById(id, params) {
|
|
32
35
|
return _get(`admin/order/${id}`, params);
|
|
33
36
|
},
|
|
@@ -73,8 +76,8 @@ export default {
|
|
|
73
76
|
createOrderWoTask(orderId, task) {
|
|
74
77
|
return _post(`admin/order/${orderId}/wo-tasks`, task);
|
|
75
78
|
},
|
|
76
|
-
fetchPages() {
|
|
77
|
-
return _get('admin/pages');
|
|
79
|
+
fetchPages(params) {
|
|
80
|
+
return _get('admin/pages', params);
|
|
78
81
|
},
|
|
79
82
|
fetchPageById(id) {
|
|
80
83
|
return _get(`admin/pages/${id}`);
|
|
@@ -217,8 +220,8 @@ export default {
|
|
|
217
220
|
removeReview(id) {
|
|
218
221
|
return _delete(`admin/reviews/${id}`);
|
|
219
222
|
},
|
|
220
|
-
fetchQuotes() {
|
|
221
|
-
return _get('admin/quotes');
|
|
223
|
+
fetchQuotes(params) {
|
|
224
|
+
return _get('admin/quotes', params);
|
|
222
225
|
},
|
|
223
226
|
generateQuotePDF(id, option) {
|
|
224
227
|
return _get(`admin/quotes/${id}/option/${option}/pdf`);
|
package/package.json
CHANGED
package/store/product.js
CHANGED
|
@@ -231,8 +231,12 @@ export const mutations = {
|
|
|
231
231
|
},
|
|
232
232
|
setProductDetails(state, simpleProducts) {
|
|
233
233
|
const { preSetPrint } = state;
|
|
234
|
+
console.log('');
|
|
235
|
+
console.log('setProductDetails: ');
|
|
236
|
+
console.log('simpleProducts1: ', simpleProducts);
|
|
234
237
|
simpleProducts = simpleProducts.filter(sp => !preSetPrint || (preSetPrint.colors || []).includes(sp.color._id) )
|
|
235
238
|
state.productDetails = { simpleProducts };
|
|
239
|
+
console.log('simpleProducts2: ', simpleProducts);
|
|
236
240
|
const availableSizes = [];
|
|
237
241
|
const sizesPerColor = simpleProducts.reduce((map, { color, size }) => {
|
|
238
242
|
if (!map[color.alias]) {
|
|
@@ -278,7 +282,7 @@ export const mutations = {
|
|
|
278
282
|
const colorId = whiteColorId || state.template.colors[0];
|
|
279
283
|
state.template = {
|
|
280
284
|
layers: keepLayers ? state.template.layers : [],
|
|
281
|
-
colors: [colorId],
|
|
285
|
+
colors: colorId ? [colorId] : [],
|
|
282
286
|
simpleProducts: getSimpleProductsByColor(state, colorId)
|
|
283
287
|
};
|
|
284
288
|
state.editableColor = state.availableColors.find(color => color._id === colorId);
|