Skip to content

Commit

Permalink
Fixed: removed async from promise, improved logic for optimal code (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
amansinghbais committed May 23, 2024
1 parent a8575ae commit 2ee0820
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/views/AddConfigurations.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<ion-item>
<ion-icon slot="start" :icon="shirtOutline"/>
<ion-select interface="popover" :label="translate('Product Identifier')" v-model="formData.productIdentifierEnumId">
<ion-select-option v-for="identifer in productIdentifiers" :key="identifer.enumId" :value="identifer.enumId">{{ identifer.description }}</ion-select-option>
<ion-select-option v-for="identifier in productIdentifiers" :key="identifier.enumId" :value="identifier.enumId">{{ identifier.description || identifier.enumId }}</ion-select-option>
</ion-select>
</ion-item>

Expand Down
8 changes: 4 additions & 4 deletions src/views/CreateProductStore.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ async function manageConfigurations() {
if(!dbicCountriesCount.value) {
const responses = await Promise.allSettled(selectedCountries.value
.map(async (country: any) => await ProductStoreService.updateDBICCountries({
geoId: country.geoId,
geoIdTo: "DBIC",
geoAssocTypeId: "GROUP_MEMBER"
.map((country: any) => ProductStoreService.updateDBICCountries({
geoId: country.geoId,
geoIdTo: "DBIC",
geoAssocTypeId: "GROUP_MEMBER"
}))
)
Expand Down
2 changes: 1 addition & 1 deletion src/views/ProductStoreDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<ion-item>
<ion-icon :icon="mapOutline" slot="start"/>
<ion-label>{{ translate("Operating in") }}</ion-label>
<ion-label slot="end">{{ dbicCountriesCount > 1 ? translate("countries", {count: dbicCountriesCount}) : translate("country", {count: dbicCountriesCount}) }}</ion-label>
<ion-label slot="end">{{ translate(dbicCountriesCount > 1 || dbicCountriesCount == 0 ? "countries" : "country", {count: dbicCountriesCount}) }}</ion-label>
</ion-item>

<ion-item>
Expand Down

0 comments on commit 2ee0820

Please sign in to comment.