diff --git a/src/components/AlertsIcon.vue b/src/components/AlertsIcon.vue index 3b699ab..5b0a8a6 100644 --- a/src/components/AlertsIcon.vue +++ b/src/components/AlertsIcon.vue @@ -133,7 +133,6 @@ export default { }) .catch(e => { this.$q.loading.hide(); - console.log({ e }); this.notifyError("There was an issue resolving alert"); }); }, diff --git a/src/components/ClientsManager.vue b/src/components/ClientsManager.vue new file mode 100644 index 0000000..b911d29 --- /dev/null +++ b/src/components/ClientsManager.vue @@ -0,0 +1,187 @@ + + + + + + Clients Manager + + + Close + + + + + + + + + + + + + + + + + + Edit + + + + + + Delete + + + + + + + + + Add Site + + + + + + Close + + + + + + {{ props.row.name }} + + + Show Sites + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/CustomField.vue b/src/components/CustomField.vue new file mode 100644 index 0000000..9963a25 --- /dev/null +++ b/src/components/CustomField.vue @@ -0,0 +1,92 @@ + + $emit('input', value)" + :rules="[...validationRules]" + reactive-rules + /> + + $emit('input', value)" + :rules="[...validationRules]" + reactive-rules + /> + + $emit('input', value)" + /> + + $emit('input', value)"> + + + + + + + + + + + + + + + + + + + + + + + $emit('input', value)" + outlined + dense + :options="field.options" + :multiple="field.type === 'multiple'" + :rules="[...validationRules]" + reactive-rules + /> + + + \ No newline at end of file diff --git a/src/components/FileBar.vue b/src/components/FileBar.vue index bda0e3a..620ecc2 100644 --- a/src/components/FileBar.vue +++ b/src/components/FileBar.vue @@ -12,28 +12,11 @@ - - Add Client + + Client - - Add Site - - - - - - - Delete - - - - - - - Delete Client - - - Delete Site + + Site @@ -51,19 +34,6 @@ - - - - - - Edit Clients - - - Edit Sites - - - - @@ -95,6 +65,10 @@ + + + Clients Manager + Script Manager @@ -143,14 +117,6 @@ - - - - - - - - @@ -220,6 +186,7 @@ \ No newline at end of file diff --git a/src/components/modals/clients/DeleteClient.vue b/src/components/modals/clients/DeleteClient.vue new file mode 100644 index 0000000..e1971f7 --- /dev/null +++ b/src/components/modals/clients/DeleteClient.vue @@ -0,0 +1,161 @@ + + + + + Delete {{ object.name }} + + + Close + + + + + + + + + + + + {{ + scope.opt.category + }} + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/modals/clients/SitesForm.vue b/src/components/modals/clients/SitesForm.vue index 0aeb348..41ef8ea 100644 --- a/src/components/modals/clients/SitesForm.vue +++ b/src/components/modals/clients/SitesForm.vue @@ -1,197 +1,195 @@ - - - - {{ modalTitle }} - - - - - - - - - - {}" - /> - - - - - - - - - - - - - - + + + + {{ title }} + + + Close + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/modals/clients/SitesTable.vue b/src/components/modals/clients/SitesTable.vue new file mode 100644 index 0000000..7733132 --- /dev/null +++ b/src/components/modals/clients/SitesTable.vue @@ -0,0 +1,152 @@ + + + + + + Sites for {{ client.name }} + + + Close + + + + + + + + + + + + + + + + + + Edit + + + + + + Delete + + + + + + Close + + + + + + {{ props.row.name }} + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/modals/coresettings/CustomFields.vue b/src/components/modals/coresettings/CustomFields.vue new file mode 100644 index 0000000..cfa8732 --- /dev/null +++ b/src/components/modals/coresettings/CustomFields.vue @@ -0,0 +1,116 @@ + + + + Custom Fields + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/modals/coresettings/CustomFieldsForm.vue b/src/components/modals/coresettings/CustomFieldsForm.vue new file mode 100644 index 0000000..7640a59 --- /dev/null +++ b/src/components/modals/coresettings/CustomFieldsForm.vue @@ -0,0 +1,244 @@ + + + + + {{ title }} + + + Close + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/modals/coresettings/CustomFieldsTable.vue b/src/components/modals/coresettings/CustomFieldsTable.vue new file mode 100644 index 0000000..cd1067a --- /dev/null +++ b/src/components/modals/coresettings/CustomFieldsTable.vue @@ -0,0 +1,136 @@ + + + + + + + + + + + + + Edit + + + + + + Delete + + + + + + Close + + + + + + {{ props.row.name }} + + + + {{ props.row.type }} + + + + {{ props.row.default_value }} + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/modals/coresettings/EditCoreSettings.vue b/src/components/modals/coresettings/EditCoreSettings.vue index f77c875..c1d38e3 100644 --- a/src/components/modals/coresettings/EditCoreSettings.vue +++ b/src/components/modals/coresettings/EditCoreSettings.vue @@ -7,6 +7,7 @@ + @@ -289,10 +290,13 @@ + + + - + import mixins from "@/mixins/mixins"; import ResetPatchPolicy from "@/components/modals/coresettings/ResetPatchPolicy"; +import CustomFields from "@/components/modals/coresettings/CustomFields"; export default { name: "EditCoreSettings", + components: { + CustomFields, + }, mixins: [mixins], data() { return { diff --git a/src/mixins/mixins.js b/src/mixins/mixins.js index 09c7345..25919ed 100644 --- a/src/mixins/mixins.js +++ b/src/mixins/mixins.js @@ -1,4 +1,5 @@ import { Notify, date } from "quasar"; +import axios from 'axios' export function notifySuccessConfig(msg, timeout = 2000) { return { @@ -139,6 +140,23 @@ export default { }, capitalize(string) { return string[0].toUpperCase() + string.substring(1) - } + }, + getCustomFields(model) { + return axios.patch("/core/customfields/", { model: model }) + .catch(e => { + this.notifyError("There was an issue getting Custom Fields") + }) + }, + formatCustomFields(fields, values) { + let tempArray = [] + + for (let field of fields) { + let obj = { value: values[field.name], field: field.id } + tempArray.push(obj) + + } + return tempArray + }, + } }; diff --git a/src/store/index.js b/src/store/index.js index c5c5868..2eb5ea5 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -238,6 +238,7 @@ export default function () { raw: `Site|${site.id}`, header: "generic", icon: "apartment", + client: client.id, server_policy: site.server_policy, workstation_policy: site.workstation_policy, alert_template: site.alert_template diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue index c028a06..556e388 100644 --- a/src/views/Dashboard.vue +++ b/src/views/Dashboard.vue @@ -89,7 +89,7 @@ - + @@ -119,13 +119,13 @@ - + Edit - + @@ -134,6 +134,18 @@ + + + + + Add Site + + @@ -338,24 +350,6 @@ - - - - - - - - @@ -369,7 +363,6 @@