hiding prices on shipping note for now on
This commit is contained in:
@@ -4,6 +4,10 @@
|
||||
grid-gap: 10px;
|
||||
}
|
||||
|
||||
.warehouse-shipping-note-modal-positions-entry-container.hidePrice {
|
||||
grid-template-columns: 2fr 1fr 1fr;
|
||||
}
|
||||
|
||||
.warehouse-shipping-note-modal-positions-entry-actions, .warehouse-shipping-note-modal-hours-entry-actions {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@@ -257,6 +257,7 @@ Vue.component('warehouse-shipping-note-modal-positions-entry', {
|
||||
data() {
|
||||
return {
|
||||
window: window,
|
||||
isAdmin: false,
|
||||
articleApiUrl: window.TT_CONFIG['BASE_PATH'] + '/WarehouseArticle/autoComplete',
|
||||
articlePacketApiUrl: window.TT_CONFIG['BASE_PATH'] + '/WarehouseArticlePacket/autoComplete',
|
||||
articleId: '',
|
||||
@@ -267,11 +268,11 @@ Vue.component('warehouse-shipping-note-modal-positions-entry', {
|
||||
},
|
||||
//language=Vue
|
||||
template: `
|
||||
<div class="warehouse-shipping-note-modal-positions-entry-container">
|
||||
<div class="warehouse-shipping-note-modal-positions-entry-container" :class="{ 'hidePrice': !isAdmin }">
|
||||
<tt-autocomplete v-model="articleId" :api-url="articleApiUrl" label="Artikel" sm ref="article"/>
|
||||
<!-- <tt-autocomplete v-model="articlePacketId" :api-url="articlePacketApiUrl" label="Artikel Packet" sm/>-->
|
||||
<tt-input v-model="amount" label="Menge" sm/>
|
||||
<tt-input v-model="price" label="Preis" type="number" sm/>
|
||||
<tt-input v-show="isAdmin" v-model="price" label="Preis" type="number" sm/>
|
||||
<div class="warehouse-shipping-note-modal-positions-entry-actions">
|
||||
<button @click="createOrUpdate" class="btn btn-sm btn-primary">Speichern</button>
|
||||
</div>
|
||||
@@ -285,6 +286,7 @@ Vue.component('warehouse-shipping-note-modal-positions-entry', {
|
||||
amount: this.amount,
|
||||
price: parseFloat(this.price) ?? ''
|
||||
}
|
||||
if (isNaN(data.price)) data.price = '';
|
||||
if (!this.articleId && this.$refs.article.displayValue) {
|
||||
data.articleText = this.$refs.article.displayValue;
|
||||
} else if (this.articleId) {
|
||||
@@ -320,6 +322,7 @@ Vue.component('warehouse-shipping-note-modal-positions-view', {
|
||||
data() {
|
||||
return {
|
||||
window: window,
|
||||
isAdmin: false,
|
||||
articleNames: {},
|
||||
articlePacketNames: {},
|
||||
}
|
||||
@@ -332,7 +335,7 @@ Vue.component('warehouse-shipping-note-modal-positions-view', {
|
||||
<tr>
|
||||
<th>Artikel</th>
|
||||
<th>Menge</th>
|
||||
<th>Preis</th>
|
||||
<th v-if="isAdmin">Preis</th>
|
||||
<th>Aktionen</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -345,7 +348,7 @@ Vue.component('warehouse-shipping-note-modal-positions-view', {
|
||||
position.articleText }}
|
||||
</td>
|
||||
<td>{{ position.amount }}</td>
|
||||
<td>{{ (position.price?.toFixed(2)) }} €</td>
|
||||
<td v-if="isAdmin">{{ (position.price?.toFixed(2)) }} €</td>
|
||||
<td>
|
||||
<button class="btn btn-sm btn-danger" @click="$emit('delete', position)">Löschen</button>
|
||||
<button class="btn btn-sm btn-primary" @click="$emit('edit', position)">Bearbeiten</button>
|
||||
|
||||
Reference in New Issue
Block a user