Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved: displayed disconnected shop config on the shopListing tab as 'Disconnected' (#155) #232

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"Copied to clipboard": "Copied to clipboard",
"Corresponding sales orders": "Corresponding sales orders",
"Custom": "Custom",
"Disconnected": "Disconnected",
"Delisting at": "Delisting at {listingTime}",
"Delisting failed at": "Delisting failed at {listingTime}",
"Delisted at": "Delisted at {listingTime}",
Expand Down
15 changes: 8 additions & 7 deletions src/views/catalog-product-details.vue
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@
<!-- internationalized while preparation -->
<p>{{ listData.listingTimeAndStatus }}</p>
</ion-label>
<ion-label v-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 @@ -964,13 +964,11 @@ export default defineComponent({
try {
let payload = {
"inputFields": {
"productStoreId": this.currentEComStore.productStoreId,
"accessScopeEnumId": "SHOP_NO_ACCESS",
'accessScopeEnumId_op': 'notEqual'
"productStoreId": this.currentEComStore.productStoreId
},
"orderBy": "name ASC",
"entityName": "ShopifyShopAndConfig",
"fieldList": ["shopifyConfigId", "shopId", "name"],
"fieldList": ["accessScopeEnumId", "shopifyConfigId", "shopId", "name"],
"viewSize": 20
} as any

Expand Down Expand Up @@ -1057,10 +1055,13 @@ export default defineComponent({
promiseDate: metafieldValue["promise_date"]
}
let listingTime = ''
if(listData.listingTime) {
if (listData.listingTime) {
listingTime = DateTime.fromFormat(listData.listingTime, "MMM dd,yyyy HH:mm:ss").toLocaleString(DateTime.DATETIME_MED);
}
if (!listData.containsError) {
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
listingTime && (listData.listingTimeAndStatus = this.$t("Delisted at", { listingTime }))
Expand Down
Loading