From 5d7a570c3fb917590e4947738765eebf2f72ecec Mon Sep 17 00:00:00 2001 From: carlossa Date: Tue, 11 Jun 2024 12:28:49 +0200 Subject: [PATCH] refs #6897 fix redirection --- back/nodemonConfig.json | 1 + front/module-import.js | 1 + modules/entry/front/index.js | 3 +- modules/entry/front/index/index.html | 85 ---------------------------- modules/entry/front/index/index.js | 14 ----- modules/entry/front/main/index.html | 0 modules/entry/front/main/index.js | 17 ++++++ 7 files changed, 20 insertions(+), 101 deletions(-) delete mode 100644 modules/entry/front/index/index.html delete mode 100644 modules/entry/front/index/index.js create mode 100644 modules/entry/front/main/index.html create mode 100644 modules/entry/front/main/index.js diff --git a/back/nodemonConfig.json b/back/nodemonConfig.json index c468a2f73..9552460bd 100644 --- a/back/nodemonConfig.json +++ b/back/nodemonConfig.json @@ -8,6 +8,7 @@ "modules/account/front/**/*", "modules/claim/front/**/*", "modules/client/front/**/*", + "modules/entry/front/**/*", "modules/invoiceIn/front/**/*", "modules/invoiceOut/front/**/*", "modules/item/front/**/*", diff --git a/front/module-import.js b/front/module-import.js index 85731c72c..22a2747d2 100755 --- a/front/module-import.js +++ b/front/module-import.js @@ -22,5 +22,6 @@ export default function moduleImport(moduleName) { case 'supplier': return import('supplier/front'); case 'shelving': return import('shelving/front'); case 'monitor': return import('monitor/front'); + case 'entry': return import('entry/front'); } } diff --git a/modules/entry/front/index.js b/modules/entry/front/index.js index f4cae889c..a7209a0bd 100644 --- a/modules/entry/front/index.js +++ b/modules/entry/front/index.js @@ -1,4 +1,3 @@ export * from './module'; -import './index/'; - +import './main'; diff --git a/modules/entry/front/index/index.html b/modules/entry/front/index/index.html deleted file mode 100644 index 42177be21..000000000 --- a/modules/entry/front/index/index.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - Id - Landed - Reference - Invoice number - Supplier - Booked - Confirmed - Ordered - - - - - - - - - - - - {{::entry.id}} - - - {{::entry.landed | date:'dd/MM/yyyy'}} - - - {{::entry.reference}} - {{::entry.invoiceNumber}} - {{::entry.supplierName}} - - - - - - - - - - - - - - - - - - -
- - - - - - -
\ No newline at end of file diff --git a/modules/entry/front/index/index.js b/modules/entry/front/index/index.js deleted file mode 100644 index 8635d3fb4..000000000 --- a/modules/entry/front/index/index.js +++ /dev/null @@ -1,14 +0,0 @@ -import ngModule from '../module'; -import Section from 'salix/components/section'; - -export default class Controller extends Section { - preview(entry) { - this.entrySelected = entry; - this.$.summary.show(); - } -} - -ngModule.vnComponent('vnEntryIndex', { - template: require('./index.html'), - controller: Controller -}); diff --git a/modules/entry/front/main/index.html b/modules/entry/front/main/index.html new file mode 100644 index 000000000..e69de29bb diff --git a/modules/entry/front/main/index.js b/modules/entry/front/main/index.js new file mode 100644 index 000000000..de0beced4 --- /dev/null +++ b/modules/entry/front/main/index.js @@ -0,0 +1,17 @@ +import ngModule from '../module'; +import ModuleMain from 'salix/components/module-main'; + +export default class Entry extends ModuleMain { + constructor($element, $) { + super($element, $); + } + async $onInit() { + this.$state.go('home'); + window.location.href = await this.vnApp.getUrl(`entry/`); + } +} + +ngModule.vnComponent('vnEntry', { + controller: Entry, + template: require('./index.html') +});