diff --git a/package.json b/package.json
index ad610e7d..9af93291 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "store-admin",
- "version": "6.0.3",
+ "version": "6.0.4",
"private": true,
"description": "Admin panel for Heseya Store API",
"author": "Heseya",
diff --git a/src/components/modules/orders/ShippingNumberForm.vue b/src/components/modules/orders/ShippingNumberForm.vue
new file mode 100644
index 00000000..0fd3d915
--- /dev/null
+++ b/src/components/modules/orders/ShippingNumberForm.vue
@@ -0,0 +1,137 @@
+
+
+
{{ $t('shippingNumber.title') }}
+
+
+
+ {{ $t('shippingNumber.save') }}
+
+
+
+
+
+
+{
+ "pl": {
+ "shippingNumber": {
+ "title": "Numer listu przewozowego",
+ "templatePlaceholder": "-- Wpisz numer przesyłki --",
+ "save": "Zapisz",
+ "sameAsBefore": "Podany numer przesyłki nie różni się od obecnego",
+ "changed": "Numer przesyłki został zmieniony",
+ "cantChange": "Nie można zmienić numeru przesyłki"
+ }
+ },
+ "en": {
+ "shippingNumber": {
+ "title": "Shipping number",
+ "templatePlaceholder": "-- Enter shipping number --",
+ "save": "Save",
+ "sameAsBefore": "Given shipping number doesn't differ from the present one",
+ "changed": "Shipping number was changed",
+ "cantChange": "Can't change shipping number"
+ }
+ }
+}
+
+
+
+
+
diff --git a/src/services/createStandardPackage.ts b/src/services/createStandardPackage.ts
deleted file mode 100644
index 3cac8f96..00000000
--- a/src/services/createStandardPackage.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/* eslint-disable camelcase */
-import { Order } from '@heseya/store-core'
-import { api } from '@/api'
-
-export const createStandardPackage = async (orderId: string, packageTemplateId: string) => {
- try {
- const { data } = await api.post<{ data: Order }>(`orders/id:${orderId}/shipping-lists`, {
- package_template_id: packageTemplateId,
- })
-
- return {
- success: true,
- shippingNumber: data.data.shipping_number,
- } as const
- } catch (error: any) {
- return {
- success: false,
- error,
- } as const
- }
-}
diff --git a/src/views/orders/view.vue b/src/views/orders/view.vue
index 459bd8ef..333dbfc8 100644
--- a/src/views/orders/view.vue
+++ b/src/views/orders/view.vue
@@ -37,8 +37,15 @@
+
+
+
-
+
@@ -64,6 +71,7 @@ import { Order } from '@heseya/store-core'
import TopNav from '@/components/layout/TopNav.vue'
import Card from '@/components/layout/Card.vue'
import NextPrevButtons from '@/components/modules/orders/NextPrevButtons.vue'
+import ShippingNumberForm from '@/components/modules/orders/ShippingNumberForm.vue'
import OrderSummary from '@/components/modules/orders/Summary.vue'
import StatusInput from '@/components/modules/orders/StatusInput.vue'
@@ -83,6 +91,7 @@ export default defineComponent({
TopNav,
Card,
NextPrevButtons,
+ ShippingNumberForm,
OrderSummary,
StatusInput,
CustomerDetails,
@@ -124,6 +133,11 @@ export default defineComponent({
])
this.isLoading = false
},
+ methods: {
+ onShippingNumberChange(shippingNumber: string) {
+ this.order.shipping_number = shippingNumber
+ },
+ },
})