added duplication

This commit is contained in:
2025-03-13 09:24:47 +01:00
parent d6384abed3
commit 42f101b505
8 changed files with 67 additions and 67 deletions

View File

@@ -244,8 +244,10 @@ onBeforeUnmount( function () {
<div>
<div class="box mb-5">
<div class="mb-3">
<h1 class="title is-5" v-if="uuid == undefined"><b>NOWE ZAMÓWIENIE</b></h1>
<h1 class="title is-5" v-else-if="order != undefined"><b>ZAMÓWIENIE NR {{order.MZN_MZNID}}</b></h1>
<h1 class="title is-5" v-if="order == undefined"><b>NOWE ZAMÓWIENIE</b></h1>
<h1 class="title is-5" v-else-if="!ordersStore.orderToClone"><b>ZAMÓWIENIE NR {{order.MZN_MZNID}}</b></h1>
<h1 class="title is-5" v-else-if="ordersStore.orderToClone"><b>DUPLIKACJA ZAMÓWIENIA NR {{order.MZN_MZNID}}</b></h1>
</div>
<div class="field mb-3">
<label class="label is-small">Klient</label>
@@ -402,6 +404,7 @@ onBeforeUnmount( function () {
</select>
</span>
</p>
<!--TODO intesting part -->
<p class="control is-expanded">
<input class="input is-small" type="text" placeholder="Ilość" v-model="product.Quantity" v-bind:class="{ 'is-danger has-background-danger-soft': product.Quantity != undefined && isNaN(Number(product.Quantity)),'is-success has-background-success-soft': product.Quantity != undefined && product.Quantity as unknown as string != '' && !isNaN(Number(product.Quantity))}">
</p>

View File

@@ -58,9 +58,9 @@ const datesWithOrders = computed( ()=>{
return datesWithOrders;
})
function viewOrder(order : Order) {
function viewOrder(order : Order, clone: boolean) {
order.loading = true;
siteControlStore.viewOrder(order.MZN_UUID);
siteControlStore.viewOrder(order.MZN_UUID, clone);
}
async function fetchOrders(event : Event | null) {
@@ -177,7 +177,9 @@ fetchOrders(null);
<div class="column is-6 py-0">{{Number(product.MZE_TwrIlosc).toFixed(2) + " " + product.MZE_TwrJm}}</div>
</template>
</div>
<button class="button is-info is-small is-expanded" :class="{'is-invisible': areOrdersLoading, 'is-loading': order.loading}" @click="viewOrder(order)">Podgląd</button>
<button class="button is-info is-small is-expanded mr-2" :class="{'is-invisible': areOrdersLoading, 'is-loading': order.loading}" @click="viewOrder(order, false)">Podgląd</button>
<button class="button is-info is-small is-expanded mr-2" :class="{'is-invisible': areOrdersLoading}" @click="viewOrder(order, true)">Duplikuj</button>
</div>
</div>
</template>