diff --git a/backoffice/src/App.vue b/backoffice/src/App.vue index 17ae4b4931b701dd98289a7171ea9e7df585b658..7e46b282f3587d45eb52748f1bdc054f8f6a5331 100644 --- a/backoffice/src/App.vue +++ b/backoffice/src/App.vue @@ -201,6 +201,19 @@ background-color : #384EAA; color: white; } + .main-button:hover:disabled { + border: 1px solid #384EAA; + background-color : #BDBADE; + color: black; + } + .main-button-primary { + background-color : #384EAA; + color: white; + } + .main-button-primary:hover { + background-color : #0D0850; + color: white; + } .loading-gif { padding-top: 8rem; } diff --git a/backoffice/src/components/Accueil.vue b/backoffice/src/components/Accueil.vue index b2aee149643ea6f5114a4de447cfdc1f216b1d2f..a98e4aa0f0757dc1e28e4459ab88828d289f55c2 100644 --- a/backoffice/src/components/Accueil.vue +++ b/backoffice/src/components/Accueil.vue @@ -12,29 +12,36 @@
-
+
-
-
-
-
Modification(s) de la règle {{ selected_rule }} ({{ Object.keys(selected_modification_list).length }})
- -
-
-
Toutes les modifications ({{ Object.keys(modification_list).length }})
-
    -
  • {{ modification.title }}
  • -
+
+
+
+
+
Modification(s) de la règle en cours de validation {{ selected_rule }} ({{ Object.keys(selected_modification_list).length }})
+ +
+
+
Toutes les modifications en cours de validation ({{ Object.keys(modification_list).length }})
+ +
+
+ loading... +
@@ -54,6 +61,7 @@ selected_modification_list: {}, selected_rule: '', test:0, + isLoading: true, } }, beforeMount: function() { @@ -65,9 +73,11 @@ .get('/source/modified') .then(response => { this.modification_list = response.body; + this.isLoading = false; return true; }, response => { if(response.status == 500) this.modification_list = {}; + this.isLoading = false; return false; }) }, diff --git a/backoffice/src/components/Financements.vue b/backoffice/src/components/Financements.vue index ab0102a18e95afded0b3f88d85ce0b21336234d7..38050598b96b40aba11deae8b6138be928f384c8 100644 --- a/backoffice/src/components/Financements.vue +++ b/backoffice/src/components/Financements.vue @@ -13,7 +13,7 @@
- +
diff --git a/backoffice/src/components/Modification.vue b/backoffice/src/components/Modification.vue index bde7c3fe671c830a3b00c5a85f5a2a943c93888b..be31d0add8e9d25f3e8fc5ad1dadcf127c269de7 100644 --- a/backoffice/src/components/Modification.vue +++ b/backoffice/src/components/Modification.vue @@ -53,7 +53,8 @@ 'tag-file-renamed': 'RENOMMÉ', 'tag-file-added': 'AJOUTÉ', 'file-summary-wrapper': '
Fichiers modifiés ({{filesNumber}})cachershow
    {{{files}}}
