@feedmepos/mf-order-setting 0.0.29 → 0.0.30

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-order-setting",
3
- "version": "0.0.29",
3
+ "version": "0.0.30",
4
4
  "type": "module",
5
5
  "module": "./dist/app.js",
6
6
  "license": "UNLICENSED",
@@ -88,7 +88,7 @@ export const remoteOrderApi = {
88
88
  async syncGrabfoodMenu(merchantId: string): Promise<FdoGrabfoodSettings> {
89
89
  return getData(await deliveryClientInstance('grabfood').get(`/menu-sync/${merchantId}`));
90
90
  },
91
- async startSelfServeFlow(restaurantId: string): Promise<string> {
91
+ async startSelfServeFlow(restaurantId: string): Promise<string|null> {
92
92
  return getData(await deliveryClientInstance('grabfood').get(`/setting/integration-url/${restaurantId}`));
93
93
  },
94
94
 
@@ -118,9 +118,9 @@ async function startSelfServeFlow() {
118
118
 
119
119
  if (!url) {
120
120
  showError(`Failed to get integration url for ${currentRestaurant?.value?._id}`)
121
+ } else {
122
+ window.open(url, '_blank')
121
123
  }
122
-
123
- window.open(url, '_blank')
124
124
  }
125
125
  </script>
126
126
 
@@ -44,12 +44,18 @@
44
44
  />
45
45
  </div>
46
46
  <FmTextField
47
- v-model="group.maxApplicableEffects"
47
+ :model-value="group.maxApplicableEffects"
48
48
  :label="t('order.discountRule.maxTotalUses')"
49
49
  type="number"
50
50
  :rules="maxApplicableEffectsRules"
51
51
  :min="1"
52
52
  :helper-text="t('order.discountRule.maxTotalUsesSublabel')"
53
+ @update:model-value="
54
+ (newValue) => {
55
+ const parsedValue = parseInt(newValue)
56
+ group.maxApplicableEffects = isNaN(parsedValue) ? 1 : parsedValue
57
+ }
58
+ "
53
59
  />
54
60
  </FmCard>
55
61
  <FmCard
@@ -408,7 +414,6 @@ async function _updateDiscountRule(effectGroups: FdoEffectGroup[]) {
408
414
  lastUpdatedAt: lastUpdatedAt.value || ''
409
415
  })
410
416
  applyDiscountRuleSettings(discountRule)
411
- await initSetting()
412
417
  })
413
418
  }
414
419