This commit is contained in:
@@ -8,6 +8,7 @@ import ProductIdentityStep from "@/components/molecules/ProductIdentityStep.vue"
|
||||
import ProviderMappingStep from "@/components/molecules/ProviderMappingStep.vue";
|
||||
import InventoryCopyStep from "@/components/molecules/InventoryCopyStep.vue";
|
||||
import InventoryImagesStep from "@/components/molecules/InventoryImagesStep.vue";
|
||||
import PricingReviewStep from "@/components/molecules/PricingReviewStep.vue";
|
||||
import {
|
||||
createAdminInventory,
|
||||
createAdminProduct,
|
||||
@@ -870,94 +871,26 @@ onMounted(load);
|
||||
Record acquisition
|
||||
</button>
|
||||
</form>
|
||||
<form id="workflow-pricing" class="showcase-panel" @submit.prevent="calculatePricing">
|
||||
<h2 id="pricing-title">Calculate market value</h2>
|
||||
<label class="fixture-label" for="pricing-inventory"
|
||||
>Inventory copy</label
|
||||
>
|
||||
<select
|
||||
id="pricing-inventory"
|
||||
v-model="pricingInventoryId"
|
||||
class="fixture-input"
|
||||
required
|
||||
>
|
||||
<option value="" disabled>Select a copy</option>
|
||||
<option v-for="item in inventory" :key="item.id" :value="item.id">
|
||||
{{ item.id }}
|
||||
</option>
|
||||
</select>
|
||||
<label class="fixture-label" for="pricing-provider">Provider</label>
|
||||
<input
|
||||
id="pricing-provider"
|
||||
v-model="pricingProvider"
|
||||
class="fixture-input"
|
||||
required
|
||||
/>
|
||||
<label class="fixture-label" for="pricing-source"
|
||||
>Source identifier</label
|
||||
>
|
||||
<input
|
||||
id="pricing-source"
|
||||
v-model="pricingSource"
|
||||
class="fixture-input"
|
||||
required
|
||||
/>
|
||||
<label class="fixture-label" for="pricing-price"
|
||||
>Observed price (cents)</label
|
||||
>
|
||||
<input
|
||||
id="pricing-price"
|
||||
v-model="pricingPrice"
|
||||
class="fixture-input"
|
||||
type="number"
|
||||
min="1"
|
||||
required
|
||||
/>
|
||||
<button
|
||||
class="button button--primary"
|
||||
type="submit"
|
||||
:disabled="isSaving"
|
||||
>
|
||||
Add observation and calculate
|
||||
</button>
|
||||
<button
|
||||
class="button button--secondary"
|
||||
type="button"
|
||||
:disabled="isSaving"
|
||||
@click="refreshPricing"
|
||||
>
|
||||
Refresh from provider<span v-if="refreshStatus">
|
||||
({{ refreshStatus }})</span
|
||||
>
|
||||
</button>
|
||||
<label class="fixture-label" for="override-price"
|
||||
>Manual value (cents)</label
|
||||
>
|
||||
<input
|
||||
id="override-price"
|
||||
v-model="overridePrice"
|
||||
class="fixture-input"
|
||||
type="number"
|
||||
min="0"
|
||||
/>
|
||||
<label class="fixture-label" for="override-reason"
|
||||
>Override reason</label
|
||||
>
|
||||
<input
|
||||
id="override-reason"
|
||||
v-model="overrideReason"
|
||||
class="fixture-input"
|
||||
minlength="3"
|
||||
/>
|
||||
<button
|
||||
class="button button--secondary"
|
||||
type="button"
|
||||
:disabled="isSaving"
|
||||
@click="overridePricing"
|
||||
>
|
||||
Save manual value
|
||||
</button>
|
||||
</form>
|
||||
<PricingReviewStep
|
||||
:inventory-item-id="pricingInventoryId"
|
||||
:provider="pricingProvider"
|
||||
:source-identifier="pricingSource"
|
||||
:observed-price="pricingPrice"
|
||||
:override-price="overridePrice"
|
||||
:override-reason="overrideReason"
|
||||
:inventory="inventory"
|
||||
:refresh-status="refreshStatus"
|
||||
:is-saving="isSaving"
|
||||
@update:inventory-item-id="pricingInventoryId = $event"
|
||||
@update:provider="pricingProvider = $event"
|
||||
@update:source-identifier="pricingSource = $event"
|
||||
@update:observed-price="pricingPrice = $event"
|
||||
@update:override-price="overridePrice = $event"
|
||||
@update:override-reason="overrideReason = $event"
|
||||
@calculate="calculatePricing"
|
||||
@refresh="refreshPricing"
|
||||
@override="overridePricing"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<section class="admin-list" aria-labelledby="products-title">
|
||||
|
||||
Reference in New Issue
Block a user