diff --git a/management-webclient/src/components/homepage/AddAttributeForm.vue b/management-webclient/src/components/homepage/AddAttributeForm.vue
new file mode 100644
index 00000000..9e47437c
--- /dev/null
+++ b/management-webclient/src/components/homepage/AddAttributeForm.vue
@@ -0,0 +1,239 @@
+
+
+
+
+
+
+
+
+ Attribute name cannot be empty.
+
+
+
+
+
+
+
+
+ The type of the attribute cannot be empty.
+
+
+
+
+
+
+
+ This field cannot be empty
+
+
+
+
+
+
Add Values for the selected type
+
+
+
+
+
+
+ Key cannot be empty
+
+
+
+
+
+
+
+ Hex value cannot be empty
+
+
+
+
+
+
+
+
+
+
+ Add New Value
+
+
+
+
+
+
+
+
+
+ Add Attribute
+
+
+
+
+
+
+
diff --git a/management-webclient/src/components/homepage/AddProduct.vue b/management-webclient/src/components/homepage/AddProduct.vue
index 59d5258d..2f42df40 100644
--- a/management-webclient/src/components/homepage/AddProduct.vue
+++ b/management-webclient/src/components/homepage/AddProduct.vue
@@ -24,7 +24,7 @@
-
+
@@ -201,7 +201,7 @@
-
+
@@ -258,7 +258,7 @@
id="modal1"
title="Add Attributes"
hide-footer
- size="sm"
+ size="lg"
>
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -481,18 +481,18 @@ import {
Link,
Strike,
Underline,
- History,
+ History
} from 'tiptap-extensions';
export default {
props: {
- data: { required: false, type: Object, default: null },
+ data: { required: false, type: Object, default: null }
},
components: {
ManagePhoto,
EditorContent,
EditorMenuBar,
- CustomAttributes,
+ CustomAttributes
},
created() {
if (this.data != null) {
@@ -517,12 +517,12 @@ export default {
category: {
_id: null,
category: null,
- subcategory: null,
+ subcategory: null
},
store_sku: null,
marked_price: {
amount: 0,
- currency: 'USD',
+ currency: 'USD'
},
active: true,
thumbnailUrls: [
@@ -537,28 +537,27 @@ export default {
],
price: {
amount: 27.99,
- currency: 'USD',
+ currency: 'USD'
},
tariff: null,
weight: {
quantity: 3.2,
- unit: 'LB',
+ unit: 'LB'
},
custom_attributes: {},
customizationOptions: {
- customizations: [],
+ customizations: []
},
- details_html:
- 'A limited-edition illuminating powder with an ultra-smooth formula and radiant finish.',
+ details_html: 'A limited-edition illuminating powder with an ultra-smooth formula and radiant finish.',
colors: [
{ name: 'Black', hexValue: '#000000' },
- { name: 'Brown', hexValue: '#435ADF' },
+ { name: 'Brown', hexValue: '#435ADF' }
],
- sizes: ['XS', 'S', 'M', 'L'],
+ sizes: ['XS', 'S', 'M', 'L']
},
showManagePhoto: false,
- images: null,
+ images: null
};
},
@@ -581,13 +580,13 @@ export default {
new Link(),
new Strike(),
new Underline(),
- new History(),
+ new History()
],
onUpdate: ({ getHTML }) => {
// this.json = getJSON()
this.product.details_html = getHTML();
- },
+ }
});
},
beforeDestroy() {
@@ -599,7 +598,7 @@ export default {
},
...mapGetters({
- tariffCategories: 'adminStore/tariffCategories',
+ tariffCategories: 'adminStore/tariffCategories'
}),
tariffState() {
@@ -625,18 +624,16 @@ export default {
},
categoryState() {
- if (
- this.product.category.category === undefined
- || this.product.category.category == null
- ) { return null; }
+ if (this.product.category.category === undefined || this.product.category.category == null) {
+ return null;
+ }
return this.product.category.category.length > 0;
},
subcategoryState() {
- if (
- this.product.category._id === undefined
- || this.product.category._id == null
- ) { return null; }
+ if (this.product.category._id === undefined || this.product.category._id == null) {
+ return null;
+ }
return this.product.category._id.length > 0;
},
@@ -649,9 +646,7 @@ export default {
},
weightState() {
- return (
- this.product.weight.quantity > 0 && this.product.weight.quantity != null
- );
+ return this.product.weight.quantity > 0 && this.product.weight.quantity != null;
},
unitState() {
@@ -663,13 +658,15 @@ export default {
},
filteredSubcategories() {
- if (this.product.category.category == null) { return _.map(this.refdata.categories, 'subcategory'); }
- const val = this.refdata.categories.filter((item) => {
+ if (this.product.category.category == null) {
+ return _.map(this.refdata.categories, 'subcategory');
+ }
+ const val = this.refdata.categories.filter(item => {
if (item.category === this.product.category.category) return true;
return false;
});
return val;
- },
+ }
},
methods: {
extractColorValues(attribute) {
@@ -726,13 +723,12 @@ export default {
},
async handleAddProduct() {
if (!this.validateForm()) return;
- const totalImages = this.$refs.managephoto.configureParams()
- .numberOfThumbnailAndDetailedImages;
+ const totalImages = this.$refs.managephoto.configureParams().numberOfThumbnailAndDetailedImages;
if (totalImages <= 0) {
this.$notify({
group: 'all',
type: 'warn',
- text: 'You need to upload at least 1 image.',
+ text: 'You need to upload at least 1 image.'
});
return;
}
@@ -750,7 +746,7 @@ export default {
this.$notify({
group: 'all',
type: 'error',
- text: 'There was an error',
+ text: 'There was an error'
});
}
},
@@ -758,13 +754,12 @@ export default {
if (!this.validateForm()) return;
// Check if there are any images.
- const totalImages = this.$refs.managephoto.configureParams()
- .numberOfThumbnailAndDetailedImages;
+ const totalImages = this.$refs.managephoto.configureParams().numberOfThumbnailAndDetailedImages;
if (totalImages <= 0) {
this.$notify({
group: 'all',
type: 'warn',
- text: 'You need to upload at least 1 image.',
+ text: 'You need to upload at least 1 image.'
});
return;
}
@@ -782,18 +777,18 @@ export default {
this.$notify({
group: 'all',
type: 'error',
- text: 'There was an error',
+ text: 'There was an error'
});
}
},
getSubCategory() {
const refState = this.$store.getters['adminStore/allStateData'];
const x = _.find(refState.refDataPayload.product_categories, {
- name: this.product.category,
+ name: this.product.category
}).subcategories;
return x;
- },
- },
+ }
+ }
};
diff --git a/management-webclient/src/components/homepage/AttributeFormRow.vue b/management-webclient/src/components/homepage/AttributeFormRow.vue
deleted file mode 100644
index d7a99bf2..00000000
--- a/management-webclient/src/components/homepage/AttributeFormRow.vue
+++ /dev/null
@@ -1,218 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- This field cannot be empty
-
-
-
-
-
-
-
- This field cannot be empty
-
-
-
-
-
-
- This field cannot be empty
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- This field cannot be empty
-
-
-
-
-
-
- This field cannot be empty
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/management-webclient/src/components/homepage/CustomAttributes.vue b/management-webclient/src/components/homepage/CustomAttributes.vue
index 1b7e8d4d..e10664f5 100644
--- a/management-webclient/src/components/homepage/CustomAttributes.vue
+++ b/management-webclient/src/components/homepage/CustomAttributes.vue
@@ -1,44 +1,59 @@
-
Add a row
-
-
+
+
+
+
+
+ Name
+ Key
+ Type
+ Values
+ Actions
+
+
+
+
+ {{attrib.name}}
+ {{attrib.key}}
+ {{attrib.type}}
+ {{extractColorValues(attrib)}}
+ {{attrib.values ? attrib.values.join(" , ") : ""}}
+
+
+
+
+
+
+
+
Cancel
- Save
+ Save