From 16eeecc84ca9a3e572d95149c7a1dd8092d96d69 Mon Sep 17 00:00:00 2001 From: "Idmar Ramos Jr. (Id)" Date: Sat, 11 Dec 2021 21:26:48 +0100 Subject: [PATCH 01/23] Import modal initial template - HTML template markup - Basic Js file (No interactions yet) - en-us translations - pt-br translations --- app/angular/components/importModelModal.html | 39 ++++++++++++++++++++ app/angular/components/importModelModal.js | 24 ++++++++++++ app/i18n/languages/en.js | 4 ++ app/i18n/languages/pt_BR.js | 5 +++ 4 files changed, 72 insertions(+) create mode 100644 app/angular/components/importModelModal.html create mode 100644 app/angular/components/importModelModal.js diff --git a/app/angular/components/importModelModal.html b/app/angular/components/importModelModal.html new file mode 100644 index 00000000..e3cfe862 --- /dev/null +++ b/app/angular/components/importModelModal.html @@ -0,0 +1,39 @@ + + + + + \ No newline at end of file diff --git a/app/angular/components/importModelModal.js b/app/angular/components/importModelModal.js new file mode 100644 index 00000000..c8f01d0e --- /dev/null +++ b/app/angular/components/importModelModal.js @@ -0,0 +1,24 @@ +import angular from "angular"; +import template from "./ImportModelModal.html"; + +const app = angular.module("app.ImportModelModal", []); + +const Controller = function () { + const $ctrl = this; + $ctrl.submitted = false; + + $ctrl.cancel = () => { + $ctrl.dismiss({ + reason: "cancel", + }); + }; +}; + +export default app.component("importModelModal", { + template: template, + bindings: { + close: "&", + dismiss: "&" + }, + controller: Controller, +}).name; diff --git a/app/i18n/languages/en.js b/app/i18n/languages/en.js index 774744e1..f167b1d2 100644 --- a/app/i18n/languages/en.js +++ b/app/i18n/languages/en.js @@ -95,4 +95,8 @@ export default { 'You have unsaved changes. Are you sure you want to exit without saving?': 'You have unsaved changes. Are you sure you want to exit without saving?', 'Exit without saving': 'Exit without saving', 'Name': 'Name', + 'Import model': 'Import model', + 'File': 'File', + 'Import': 'Import', +//'': '', }; \ No newline at end of file diff --git a/app/i18n/languages/pt_BR.js b/app/i18n/languages/pt_BR.js index b2637755..3b3a15fe 100644 --- a/app/i18n/languages/pt_BR.js +++ b/app/i18n/languages/pt_BR.js @@ -46,6 +46,7 @@ export default { 'Cancel': 'Cancelar', 'Delete': 'Excluir', 'Are you sure you want to delete the model?': 'Tem certeza que deseja excluir a modelagem?', + 'Delete model': 'Deletar modelagem', 'Rename': 'Renomear', 'Close': 'Fechar', 'SQL': 'SQL', @@ -95,4 +96,8 @@ export default { 'You have unsaved changes. Are you sure you want to exit without saving?': 'Você tem alterações não salvas. Tem certeza que deseja sair sem salvar?', 'Exit without saving': 'Sair sem salvar', 'Name': 'Nome', + 'Import model': 'Importar modelo', + 'File': 'Arquivo', + 'Import': 'Importar', + //'': '', }; \ No newline at end of file From 49891f04c07b6473587977350c683aab38bdd987 Mon Sep 17 00:00:00 2001 From: "Idmar Ramos Jr. (Id)" Date: Sat, 11 Dec 2021 21:28:12 +0100 Subject: [PATCH 02/23] Introduce import button to workspace - Add button close to New model - importModal controller --- app/angular/workspace/workspace.html | 1 + app/angular/workspace/workspace.js | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/app/angular/workspace/workspace.html b/app/angular/workspace/workspace.html index 1f57f9f8..63dd06ff 100644 --- a/app/angular/workspace/workspace.html +++ b/app/angular/workspace/workspace.html @@ -21,6 +21,7 @@

{{ 'Models' | translate }}

diff --git a/app/angular/workspace/workspace.js b/app/angular/workspace/workspace.js index 95b9c224..6eb3ea32 100644 --- a/app/angular/workspace/workspace.js +++ b/app/angular/workspace/workspace.js @@ -6,6 +6,7 @@ import modelCreateComponent from "../components/createModelModal"; import modelDuplicatorComponent from "../components/duplicateModelModal"; import modelDeleterComponent from "../components/deleteModelModal"; import modelRenameComponent from "../components/renameModelModal"; +import modelImportComponent from "../components/importModelModal"; const ListController = function ( $state, @@ -81,6 +82,16 @@ const ListController = function ( }); }; + ctrl.importModel = () => { + const modalInstance = $uibModal.open({ + animation: true, + template: '', + }); + modalInstance.result.then((model) => { + console.log('Salvei!') + }); + }; + ctrl.renameModel = (model) => { const modalInstance = $uibModal.open({ animation: true, @@ -149,7 +160,8 @@ export default angular modelCreateComponent, modelDuplicatorComponent, modelDeleterComponent, - modelRenameComponent + modelRenameComponent, + modelImportComponent ]) .component("workspace", { template, From 901d5f6df61b1f9108fb5961c0c572ba4cd86c0d Mon Sep 17 00:00:00 2001 From: "Idmar Ramos Jr. (Id)" Date: Sat, 11 Dec 2021 23:26:21 +0100 Subject: [PATCH 03/23] Add name input to modal upload --- app/angular/components/importModelModal.html | 26 +++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/app/angular/components/importModelModal.html b/app/angular/components/importModelModal.html index e3cfe862..03bad2ed 100644 --- a/app/angular/components/importModelModal.html +++ b/app/angular/components/importModelModal.html @@ -16,18 +16,20 @@ autocomplete="off" /> -
- -
- -
+
+ +
+ +
+
From 505d4113e905da7823b22fa95eb95457483e14c3 Mon Sep 17 00:00:00 2001 From: "Idmar Ramos Jr. (Id)" Date: Sun, 12 Dec 2021 00:17:58 +0100 Subject: [PATCH 04/23] Add .note explanation to import model modal - Add explanation about file type to upload (+ styles) - Add TO Do comment with desired behavior explanation - Add translations --- app/angular/components/importModelModal.html | 3 ++- app/i18n/languages/en.js | 1 + app/i18n/languages/pt_BR.js | 1 + app/sass/form.scss | 8 ++++++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/angular/components/importModelModal.html b/app/angular/components/importModelModal.html index 03bad2ed..2cda6a41 100644 --- a/app/angular/components/importModelModal.html +++ b/app/angular/components/importModelModal.html @@ -15,9 +15,10 @@ data-ng-model="" autocomplete="off" /> +

{{ 'Please select a .BRT file' | translate }}

- +
diff --git a/app/i18n/languages/en.js b/app/i18n/languages/en.js index f167b1d2..6cb21a7d 100644 --- a/app/i18n/languages/en.js +++ b/app/i18n/languages/en.js @@ -98,5 +98,6 @@ export default { 'Import model': 'Import model', 'File': 'File', 'Import': 'Import', + 'Please select a .BRT file': 'Please choose a .BRT file to upload', //'': '', }; \ No newline at end of file diff --git a/app/i18n/languages/pt_BR.js b/app/i18n/languages/pt_BR.js index 3b3a15fe..329ba5de 100644 --- a/app/i18n/languages/pt_BR.js +++ b/app/i18n/languages/pt_BR.js @@ -99,5 +99,6 @@ export default { 'Import model': 'Importar modelo', 'File': 'Arquivo', 'Import': 'Importar', + 'Please select a .BRT file': 'Por favor selecione um arquivo .BRT', //'': '', }; \ No newline at end of file diff --git a/app/sass/form.scss b/app/sass/form.scss index 429b067b..0f8b28c7 100644 --- a/app/sass/form.scss +++ b/app/sass/form.scss @@ -34,6 +34,14 @@ input[type="submit"]:focus { .field {position: relative;} .field:not(:last-child) {margin-bottom: 25px;} +//////////////////////////////////////////////////////////////////////////////// +// .form-group +//////////////////////////////////////////////////////////////////////////////// +.form-group .note { + font-size: 0.9em; + font-style: italic; + margin: 2px 0 0 4px; +} //////////////////////////////////////////////////////////////////////////////// // .columnsList From eeecd850bb78fa08032bdd92d89001a7cf18897a Mon Sep 17 00:00:00 2001 From: "Idmar Ramos Jr. (Id)" Date: Sun, 12 Dec 2021 17:51:35 +0100 Subject: [PATCH 05/23] Remove conflict marks left by mistake MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sorry! my bad 😅 --- app/i18n/languages/en.js | 53 +++------------------------------------- 1 file changed, 4 insertions(+), 49 deletions(-) diff --git a/app/i18n/languages/en.js b/app/i18n/languages/en.js index fe6c04d8..9c9513f2 100644 --- a/app/i18n/languages/en.js +++ b/app/i18n/languages/en.js @@ -41,54 +41,6 @@ export default { 'Generate logical model': 'Generate logical model', 'Next': 'Next', 'New model': 'New model', -<<<<<<< HEAD - 'BR Modelo Web': 'BR Modelo Web', - 'Conceptual': 'Conceptual', - 'Logical': 'Logical', - 'Save': 'Save', - 'This email is not registered yet.': 'This email is not registered yet.', - 'The new password was successfully saved.': 'The new password was successfully saved.', - 'The password must be the same in both fields.': 'The password must be the same in both fields.', - 'The password must contain more than 6 digits.': 'The password must contain more than 6 digits.', - 'Fill the fields in red': 'Fill the fields in red', - 'Password recovery code is invalid, request password recovery again!': 'Password recovery code is invalid, request password recovery again!', - 'This email is not registered yet.': 'This email is not registered yet.', - 'Ops, we had an internal error, please try again later...': 'Ops, we had an internal error, please try again later...', - 'An email with instructions has been sent to EMAIL': 'An email with instructions has been sent to {{email}}', - 'Incorrect login or password': 'Incorrect login or password', - 'Saved successfully!': 'Saved successfully!', - 'The column name cannot be empty!': 'The column name cannot be empty!', - 'Successfully duplicated!': 'Successfully duplicated!', - 'Select the foreign table source!': 'Select the foreign table source!', - '_converted': '_converted', - 'MODEL_NAME (copy)': '{{name}} (copy)', - 'New model name': 'New model name', - 'Conversion Assistant - Specialization': 'Conversion Assistant - Specialization', - 'What do you want to do with inheritance from table TABLE_NAME?': 'What do you want to do with inheritance from table {{table}}?', - 'Use of a table for each entity': 'Use of a table for each entity', - 'Use of a single table for the entire hierarchy': 'Use of a single table for the entire hierarchy', - 'Use of a table for specialized entity(ies) only': 'Use of a table for specialized entity(ies) only', - 'Attention - Conversion Assistant - Specialization': 'Attention - Conversion Assistant - Specialization', - 'It was not possible to perform this conversion because table TABLE_NAME has other connections. Choose another option.': 'It was not possible to perform this conversion because table {{table}} has other connections. Choose another option.', - 'Conversion Assistant: Multivalued Attribute': 'Conversion Assistant: Multivalued Attribute', - 'What do you want to do with multivalued attribute ATTR_NAME of table TABLE_NAME?': 'What do you want to do with multivalued attribute {{attribute}} of table {{table}}?', - 'Conversion Assistant - Relationship (1, n)': 'Conversion Assistant - Relationship (1, n)', - 'What do you want to do with the RELATIONSHIP relationship between the TABLES tables?': 'What do you want to do with the {{relationship}} relationship between the {{tables}} tables?', - 'Create a column in the least cardinality table': 'Create a column in the least cardinality table', - 'Create new table': 'Create new table', - 'Conversion Assistant - Relationship (1, 1)': 'Conversion Assistant - Relationship (1, 1)', - 'Join tables': 'Join tables', - 'Logout': 'Logout', - 'Unsaved changes': 'Unsaved changes', - 'You have unsaved changes. Are you sure you want to exit without saving?': 'You have unsaved changes. Are you sure you want to exit without saving?', - 'Exit without saving': 'Exit without saving', - 'Name': 'Name', - 'Import model': 'Import model', - 'File': 'File', - 'Import': 'Import', - 'Please select a .BRT file': 'Please choose a .BRT file to upload', -//'': '', -======= 'Title': 'Title', 'Model name': 'Model name', 'Cancel': 'Cancel', @@ -144,5 +96,8 @@ export default { 'You have unsaved changes. Are you sure you want to exit without saving?': 'You have unsaved changes. Are you sure you want to exit without saving?', 'Exit without saving': 'Exit without saving', 'Name': 'Name', ->>>>>>> development + 'Import model': 'Import model', + 'File': 'File', + 'Import': 'Import', + 'Please select a .BRT file': 'Please choose a .BRT file to upload', }; \ No newline at end of file From 90059d54aca7b37ff77573917cbee6ff507a4f4f Mon Sep 17 00:00:00 2001 From: "Idmar Ramos Junior (Id)" Date: Sat, 20 Apr 2024 12:16:26 -0300 Subject: [PATCH 06/23] Update Import modal - Remove field "Name" - Replace "file" with URL; - Update / Remove translations; --- app/angular/components/importModelModal.html | 22 ++++---------------- app/i18n/languages/en.js | 8 ++----- app/i18n/languages/pt_BR.js | 4 ++-- 3 files changed, 8 insertions(+), 26 deletions(-) diff --git a/app/angular/components/importModelModal.html b/app/angular/components/importModelModal.html index 2cda6a41..ca2e68b3 100644 --- a/app/angular/components/importModelModal.html +++ b/app/angular/components/importModelModal.html @@ -5,32 +5,18 @@