', - 'generic-wrapper': '
{{{content}}}
' + 'generic-wrapper': '
{{{content}}}
', + 'file-summary-line':'
  • {{>fileIcon}}{{fileName}}{{addedLines}}{{deletedLines}}
  • ' } }); }, diff --git a/backoffice/src/components/Referentiel.vue b/backoffice/src/components/Referentiel.vue index b57b561e7df799d80fce32af6c6803f839b7f6c8..688d79afdcf640cf51d529f3450bcbafab3bc2e5 100644 --- a/backoffice/src/components/Referentiel.vue +++ b/backoffice/src/components/Referentiel.vue @@ -78,14 +78,14 @@ }, printRulePath: function () { var path = ""; - var printpath = "("; + var printpath = ""; if(this.windowLocationHash.split('#').length -1 > 1) { for(var i=1; i <= this.windowLocationHash.split('#').length -1; i++) { if (this.windowLocationHash.split('#').pop() == 'modified') return ""; path += "#"+ this.windowLocationHash.split('#')[i]; - if (i == this.windowLocationHash.split('#').length - 1) printpath += "" + this.windowLocationHash.split('#')[i] + "" - else printpath += "" + this.windowLocationHash.split('#')[i] + " > "; - } return printpath+")"; + if (i == this.windowLocationHash.split('#').length - 1) printpath += "" + this.windowLocationHash.split('#')[i] + "" + else printpath += "" + this.windowLocationHash.split('#')[i] + " > "; + } return printpath; } else return ""; }, rulePath: function () { diff --git a/backoffice/src/components/Rule.vue b/backoffice/src/components/Rule.vue index 30d5bfcc3195041b6bc385d688b3d5cde35df998..3e0ff3345cc1b109ad1306905ef1c1bbd8b1423f 100644 --- a/backoffice/src/components/Rule.vue +++ b/backoffice/src/components/Rule.vue @@ -7,11 +7,16 @@
    {{ displayedName }}
    - ({{ this.modification_count }} modifications en cours) +
    + Retour à la liste +
    +
    + ({{ this.modification_count }} modifications en cours) +

    Modification de la règle

    - +
    @@ -32,15 +37,15 @@
    -
    -
    - -
    -
    - -
    -
    +
    +
    + +
    +
    + +
    +
    @@ -51,7 +56,7 @@
    - +
    @@ -65,7 +70,7 @@ Ce champ est obligatoire
    * Champs obligatoires
    @@ -75,7 +80,7 @@ Ce champ est obligatoire * Champ obligatoire @@ -105,6 +110,8 @@ props: ['name', 'data', 'path', 'printRulePath', 'rulePath'], data: function(){ return { + windowLocationHash: '', + modifiedHashFlag: decodeURI(window.location.hash).split('#').pop() == "modified", isLoading: true, ruleData: this.data, modification_list: [], @@ -126,11 +133,13 @@ }, } }, - beforeMount: function() { + created: function() { this.loadInProgressModification(); - if (decodeURI(window.location.hash).split('#').pop() == "modified") { - this.displayModification(); - } + this.updateLayout(); + + window.addEventListener('popstate', () => { + this.updateLayout(); + }) }, computed: { displayedName: function () { @@ -147,6 +156,17 @@ }, }, methods: { + updateLayout: function() { + this.windowLocationHash = decodeURI(window.location.hash); + this.modifiedHashFlag = decodeURI(window.location.hash).split('#').pop() == "modified"; + if (this.modifiedHashFlag) { + this.currentRuleName = decodeURI(window.location.hash).split('#')[1]; + this.displayModification(); + } else { + this.currentRuleName = decodeURI(window.location.hash).split('#').pop(); + this.viewModification = false; + } + }, loadInProgressModification: function () { this.$http .get('/source/modified?branch='+encodeURIComponent(this.displayedName)) @@ -210,7 +230,6 @@ }; }, save: function() { - console.log('test'); this.ruleData = this.content if (this.comment == '') { this.error_flags.noResume = true; @@ -302,7 +321,12 @@ return root; }, displayModification: function () { - this.viewModification = !this.viewModification; + this.viewModification = true; + this.$parent.collapsed = true; + this.isEditMode = false; + }, + displayList: function () { + this.viewModification = false; this.$parent.collapsed = true; this.isEditMode = false; } diff --git a/backoffice/vue.config.js b/backoffice/vue.config.js index bc2029e92187d6126f94e8fbd3c094589f0aa599..c4c8647951f6b3455f32c330e2844156ffe19a9e 100644 --- a/backoffice/vue.config.js +++ b/backoffice/vue.config.js @@ -2,6 +2,6 @@ module.exports = { publicPath: "/0.7/explorer/", assetsDir: "src/assets/", devServer: { - proxy: 'https://trefle.beta.pole-emploi.fr/0.6/' + proxy: 'https://trefle.beta.pole-emploi.fr/0.7/' } }