This commit is contained in:
j3d1 2024-06-15 19:38:20 +02:00
parent 9c3fedc5c3
commit 13430c0f04
4 changed files with 11 additions and 4 deletions

View file

@ -462,7 +462,7 @@ const store = createStore({
}
},
async createShippingCode({commit, state}, code) {
const {data, success} = await http.post('/2/shipping_codes/', {code}, state.user.token);
const {data, success} = await http.post('/2/shipping_codes/', code, state.user.token);
if (data && success) {
commit('setShippingCodes', data);
}

View file

@ -1,7 +1,12 @@
<template>
<div>
<h3>Shipping Codes</h3>
<Table
<ul>
<li v-for="code in shippingCodes" :key="code.code">
{{ code.type }} - {{ code.code }}
</li>
</ul>
<!--Table
:columns="['type', 'code']"
:items="shippingCodes"
:keyName="'code'"
@ -18,7 +23,7 @@
</button>
</div>
</template>
</Table>
</Table-->
<div class="mt-3">
<textarea class="form-control mb-3" rows="5" placeholder="Shipping Code List" v-model="bulk_codes" v-if="bulk"></textarea>
<div class="input-group">