Skip to content

Commit

Permalink
Improved: logic for rendering disconnected, used listingStatus (hotwa…
Browse files Browse the repository at this point in the history
  • Loading branch information
amansinghbais committed Sep 20, 2023
1 parent bc1acac commit c7a650d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/views/catalog-product-details.vue
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,7 @@
<!-- internationalized while preparation -->
<p>{{ listData.listingTimeAndStatus }}</p>
</ion-label>
<ion-label v-if="listData.shopifyShopProductId && listData.status === 'disconnected'" color="medium" slot="end">
<h5>{{ $t('Disconnected') }}</h5>
</ion-label>
<ion-label v-else-if="listData.shopifyShopProductId && listData.status" :color="listData.containsError ? 'danger' : (listData.status === 'inactive' ? 'warning' : 'success')" slot="end">
<ion-label v-if="listData.shopifyShopProductId && listData.status" :color="listData.status === 'disconnected' ? 'medium' : (listData.containsError ? 'danger' : (listData.status === 'inactive' ? 'warning' : 'success'))" slot="end">
<h5>{{ $t(listData.listingStatus) }}</h5>
</ion-label>
<ion-label v-else-if="listData.shopifyShopProductId" color="medium" slot="end">
Expand Down Expand Up @@ -1066,6 +1063,7 @@ export default defineComponent({
}
if (listData.accessScopeEnumId === 'SHOP_NO_ACCESS') {
listData.status = 'disconnected'
listData.listingStatus = 'Disconnected'
} else if (!listData.containsError) {
if (listData.status === 'inactive') {
// showing the job's runTime as listing time, and not showing listing time if not present
Expand Down

0 comments on commit c7a650d

Please sign in to comment.