diff --git a/client/modules.yml b/client/modules.yml index 95ce80525..f71f90ae6 100644 --- a/client/modules.yml +++ b/client/modules.yml @@ -6,3 +6,4 @@ locator: [] production: [] salix: [] route: [] +ticket: [] diff --git a/client/spliting.js b/client/spliting.js index 9d472675f..d5f641029 100644 --- a/client/spliting.js +++ b/client/spliting.js @@ -8,5 +8,7 @@ export default { locator: cb => require.ensure([], () => cb(require('locator'))), item: - cb => require.ensure([], () => cb(require('item'))) + cb => require.ensure([], () => cb(require('item'))), + ticket: + cb => require.ensure([], () => cb(require('ticket'))) }; diff --git a/client/ticket/index.js b/client/ticket/index.js new file mode 100644 index 000000000..dc559e2d9 --- /dev/null +++ b/client/ticket/index.js @@ -0,0 +1 @@ +export * from './src/ticket'; diff --git a/client/ticket/routes.json b/client/ticket/routes.json new file mode 100644 index 000000000..8fd9b65f5 --- /dev/null +++ b/client/ticket/routes.json @@ -0,0 +1,14 @@ +{ + "module": "ticket", + "name": "Tickets", + "icon": "receipt", + "validations": false, + "routes": [ + { + "url": "/tickets", + "state": "tickets", + "component": "vn-ticket-index", + "acl": ["developer"] + } + ] +} \ No newline at end of file diff --git a/client/ticket/src/index/index.html b/client/ticket/src/index/index.html new file mode 100644 index 000000000..51a50474c --- /dev/null +++ b/client/ticket/src/index/index.html @@ -0,0 +1,24 @@ + +
+
+ + + + + + + + + + + +
+
+ + + diff --git a/client/ticket/src/index/index.js b/client/ticket/src/index/index.js new file mode 100644 index 000000000..bc514194c --- /dev/null +++ b/client/ticket/src/index/index.js @@ -0,0 +1,14 @@ +import ngModule from '../module'; +import './item'; + +export default class Controller { + search(index) { + index.accept(); + } +} +Controller.$inject = []; + +ngModule.component('vnTicketIndex', { + template: require('./index.html'), + controller: Controller +}); diff --git a/client/ticket/src/index/item.html b/client/ticket/src/index/item.html new file mode 100644 index 000000000..eed354bff --- /dev/null +++ b/client/ticket/src/index/item.html @@ -0,0 +1,17 @@ + + + +
{{::$ctrl.ticket.name}}
+
Id {{::$ctrl.ticket.id}}
+
+ + + + +
+
diff --git a/client/ticket/src/index/item.js b/client/ticket/src/index/item.js new file mode 100644 index 000000000..c48d773f1 --- /dev/null +++ b/client/ticket/src/index/item.js @@ -0,0 +1,20 @@ +import ngModule from '../module'; + +class Controller { + onClick(event) { + if (event.defaultPrevented) + event.stopImmediatePropagation(); + } + + preview(event) { + event.preventDefault(); + } +} + +ngModule.component('vnTicketItem', { + controller: Controller, + template: require('./item.html'), + bindings: { + ticket: '<' + } +}); diff --git a/client/ticket/src/index/style.scss b/client/ticket/src/index/style.scss new file mode 100644 index 000000000..eb363a9a7 --- /dev/null +++ b/client/ticket/src/index/style.scss @@ -0,0 +1,3 @@ +vn-ticket-item { + display: block; +} \ No newline at end of file diff --git a/client/ticket/src/locale/en.yml b/client/ticket/src/locale/en.yml new file mode 100644 index 000000000..1f272d420 --- /dev/null +++ b/client/ticket/src/locale/en.yml @@ -0,0 +1 @@ +Tickets: Tickets \ No newline at end of file diff --git a/client/ticket/src/locale/es.yml b/client/ticket/src/locale/es.yml new file mode 100644 index 000000000..1f272d420 --- /dev/null +++ b/client/ticket/src/locale/es.yml @@ -0,0 +1 @@ +Tickets: Tickets \ No newline at end of file diff --git a/client/ticket/src/module.js b/client/ticket/src/module.js new file mode 100644 index 000000000..9a852e647 --- /dev/null +++ b/client/ticket/src/module.js @@ -0,0 +1,5 @@ +import {ng} from 'vendor'; +import 'core'; + +const ngModule = ng.module('ticket', ['vnCore']); +export default ngModule; diff --git a/client/ticket/src/ticket.js b/client/ticket/src/ticket.js new file mode 100644 index 000000000..c7b861d2c --- /dev/null +++ b/client/ticket/src/ticket.js @@ -0,0 +1,4 @@ +export * from './module'; + +import './index/index'; +