Skip to content

Commit

Permalink
sort numbers in emolument
Browse files Browse the repository at this point in the history
  • Loading branch information
rufener committed Feb 6, 2024
1 parent 5ffb592 commit 8885999
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,22 +99,24 @@ export default {
// ================================================================================================================================================
async openEmolumentDialog(emolument_affaire_id) {
await this.getEmolument(emolument_affaire_id);
this.getEmolumentAffaireRepartition(emolument_affaire_id).then(response => {
await this.getEmolumentAffaireRepartition(emolument_affaire_id).then(response => {
if (response && response.data) {
this.initFactureRepartition(response.data);
this.updateFactureRepartition();
}
}).catch(err => handleException(err, this));
this.numeros.sort((a, b) => a.emolument_affaire_id === emolument_affaire_id? -1: b.emolument_affaire_id === emolument_affaire_id? 1: a.emolument_affaire_id - b.emolument_affaire_id);
this.showEmolumentsDialog = true;
},
/**
* Cancel formular edition
*/
onCancel() {
async onCancel() {
await this.getEmolumentsGeneral();
this.showEmolumentsDialog = false;
this.getEmolumentsGeneral();
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,17 @@ <h3>Bâtiments</h3>
<h3>Bien-fonds</h3>

<md-table v-model="numeros" md-card @md-selected="onSelectBFReferences" :md-selected-value.sync="numeros_selection">
<md-table-row slot="md-table-row" slot-scope="{ item }" md-selectable="multiple" v-bind:class="{ bfInOtherAffaire: (item.emolument_affaire_id && item.emolument_affaire_id !== form_general.id) }" :md-disabled="(form_general.utilise === true) || (item.emolument_affaire_id && item.emolument_affaire_id !== form_general.id)" md-auto-select>
<md-table-row slot="md-table-row"
slot-scope="{ item }"
md-selectable="multiple"
v-bind:class="{
bfInOtherAffaire: (form_general.utilise === false && item.emolument_affaire_id && item.emolument_affaire_id !== form_general.id) || (form_general.utilise === true && (item.emolument_affaire_id === null || item.emolument_affaire_id !== form_general.id)),
}"
:md-disabled="(form_general.utilise === true) || (item.emolument_affaire_id && item.emolument_affaire_id !== form_general.id)"
md-auto-select>
<md-table-cell md-label="Cadastre">{{ item.cadastre }}</md-table-cell>
<md-table-cell md-label="Numéro">{{ item.numero }}</md-table-cell>
<md-table-cell md-label="Emolument">{{ item.emolument_affaire_id }}</md-table-cell>
</md-table-row>
</md-table>
</div>
Expand Down

0 comments on commit 8885999

Please sign in to comment.