@isoftdata/svelte-ecommerce 1.0.0-beta.1 → 1.0.0-beta.3

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.
@@ -8,6 +8,7 @@
8
8
  import Checkbox from '@isoftdata/svelte-checkbox'
9
9
  import Button from '@isoftdata/svelte-button'
10
10
  import Select from '@isoftdata/svelte-select'
11
+ import { translate as defaultTranslate, booleanToYesNo as yesNo } from '@isoftdata/utility-string'
11
12
  import type {
12
13
  EbayLocation,
13
14
  EbayPolicy,
@@ -18,7 +19,6 @@
18
19
  } from './utils.js'
19
20
  import EcommerceDefaults from './EcommerceDefaults.svelte'
20
21
 
21
- import { translate as defaultTranslate } from '@isoftdata/utility-string'
22
22
  const { t: translate } = getContext<i18n>('i18next') || { t: defaultTranslate }
23
23
 
24
24
  interface Props {
@@ -180,7 +180,7 @@
180
180
  <td property="storeId">{row.storeId}</td>
181
181
  <td property="name">{row.name}</td>
182
182
  <td property="merchantLocationKey">{row.merchantLocationKey}</td>
183
- <td property="active">{row.active}</td>
183
+ <td property="active">{yesNo(row.active, translate)}</td>
184
184
  </tr>
185
185
  {/snippet}
186
186
  </Table>
@@ -208,41 +208,44 @@
208
208
  {close}
209
209
  >
210
210
  {#if selectedStoreConfigRow}
211
- <div class="card-body">
212
- <Checkbox
213
- label={translate('ecommerce.configuration.activeOnEbay', 'Active on eBay')}
214
- bind:checked={selectedStoreConfigRow.active}
215
- />
216
-
217
- <Select
218
- label={translate('ecommerce.configuration.store', 'Store')}
219
- emptyText="-- {translate('ecommerce.configuration.selectStore', 'Select Store')} --"
220
- bind:value={selectedStoreConfigRow.storeId}
221
- >
222
- {#each availableStores as store}
223
- <option value={store.storeId}>{store.name}</option>
224
- {/each}
225
- </Select>
226
- {#if selectedStoreConfigRow.storeId}
211
+ <Checkbox
212
+ label={translate('ecommerce.configuration.activeOnEbay', 'Active on eBay')}
213
+ bind:checked={selectedStoreConfigRow.active}
214
+ />
215
+ <div class="row mb-2">
216
+ <div class="col-md-6">
227
217
  <Select
228
- label={translate('ecommerce.configuration.ebayLocation', 'Ebay Location')}
229
- emptyText="-- {translate('ecommerce.configuration.selectLocation', 'Select Location')} --"
230
- bind:value={selectedStoreConfigRow.merchantLocationKey}
218
+ label={translate('ecommerce.configuration.itrackStore', 'ITrack Store')}
219
+ emptyText="-- {translate('ecommerce.configuration.selectStore', 'Select Store')} --"
220
+ bind:value={selectedStoreConfigRow.storeId}
231
221
  >
232
- {#each availableLocations as location}
233
- <option value={location.ebayName}>{location.ebayName}</option>
222
+ {#each availableStores as store}
223
+ <option value={store.storeId}>{store.name}</option>
234
224
  {/each}
235
225
  </Select>
236
- {/if}
237
- {#if selectedStoreConfigRow.merchantLocationKey}
238
- <EcommerceDefaults
239
- bind:defaults={selectedStoreConfigRow.defaults}
240
- {ebayPolicyList}
241
- {ecommerceConditionList}
242
- {partnerConfigurationList}
243
- {selectedEcommercePartnerId}
244
- />
245
- {/if}
226
+ </div>
227
+ <div class="col-md-6">
228
+ {#if selectedStoreConfigRow.storeId}
229
+ <Select
230
+ label={translate('ecommerce.configuration.ebayLocation', 'eBay Location')}
231
+ emptyText="-- {translate('ecommerce.configuration.selectLocation', 'Select Location')} --"
232
+ bind:value={selectedStoreConfigRow.merchantLocationKey}
233
+ >
234
+ {#each availableLocations as location}
235
+ <option value={location.ebayName}>{location.ebayName}</option>
236
+ {/each}
237
+ </Select>
238
+ {/if}
239
+ </div>
246
240
  </div>
241
+ {#if selectedStoreConfigRow.merchantLocationKey}
242
+ <EcommerceDefaults
243
+ bind:defaults={selectedStoreConfigRow.defaults}
244
+ {ebayPolicyList}
245
+ {ecommerceConditionList}
246
+ {partnerConfigurationList}
247
+ {selectedEcommercePartnerId}
248
+ />
249
+ {/if}
247
250
  {/if}
248
251
  </Modal>
@@ -121,6 +121,7 @@ export const buildEbayListing = (buildEbayListingInput) => {
121
121
  // Use latest from inventory
122
122
  // TODO: I'll need to check some of these, they may not allow changes on the config screen and inventory.* is the only truth avail
123
123
  listingDetails.quantity = inventoryRow.quantity;
124
+ listingDetails.inventoryId = inventoryRow.inventoryId;
124
125
  listingDetails.storeId = listingDetails.storeId || inventoryRow.storeId;
125
126
  listingDetails.sku = listingDetails.sku || inventoryRow.tagNumber;
126
127
  listingDetails.price = listingDetails.price || inventoryRow.retailPrice || null;
package/package.json CHANGED
@@ -1,6 +1,17 @@
1
1
  {
2
2
  "name": "@isoftdata/svelte-ecommerce",
3
- "version": "1.0.0-beta.1",
3
+ "version": "1.0.0-beta.3",
4
+ "scripts": {
5
+ "dev": "vite dev",
6
+ "build": "vite build && npm run prepack",
7
+ "preview": "vite preview",
8
+ "prepare": "svelte-kit sync || echo ''",
9
+ "prepack": "svelte-kit sync && svelte-package && publint",
10
+ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
11
+ "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
12
+ "lint": "eslint . && prettier --check .",
13
+ "format": "prettier --write ."
14
+ },
4
15
  "files": [
5
16
  "dist",
6
17
  "!dist/**/*.test.*",
@@ -69,14 +80,5 @@
69
80
  "@lukeed/uuid": "2.0.1",
70
81
  "klona": "^2.0.6",
71
82
  "svelte": "^5.23.2"
72
- },
73
- "scripts": {
74
- "dev": "vite dev",
75
- "build": "vite build && npm run prepack",
76
- "preview": "vite preview",
77
- "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
78
- "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
79
- "lint": "eslint . && prettier --check .",
80
- "format": "prettier --write ."
81
83
  }
82
- }
84
+ }