This commit is contained in:
Vincent Vandemeulebrouck 2022-12-05 15:29:00 +01:00
parent 7efa7be1c0
commit 7b58407634
15 changed files with 142 additions and 179 deletions

View File

@ -164,31 +164,14 @@ export class RdDActorSheet extends ActorSheet {
const item = RdDSheetUtility.getItem(event, this.actor); const item = RdDSheetUtility.getItem(event, this.actor);
RdDSheetUtility.splitItem(item, this.actor); RdDSheetUtility.splitItem(item, this.actor);
}); });
html.find('.item-edit').click(async event => {
const item = RdDSheetUtility.getItem(event, this.actor)
item.sheet.render(true)
})
html.find('.display-label a').click(async event => {
const item = RdDSheetUtility.getItem(event, this.actor);
item.sheet.render(true);
});
html.find('.item-delete').click(async event => {
const li = RdDSheetUtility.getEventElement(event);
const item = this.actor.getObjet(li.data("item-id"));
RdDUtility.confirmerSuppressionItem(this, item, li);
});
html.find('.item-vendre').click(async event => {
const item = RdDSheetUtility.getItem(event, this.actor);
item?.proposerVente();
});
html.find('.item-montrer').click(async event => {
const item = RdDSheetUtility.getItem(event, this.actor);
item?.postItem();
});
html.find('.item-action').click(async event => { html.find('.item-action').click(async event => {
const item = RdDSheetUtility.getItem(event, this.actor) const item = RdDSheetUtility.getItem(event, this.actor)
this.actor.actionItem(item); this.actor.actionItem(item);
}); });
html.find('.item-edit').click(async event => RdDSheetUtility.getItem(event, this.actor)?.sheet.render(true))
html.find('.item-delete').click(async event => RdDUtility.confirmerSuppressionItem(this, RdDSheetUtility.getItem(event, this.actor)));
html.find('.item-vendre').click(async event => RdDSheetUtility.getItem(event, this.actor)?.proposerVente());
html.find('.item-montrer').click(async event => RdDSheetUtility.getItem(event, this.actor)?.postItem());
html.find('.subacteur-delete').click(async event => { html.find('.subacteur-delete').click(async event => {
const li = RdDSheetUtility.getEventElement(event); const li = RdDSheetUtility.getEventElement(event);
const actorId = li.data("actor-id"); const actorId = li.data("actor-id");

View File

@ -809,8 +809,7 @@ export class RdDActor extends Actor {
name: 'maitrise', name: 'maitrise',
label: 'Maîtriser le Rêve de Dragon', label: 'Maîtriser le Rêve de Dragon',
callbacks: [ callbacks: [
{ action: async r => { action: async r => this.resultCombatReveDeDragon(r) }
this.resultCombatReveDeDragon(r) }
] ]
} }
); );
@ -832,7 +831,8 @@ export class RdDActor extends Actor {
type: 'sortreserve', type: 'sortreserve',
name: sort.name, name: sort.name,
img: sort.img, img: sort.img,
system: { sortid: sort._id, draconic: (draconic?.name ?? sort.system.draconic), ptreve: ptreve, coord: coord, heurecible: 'Vaisseau' } }], system: { sortid: sort._id, draconic: (draconic?.name ?? sort.system.draconic), ptreve: ptreve, coord: coord, heurecible: 'Vaisseau' }
}],
{ renderSheet: false }); { renderSheet: false });
this.currentTMR.updateTokens(); this.currentTMR.updateTokens();
} }
@ -1965,9 +1965,9 @@ export class RdDActor extends Actor {
} }
} }
async actionNourritureboisson(item, onActionItem) {
const dialog = await DialogConsommer.create(this, item, onActionItem); async mangerNourriture(item, onActionItem) {
dialog.render(true); return (await DialogConsommer.create(this, item, onActionItem)).render(true);
} }
async actionLire(item) { async actionLire(item) {
@ -2705,12 +2705,13 @@ export class RdDActor extends Actor {
/* -------------------------------------------- */ /* -------------------------------------------- */
async _rollArt(artData, selected, oeuvre, callBackResult = r => this._resultArt(r)) { async _rollArt(artData, selected, oeuvre, callBackResult = r => this._resultArt(r)) {
oeuvre.system.niveau = oeuvre.system.niveau ?? 0;
mergeObject(artData, mergeObject(artData,
{ {
oeuvre: oeuvre, oeuvre: oeuvre,
art: oeuvre.type, art: oeuvre.type,
competence: duplicate(this.getCompetence(artData.compName ?? oeuvre.system.competence ?? artData.art)), competence: duplicate(this.getCompetence(artData.compName ?? oeuvre.system.competence ?? artData.art)),
diffLibre: - (oeuvre.system.niveau ?? 0), diffLibre: - oeuvre.system.niveau,
diffConditions: 0, diffConditions: 0,
use: { libre: false, conditions: true, surenc: false }, use: { libre: false, conditions: true, surenc: false },
selectedCarac: duplicate(this.system.carac[selected]) selectedCarac: duplicate(this.system.carac[selected])
@ -2803,13 +2804,13 @@ export class RdDActor extends Actor {
type: 'nourritureboisson', type: 'nourritureboisson',
img: 'systems/foundryvtt-reve-de-dragon/icons/objets/provision_cuite.webp', img: 'systems/foundryvtt-reve-de-dragon/icons/objets/provision_cuite.webp',
system: { system: {
"description": artData.oeuvre.system.description, description: cuisine.oeuvre.system.description,
"sust": Math.min(sust, 1), sust: 1,
"qualite": artData.qualiteFinale, qualite: cuisine.qualiteFinale,
"exotisme": artData.exotismeFinal, exotisme: cuisine.exotismeFinal,
"encombrement": 0.1, encombrement: 0.1,
"quantite": Math.max(1, Math.floor(sust)), quantite: Math.max(1, Math.floor(cuisine.sust)),
"cout": Math.max(artData.qualiteFinale) * 0.01 cout: Math.max(cuisine.qualiteFinale, 0) * 0.01
} }
}; };
if (artData.ajouterEquipement) { if (artData.ajouterEquipement) {
@ -4134,7 +4135,6 @@ export class RdDActor extends Actor {
await this.checkCompetenceXP(item.name, item.system.xp); await this.checkCompetenceXP(item.name, item.system.xp);
} }
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
async onCreateItem(item, options, id) { async onCreateItem(item, options, id) {
switch (item.type) { switch (item.type) {

View File

@ -18,7 +18,8 @@ export class DialogConsommer extends Dialog {
[consommerData.buttonName]: { [consommerData.buttonName]: {
label: consommerData.buttonName, callback: async it => { label: consommerData.buttonName, callback: async it => {
await this.onConsommer(it); await this.onConsommer(it);
await onActionItem();} await onActionItem();
}
} }
} }
}; };
@ -38,9 +39,8 @@ export class DialogConsommer extends Dialog {
/* -------------------------------------------- */ /* -------------------------------------------- */
static prepareData(actor, item) { static prepareData(actor, item) {
item = duplicate(item);
let consommerData = { let consommerData = {
item: item, item: duplicate(item),
cuisine: actor.getCompetence('cuisine'), cuisine: actor.getCompetence('cuisine'),
choix: { choix: {
doses: 1, doses: 1,

View File

@ -281,4 +281,36 @@ export class RdDItemCompetence extends Item {
return duplicate(limitesArchetypes); return duplicate(limitesArchetypes);
} }
static triVisible(competences) {
return competences.filter(it => it.system.isVisible)
.sort((a, b) => RdDItemCompetence.compare(a,b))
}
static $positionTri(comp) {
if (comp.name.startsWith("Survie")) {
if (comp.name.includes("Cité")) return 0;
if (comp.name.includes("Extérieur")) return 1;
return 2;
}
if (comp.system.categorie.startsWith("melee")) {
if (comp.name.includes("Corps")) return 0;
if (comp.name.includes("Dague")) return 1;
if (comp.name.includes("Esquive")) return 2;
return 3;
}
if (comp.system.categorie.startsWith("draconic")) {
if (comp.name.includes("Oniros")) return 0;
if (comp.name.includes("Hypnos")) return 1;
if (comp.name.includes("Narcos")) return 2;
if (comp.name.includes("Thanatos")) return 3;
return 4;
}
return 0;
}
static compare(a,b) {
const diff = RdDItemCompetence.$positionTri(a) - RdDItemCompetence.$positionTri(b);
return diff ? diff : a.name.localeCompare(b.name);
}
} }

View File

@ -166,7 +166,6 @@ export class RdDItemSheet extends ItemSheet {
this.form.ondragstart = (event) => this._onDragStart(event); this.form.ondragstart = (event) => this._onDragStart(event);
this.form.ondrop = (event) => this._onDrop(event); this.form.ondrop = (event) => this._onDrop(event);
// Select competence categorie // Select competence categorie
html.find(".categorie").change(event => this._onSelectCategorie(event)); html.find(".categorie").change(event => this._onSelectCategorie(event));
@ -182,60 +181,37 @@ export class RdDItemSheet extends ItemSheet {
this.dateUpdated = game.system.rdd.calendrier.getIndexFromDate(jour, mois); this.dateUpdated = game.system.rdd.calendrier.getIndexFromDate(jour, mois);
}); });
html.find('.creer-tache-livre').click((event) => { html.find('.creer-tache-livre').click((event) => this._getEventActor(event).creerTacheDepuisLivre(this.item));
let actorId = event.currentTarget.attributes['data-actor-id'].value; html.find('.consommer-potion').click((event) => this._getEventActor(event).consommerPotion(this.item));
let actor = game.actors.get(actorId); html.find('.creer-potion-base').click((event) => this._getEventActor(event).dialogFabriquerPotion(this.item));
actor.creerTacheDepuisLivre(this.item);
});
html.find('.consommer-potion').click((event) => {
let actorId = event.currentTarget.attributes['data-actor-id'].value;
let actor = game.actors.get(actorId);
actor.consommerPotion(this.item);
});
html.find('.creer-potion-base').click((event) => {
let actorId = event.currentTarget.attributes['data-actor-id'].value;
let actor = game.actors.get(actorId);
actor.dialogFabriquerPotion(this.item);
});
html.find('.alchimie-tache a').click((event) => { html.find('.alchimie-tache a').click((event) => {
let actorId = event.currentTarget.attributes['data-actor-id'].value; let actor = this._getEventActor(event);
if (actor) {
let recetteId = event.currentTarget.attributes['data-recette-id'].value; let recetteId = event.currentTarget.attributes['data-recette-id'].value;
let tacheName = event.currentTarget.attributes['data-alchimie-tache'].value; let tacheName = event.currentTarget.attributes['data-alchimie-tache'].value;
let tacheData = event.currentTarget.attributes['data-alchimie-data'].value; let tacheData = event.currentTarget.attributes['data-alchimie-data'].value;
let actor = game.actors.get(actorId);
if (actor) {
actor.effectuerTacheAlchimie(recetteId, tacheName, tacheData); actor.effectuerTacheAlchimie(recetteId, tacheName, tacheData);
} else { } else {
ui.notifications.info("Impossible trouver un acteur pour réaliser cette tache Alchimique."); ui.notifications.info("Impossible trouver un acteur pour réaliser cette tache Alchimique.");
} }
}); });
html.find('.item-split').click(async event => {
const item = RdDSheetUtility.getItem(event, this.actor);
await RdDSheetUtility.splitItem(item, this.actor, async () => itemSheetDialog.render(true));
});
html.find('.item-edit').click(async event => {
const item = RdDSheetUtility.getItem(event, this.actor);
item.sheet.render(true);
});
html.find('.item-delete').click(async event => {
const li = RdDSheetUtility.getEventElement(event);
const item = this.actor.getObjet(li.data("item-id"));
RdDUtility.confirmerSuppressionItem(this, item, li);
});
html.find('.item-vendre').click(async event => {
const item = RdDSheetUtility.getItem(event, this.actor);
item?.proposerVente();
});
html.find('.item-montrer').click(async event => {
const item = RdDSheetUtility.getItem(event, this.actor);
item?.postItem();
});
html.find('.item-action').click(async event => { html.find('.item-action').click(async event => {
const item = RdDSheetUtility.getItem(event, this.actor); const item = RdDSheetUtility.getItem(event, this.actor);
this.actor.actionItem(item, async () => itemSheetDialog.render(true)); this.actor.actionItem(item, async () => itemSheetDialog.render(true));
}); });
html.find('.item-split').click(async event => RdDSheetUtility.splitItem(RdDSheetUtility.getItem(event, this.actor), this.actor, async () => itemSheetDialog.render(true)));
html.find('.item-edit').click(async event => RdDSheetUtility.getItem(event, this.actor)?.sheet.render(true));
html.find('.item-delete').click(async event => RdDUtility.confirmerSuppressionItem(this, RdDSheetUtility.getItem(event, this.actor)));
html.find('.item-vendre').click(async event => RdDSheetUtility.getItem(event, this.actor)?.proposerVente());
html.find('.item-montrer').click(async event => RdDSheetUtility.getItem(event, this.actor)?.postItem());
}
_getEventActor(event) {
let actorId = event.currentTarget.attributes['data-actor-id'].value;
let actor = game.actors.get(actorId);
return actor;
} }
/* -------------------------------------------- */ /* -------------------------------------------- */

View File

@ -287,7 +287,6 @@ export class RdDItem extends Item {
if (!other || !this.isInventaire()) { if (!other || !this.isInventaire()) {
return [false, undefined]; return [false, undefined];
} }
if (this.system.quantite == undefined) { if (this.system.quantite == undefined) {
return [false, `Impossible de regrouper des ${this.type}, ils ne sont pas empilables`]; return [false, `Impossible de regrouper des ${this.type}, ils ne sont pas empilables`];
} }

View File

@ -279,6 +279,7 @@ export class RdDUtility {
'systems/foundryvtt-reve-de-dragon/templates/chat-signe-draconique-actor.html' 'systems/foundryvtt-reve-de-dragon/templates/chat-signe-draconique-actor.html'
]; ];
Handlebars.registerHelper('either', (a, b) => a ?? b);
Handlebars.registerHelper('upperFirst', str => Misc.upperFirst(str ?? 'Null')); Handlebars.registerHelper('upperFirst', str => Misc.upperFirst(str ?? 'Null'));
Handlebars.registerHelper('lowerFirst', str => Misc.lowerFirst(str ?? 'Null')); Handlebars.registerHelper('lowerFirst', str => Misc.lowerFirst(str ?? 'Null'));
Handlebars.registerHelper('upper', str => str?.toUpperCase() ?? 'NULL'); Handlebars.registerHelper('upper', str => str?.toUpperCase() ?? 'NULL');
@ -296,46 +297,18 @@ export class RdDUtility {
Handlebars.registerHelper('min', (...args) => Math.min(...args.slice(0, -1))); Handlebars.registerHelper('min', (...args) => Math.min(...args.slice(0, -1)));
Handlebars.registerHelper('regle-optionnelle', (option) => ReglesOptionelles.isUsing(option)); Handlebars.registerHelper('regle-optionnelle', (option) => ReglesOptionelles.isUsing(option));
Handlebars.registerHelper('trier', list => list.sort((a, b) => a.name.localeCompare(b.name))); Handlebars.registerHelper('trier', list => list.sort((a, b) => a.name.localeCompare(b.name)));
Handlebars.registerHelper('filtreTriCompetences', competences => competences.filter(it => it.system.isVisible) Handlebars.registerHelper('filtreTriCompetences', competences => RdDItemCompetence.triVisible(competences));
.sort((a, b) => {
if (a.name.startsWith("Survie") && b.name.startsWith("Survie")) {
if (a.name.includes("Cité")) return -1;
if (b.name.includes("Cité")) return 1;
if (a.name.includes("Extérieur")) return -1;
if (b.name.includes("Extérieur")) return 1;
return a.name.localeCompare(b.name);
}
if (a.system.categorie.startsWith("melee") && b.system.categorie.startsWith("melee")) {
if (a.name.includes("Corps")) return -1;
if (b.name.includes("Corps")) return 1;
if (a.name.includes("Dague")) return -1;
if (b.name.includes("Dague")) return 1;
if (a.name.includes("Esquive")) return -1;
if (b.name.includes("Esquive")) return 1;
return a.name.localeCompare(b.name);
}
if (a.name.startsWith("Voie") && b.name.startsWith("Voie")) {
if (a.name.includes("Oniros")) return -1;
if (b.name.includes("Oniros")) return 1;
if (a.name.includes("Hypnos")) return -1;
if (b.name.includes("Hypnos")) return 1;
if (a.name.includes("Narcos")) return -1;
if (b.name.includes("Narcos")) return 1;
if (a.name.includes("Thanatos")) return -1;
if (b.name.includes("Thanatos")) return 1;
return a.name.localeCompare(b.name);
}
return a.name.localeCompare(b.name);
})
);
Handlebars.registerHelper('linkCompendium', (pack, id, name) => RdDUtility.linkCompendium(pack, id, name)); Handlebars.registerHelper('linkCompendium', (pack, id, name) => RdDUtility.linkCompendium(pack, id, name));
Handlebars.registerHelper('uniteQuantite', (type) => RdDItem.getUniteQuantite(type)); Handlebars.registerHelper('uniteQuantite', (itemId, actorId) => RdDUtility.getItem(itemId, actorId)?.getUniteQuantite());
Handlebars.registerHelper('isFieldInventaireModifiable', (type, field) => RdDItem.isFieldInventaireModifiable(type, field)); Handlebars.registerHelper('isFieldInventaireModifiable', (type, field) => RdDItem.isFieldInventaireModifiable(type, field));
Handlebars.registerHelper('getFrequenceRarete', (rarete, field) => Environnement.getFrequenceRarete(rarete, field)); Handlebars.registerHelper('getFrequenceRarete', (rarete, field) => Environnement.getFrequenceRarete(rarete, field));
Handlebars.registerHelper('either', (a, b) => a ?? b);
return loadTemplates(templatePaths); return loadTemplates(templatePaths);
} }
static getItem(itemId, actorId = undefined) {
return actorId ? game.actors.get(actorId)?.getObjet(itemId) : game.items.get(itemId);
}
static linkCompendium(pack, id, name) { static linkCompendium(pack, id, name) {
return `@Compendium[${pack}.${id}]{${name}}`; return `@Compendium[${pack}.${id}]{${name}}`;
} }
@ -1001,7 +974,7 @@ export class RdDUtility {
} }
static slideOnDelete(sheet, htmlToDelete) { static slideOnDelete(sheet, htmlToDelete) {
return htmlToDelete.slideUp(200, () => sheet.render(false)); return htmlToDelete?.slideUp(200, () => sheet.render(false));
} }
/* -------------------------------------------- */ /* -------------------------------------------- */

View File

@ -1,6 +1,6 @@
<li class="item flexrow" data-attribute={{key}} data-item-id="{{queue._id}}"> <li class="item flexrow" data-attribute={{key}} data-item-id="{{queue._id}}">
<img class="sheet-competence-img" src="{{queue.img}}" /> <img class="sheet-competence-img" src="{{queue.img}}" />
<span class="display-label flex-grow"> <span class="item-edit flex-grow">
{{#if (eq queue.type 'ombre')}} {{#if (eq queue.type 'ombre')}}
<img class="sheet-competence-img" src="systems/foundryvtt-reve-de-dragon/icons/competence_thanatos.webp" /> <img class="sheet-competence-img" src="systems/foundryvtt-reve-de-dragon/icons/competence_thanatos.webp" />
{{/if}} {{/if}}

View File

@ -4,7 +4,7 @@
{{#each souffles as |souffle key|}} {{#each souffles as |souffle key|}}
<li class="item flexrow" data-attribute={{key}} data-item-id="{{souffle._id}}"> <li class="item flexrow" data-attribute={{key}} data-item-id="{{souffle._id}}">
<img class="sheet-competence-img" src="{{souffle.img}}" /> <img class="sheet-competence-img" src="{{souffle.img}}" />
<span class="display-label flex-grow"><a>{{souffle.name}}</a></span> <span class="item-edit flex-grow"><a>{{souffle.name}}</a></span>
<div class="item-controls flex-shrink"> <div class="item-controls flex-shrink">
<a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> <a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div> </div>

View File

@ -4,7 +4,7 @@
{{#each tetes as |tete key|}} {{#each tetes as |tete key|}}
<li class="item flexrow" data-attribute={{key}} data-item-id="{{tete._id}}"> <li class="item flexrow" data-attribute={{key}} data-item-id="{{tete._id}}">
<img class="sheet-competence-img" src="{{tete.img}}" /> <img class="sheet-competence-img" src="{{tete.img}}" />
<span class="display-label flex-grow"><a>{{tete.name}}</a></span> <span class="item-edit flex-grow"><a>{{tete.name}}</a></span>
<div class="item-controls flex-shrink"> <div class="item-controls flex-shrink">
<a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> <a class="item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div> </div>

View File

@ -4,7 +4,7 @@
{{#each casestmr as |casetmr key|}} {{#each casestmr as |casetmr key|}}
<li class="item list-item flexrow" data-item-id="{{casetmr.id}}" data-attribute="{{key}}"> <li class="item list-item flexrow" data-item-id="{{casetmr.id}}" data-attribute="{{key}}">
<img class="sheet-competence-img" src="{{casetmr.img}}" /> <img class="sheet-competence-img" src="{{casetmr.img}}" />
<span class="display-label"><a>{{casetmr.name}}</a></span> <span class="item-edit"><a>{{casetmr.name}}</a></span>
<span>{{casetmr.system.coord}} - {{caseTmr-label casetmr.system.coord}}</span> <span>{{casetmr.system.coord}} - {{caseTmr-label casetmr.system.coord}}</span>
<div class="item-controls flex-shrink"> <div class="item-controls flex-shrink">
<a class="item-delete" title="Supprimer"><i class="fas fa-trash"></i></a> <a class="item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>

View File

@ -4,7 +4,7 @@
{{#each rencontres as |rencontre key|}} {{#each rencontres as |rencontre key|}}
<li class="item flexrow" data-item-id="{{rencontre._id}}" data-attribute="{{key}}"> <li class="item flexrow" data-item-id="{{rencontre._id}}" data-attribute="{{key}}">
<img class="sheet-competence-img" src="{{rencontre.img}}" /> <img class="sheet-competence-img" src="{{rencontre.img}}" />
<span class="display-label flex-grow"><a> <span class="item-edit flex-grow"><a>
{{rencontre.name}} r{{rencontre.system.force}} ({{rencontre.system.coord}} - {{caseTmr-label rencontre.system.coord}}) {{rencontre.name}} r{{rencontre.system.force}} ({{rencontre.system.coord}} - {{caseTmr-label rencontre.system.coord}})
</a></span> </a></span>
{{#if rencontre.system.date}} {{#if rencontre.system.date}}

View File

@ -4,7 +4,7 @@
{{#each signesdraconiques as |signe key|}} {{#each signesdraconiques as |signe key|}}
<li class="item list-item flexrow" data-item-id="{{signe._id}}" data-attribute="{{key}}"> <li class="item list-item flexrow" data-item-id="{{signe._id}}" data-attribute="{{key}}">
<img class="sheet-competence-img" src="{{signe.img}}" /> <img class="sheet-competence-img" src="{{signe.img}}" />
<span class="display-label flex-grow"><a>{{signe.name}}</a></span> <span class="item-edit flex-grow"><a>{{signe.name}}</a></span>
<span class="flex-shrink">{{signe.system.difficulte}}</span> <span class="flex-shrink">{{signe.system.difficulte}}</span>
<div class="item-controls flex-shrink"> <div class="item-controls flex-shrink">
<a class="item-delete" title="Supprimer"><i class="fas fa-trash"></i></a> <a class="item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>

View File

@ -4,7 +4,7 @@
{{#each sortsReserve as |sort key|}} {{#each sortsReserve as |sort key|}}
<li class="item list-item flexrow" data-item-id="{{sort._id}}" data-attribute="{{key}}"> <li class="item list-item flexrow" data-item-id="{{sort._id}}" data-attribute="{{key}}">
<img class="sheet-competence-img" src="{{sort.img}}" /> <img class="sheet-competence-img" src="{{sort.img}}" />
<span class="display-label"><a>{{#if sort.system.echectotal}}Echec total: {{/if}}{{sort.name}} r{{sort.system.ptreve}}</a></span> <span class="item-edit"><a>{{#if sort.system.echectotal}}Echec total: {{/if}}{{sort.name}} r{{sort.system.ptreve}}</a></span>
<span>{{sort.system.coord}} - {{caseTmr-label sort.system.coord}}</span> <span>{{sort.system.coord}} - {{caseTmr-label sort.system.coord}}</span>
<div class="item-controls flex-shrink"> <div class="item-controls flex-shrink">
<a class="item-delete flex-shrink" title="Supprimer"><i class="fas fa-trash"></i></a> <a class="item-delete flex-shrink" title="Supprimer"><i class="fas fa-trash"></i></a>

View File

@ -4,7 +4,7 @@
{{#each sorts as |sort key|}} {{#each sorts as |sort key|}}
<li class="item list-item flexrow" data-item-id="{{sort._id}}" data-attribute="{{key}}"> <li class="item list-item flexrow" data-item-id="{{sort._id}}" data-attribute="{{key}}">
<img class="sheet-competence-img" src="{{sort.img}}" /> <img class="sheet-competence-img" src="{{sort.img}}" />
<span class="display-label flex-grow-2"> <span class="item-edit flex-grow-2">
<a data-item-id="{{sort._id}}">{{sort.name}} <a data-item-id="{{sort._id}}">{{sort.name}}
- {{#if sort.system.caseTMRspeciale}}{{sort.system.caseTMRspeciale}}{{else}}{{upperFirst sort.system.caseTMR}}{{/if}} - {{#if sort.system.caseTMRspeciale}}{{sort.system.caseTMRspeciale}}{{else}}{{upperFirst sort.system.caseTMR}}{{/if}}
</a> </a>