diff --git a/app/javascript/dashboard/api/attributes.js b/app/javascript/dashboard/api/attributes.js new file mode 100644 index 000000000..c93807837 --- /dev/null +++ b/app/javascript/dashboard/api/attributes.js @@ -0,0 +1,9 @@ +import ApiClient from './ApiClient'; + +class AttributeAPI extends ApiClient { + constructor() { + super('custom_attribute_definitions', { accountScoped: true }); + } +} + +export default new AttributeAPI(); diff --git a/app/javascript/dashboard/i18n/locale/en/attributesMgmt.json b/app/javascript/dashboard/i18n/locale/en/attributesMgmt.json index af8c41e6f..275cdf81d 100644 --- a/app/javascript/dashboard/i18n/locale/en/attributesMgmt.json +++ b/app/javascript/dashboard/i18n/locale/en/attributesMgmt.json @@ -1,6 +1,38 @@ { "ATTRIBUTES_MGMT": { "HEADER": "Attributes", - "HEADER_BTN_TXT": "Add Attribute" + "HEADER_BTN_TXT": "Add Attribute", + "ADD": { + "TITLE": "Add attribute", + "SUBMIT": "Create", + "CANCEL_BUTTON_TEXT": "Cancel", + "FORM": { + "NAME": { + "LABEL": "Display Name", + "PLACEHOLDER": "Enter attribute display name" + }, + "DESC": { + "LABEL": "Description", + "PLACEHOLDER": "Enter attribute description" + }, + "MODEL": { + "LABEL": "Model", + "PLACEHOLDER": "Please select a model", + "ERROR": "Model is required" + }, + "TYPE": { + "LABEL": "Type", + "PLACEHOLDER": "Please select a type", + "ERROR": "Type is required" + }, + "KEY": { + "LABEL": "Key" + } + }, + "API": { + "SUCCESS_MESSAGE": "Attribute added successfully", + "ERROR_MESSAGE": "Could not connect to Woot Server, Please try again later" + } + } } } diff --git a/app/javascript/dashboard/routes/dashboard/settings/attributes/AddAttribute.vue b/app/javascript/dashboard/routes/dashboard/settings/attributes/AddAttribute.vue new file mode 100644 index 000000000..ba00f54b1 --- /dev/null +++ b/app/javascript/dashboard/routes/dashboard/settings/attributes/AddAttribute.vue @@ -0,0 +1,201 @@ +