diff --git a/ui/components/Button.vue b/ui/components/Button.vue new file mode 100644 index 00000000..959d442a --- /dev/null +++ b/ui/components/Button.vue @@ -0,0 +1,9 @@ + + + + + \ No newline at end of file diff --git a/ui/components/Desk.vue b/ui/components/Desk.vue new file mode 100644 index 00000000..f191205c --- /dev/null +++ b/ui/components/Desk.vue @@ -0,0 +1,25 @@ + + + + + + + + + + + diff --git a/ui/components/FeatherIcon.vue b/ui/components/FeatherIcon.vue new file mode 100644 index 00000000..4e6bf12f --- /dev/null +++ b/ui/components/FeatherIcon.vue @@ -0,0 +1,42 @@ + + + + + + diff --git a/ui/components/Form/Form.vue b/ui/components/Form/Form.vue new file mode 100644 index 00000000..102a6ecc --- /dev/null +++ b/ui/components/Form/Form.vue @@ -0,0 +1,108 @@ + + + + + + + + + + + diff --git a/ui/components/Form/FormActions.vue b/ui/components/Form/FormActions.vue new file mode 100644 index 00000000..46b963fc --- /dev/null +++ b/ui/components/Form/FormActions.vue @@ -0,0 +1,11 @@ + + + {{ title || name }} + {{ _('Save') }} + + + diff --git a/ui/components/Form/FormLayout.vue b/ui/components/Form/FormLayout.vue new file mode 100644 index 00000000..b7e57414 --- /dev/null +++ b/ui/components/Form/FormLayout.vue @@ -0,0 +1,87 @@ + + + + + updateDoc(fieldname, value)" + /> + + + + updateDoc(docfield.fieldname, value)" + /> + + + + diff --git a/ui/components/Indicator.vue b/ui/components/Indicator.vue new file mode 100644 index 00000000..23893bbf --- /dev/null +++ b/ui/components/Indicator.vue @@ -0,0 +1,24 @@ + + + + + + diff --git a/ui/components/List/List.vue b/ui/components/List/List.vue new file mode 100644 index 00000000..9c2b851f --- /dev/null +++ b/ui/components/List/List.vue @@ -0,0 +1,104 @@ + + + + + + {{ doc[meta.titleField || 'name'] }} + + + + + + diff --git a/ui/components/List/ListActions.vue b/ui/components/List/ListActions.vue new file mode 100644 index 00000000..9901dea0 --- /dev/null +++ b/ui/components/List/ListActions.vue @@ -0,0 +1,12 @@ + + + {{ doctype }} List + Delete + New + + + diff --git a/ui/components/List/ListItem.vue b/ui/components/List/ListItem.vue new file mode 100644 index 00000000..b874b76f --- /dev/null +++ b/ui/components/List/ListItem.vue @@ -0,0 +1,21 @@ + + + + + + + + + + diff --git a/ui/components/Main.vue b/ui/components/Main.vue new file mode 100644 index 00000000..33e65f91 --- /dev/null +++ b/ui/components/Main.vue @@ -0,0 +1,5 @@ + + + + + diff --git a/ui/components/Modal.vue b/ui/components/Modal.vue new file mode 100644 index 00000000..ad9dbaf7 --- /dev/null +++ b/ui/components/Modal.vue @@ -0,0 +1,70 @@ + + + + + + + {{ title }} + + × + + + + + + + + + + + + + + diff --git a/ui/components/ModelTable.vue b/ui/components/ModelTable.vue new file mode 100644 index 00000000..9fe1360b --- /dev/null +++ b/ui/components/ModelTable.vue @@ -0,0 +1,138 @@ + + + + + Add Row + + + + + diff --git a/ui/components/Navbar.vue b/ui/components/Navbar.vue new file mode 100644 index 00000000..fcf8f81a --- /dev/null +++ b/ui/components/Navbar.vue @@ -0,0 +1,7 @@ + + + + + + + diff --git a/ui/components/NotFound.vue b/ui/components/NotFound.vue new file mode 100644 index 00000000..a842aa42 --- /dev/null +++ b/ui/components/NotFound.vue @@ -0,0 +1,11 @@ + + + 404 + Not Found + + + diff --git a/ui/components/Sidebar.vue b/ui/components/Sidebar.vue new file mode 100644 index 00000000..0afb9800 --- /dev/null +++ b/ui/components/Sidebar.vue @@ -0,0 +1,47 @@ + + + + + TennisMart + + + + + {{ sidebarGroup.title }} + + + + + {{ item.label }} + + + + + + + + + diff --git a/ui/components/controls/Autocomplete.vue b/ui/components/controls/Autocomplete.vue new file mode 100644 index 00000000..b3de9974 --- /dev/null +++ b/ui/components/controls/Autocomplete.vue @@ -0,0 +1,84 @@ + + diff --git a/ui/components/controls/Base.vue b/ui/components/controls/Base.vue new file mode 100644 index 00000000..ac0d7160 --- /dev/null +++ b/ui/components/controls/Base.vue @@ -0,0 +1,103 @@ + diff --git a/ui/components/controls/Check.vue b/ui/components/controls/Check.vue new file mode 100644 index 00000000..6b1ec936 --- /dev/null +++ b/ui/components/controls/Check.vue @@ -0,0 +1,25 @@ + + + + + {{ docfield.label }} + + + + + diff --git a/ui/components/controls/Code.vue b/ui/components/controls/Code.vue new file mode 100644 index 00000000..ddfb049e --- /dev/null +++ b/ui/components/controls/Code.vue @@ -0,0 +1,11 @@ + diff --git a/ui/components/controls/Currency.vue b/ui/components/controls/Currency.vue new file mode 100644 index 00000000..64946d7f --- /dev/null +++ b/ui/components/controls/Currency.vue @@ -0,0 +1,6 @@ + diff --git a/ui/components/controls/Data.vue b/ui/components/controls/Data.vue new file mode 100644 index 00000000..f214e548 --- /dev/null +++ b/ui/components/controls/Data.vue @@ -0,0 +1,8 @@ + diff --git a/ui/components/controls/Date.vue b/ui/components/controls/Date.vue new file mode 100644 index 00000000..d152c830 --- /dev/null +++ b/ui/components/controls/Date.vue @@ -0,0 +1,36 @@ + + + {{ docfield.label }} + + + + + + + + diff --git a/ui/components/controls/DynamicLink.vue b/ui/components/controls/DynamicLink.vue new file mode 100644 index 00000000..eebac5f4 --- /dev/null +++ b/ui/components/controls/DynamicLink.vue @@ -0,0 +1,14 @@ + diff --git a/ui/components/controls/File.vue b/ui/components/controls/File.vue new file mode 100644 index 00000000..ccae4734 --- /dev/null +++ b/ui/components/controls/File.vue @@ -0,0 +1,46 @@ + diff --git a/ui/components/controls/Float.vue b/ui/components/controls/Float.vue new file mode 100644 index 00000000..9a44a3b0 --- /dev/null +++ b/ui/components/controls/Float.vue @@ -0,0 +1,30 @@ + diff --git a/ui/components/controls/FrappeControl.vue b/ui/components/controls/FrappeControl.vue new file mode 100644 index 00000000..db6cb830 --- /dev/null +++ b/ui/components/controls/FrappeControl.vue @@ -0,0 +1,50 @@ + + + + diff --git a/ui/components/controls/Int.vue b/ui/components/controls/Int.vue new file mode 100644 index 00000000..d72358e2 --- /dev/null +++ b/ui/components/controls/Int.vue @@ -0,0 +1,13 @@ + diff --git a/ui/components/controls/Link.vue b/ui/components/controls/Link.vue new file mode 100644 index 00000000..fa74c868 --- /dev/null +++ b/ui/components/controls/Link.vue @@ -0,0 +1,89 @@ + diff --git a/ui/components/controls/Password.vue b/ui/components/controls/Password.vue new file mode 100644 index 00000000..ae0c4fa7 --- /dev/null +++ b/ui/components/controls/Password.vue @@ -0,0 +1,18 @@ + \ No newline at end of file diff --git a/ui/components/controls/Select.vue b/ui/components/controls/Select.vue new file mode 100644 index 00000000..5aceb8eb --- /dev/null +++ b/ui/components/controls/Select.vue @@ -0,0 +1,30 @@ + diff --git a/ui/components/controls/Table.vue b/ui/components/controls/Table.vue new file mode 100644 index 00000000..7f18c2cd --- /dev/null +++ b/ui/components/controls/Table.vue @@ -0,0 +1,26 @@ + + + + + + + diff --git a/ui/components/controls/Text.vue b/ui/components/controls/Text.vue new file mode 100644 index 00000000..46118ca0 --- /dev/null +++ b/ui/components/controls/Text.vue @@ -0,0 +1,23 @@ + diff --git a/ui/pages/ListAndForm.vue b/ui/pages/ListAndForm.vue new file mode 100644 index 00000000..e867c1c2 --- /dev/null +++ b/ui/pages/ListAndForm.vue @@ -0,0 +1,34 @@ + + + + + + + + + + + + diff --git a/ui/pages/Report/ReportFilters.vue b/ui/pages/Report/ReportFilters.vue new file mode 100644 index 00000000..d1595a98 --- /dev/null +++ b/ui/pages/Report/ReportFilters.vue @@ -0,0 +1,43 @@ + + + + + + + diff --git a/ui/pages/Report/index.vue b/ui/pages/Report/index.vue new file mode 100644 index 00000000..8957c836 --- /dev/null +++ b/ui/pages/Report/index.vue @@ -0,0 +1,44 @@ + + + + {{ reportConfig.title }} + + + + + + + + diff --git a/ui/plugins/modal.js b/ui/plugins/modal.js new file mode 100644 index 00000000..c06300f4 --- /dev/null +++ b/ui/plugins/modal.js @@ -0,0 +1,44 @@ +import Observable from 'frappejs/utils/observable'; + +const Bus = new Observable(); + +export default { + // enable use of this.$modal in every component + // this also keeps only one modal in the DOM at any time + // which is the recommended way by bootstrap + install (Vue) { + Vue.prototype.$modal = { + show(options) { + Bus.trigger('showModal', options); + }, + + hide() { + Bus.trigger('hideModal'); + } + } + + Vue.mixin({ + data() { + return { + registered: false, + modalVisible: false, + modalOptions: {} + } + }, + created: function () { + if (this.registered) return; + + Bus.on('showModal', (options = {}) => { + this.modalVisible = true; + this.modalOptions = options; + }); + + Bus.on('hideModal', () => { + this.modalVisible = false; + }); + + this.registered = true; + } + }); + } +} \ No newline at end of file diff --git a/ui/routes/index.js b/ui/routes/index.js new file mode 100644 index 00000000..5c1eef87 --- /dev/null +++ b/ui/routes/index.js @@ -0,0 +1,16 @@ +import ListAndForm from '../pages/ListAndForm'; + +export default [ + { + path: '/list/:doctype', + name: 'List', + component: ListAndForm, + props: true + }, + { + path: '/edit/:doctype/:name', + name: 'Form', + component: ListAndForm, + props: true + } +]; diff --git a/ui/styles/variables.scss b/ui/styles/variables.scss new file mode 100644 index 00000000..367009b9 --- /dev/null +++ b/ui/styles/variables.scss @@ -0,0 +1,2 @@ +@import "~bootstrap/scss/functions"; +@import "~bootstrap/scss/variables"; \ No newline at end of file
Not Found