Initial data model migration

This commit is contained in:
2026-01-06 22:56:57 +01:00
parent 05ca6e1763
commit 001f0cffa8
142 changed files with 6474 additions and 413 deletions

View File

@@ -1,9 +1,9 @@
<form class="{{cssClass}}" autocomplete="off">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-header.html}} {{>
systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.html}} {{!-- Sheet Body
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-header.hbs}} {{>
systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.hbs}} {{!-- Sheet Body
--}}
<section class="sheet-body">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.hbs}}
<div class="tab details" data-group="primary" data-tab="details">
<ul class="item-list alternate-list">
@@ -18,8 +18,8 @@
value="{{system.typearme}}"
data-dtype="string"
>
{{selectOptions config.optionsTypeArme selected=system.typearme
valueAttr="key" nameAttr="key" labelAttr="label"}}
{{selectOptions @root.config.optionsTypeArme selected=system.typearme
valueAttr="key" labelAttr="label"}}
</select>
</li>
<li class="flexrow item">
@@ -176,7 +176,7 @@
/>
</li>
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-prix.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-prix.hbs}}
</ul>
</div>
</section>

View File

@@ -1,12 +1,12 @@
<form class="{{cssClass}}" autocomplete="off">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-header.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-header.hbs}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.hbs}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.hbs}}
<div class="tab details" data-group="primary" data-tab="details">
@@ -21,7 +21,7 @@
<label class="generic-label item-field-label-long">Branche : </label>
<select class="item-field-label-long" type="text" name="system.branche" value="{{system.branche}}"
data-dtype="string">
{{selectOptions config.optionsArtefactBranche selected=system.branche valueAttr="key" nameAttr="key" labelAttr="label"}}
{{selectOptions @root.config.optionsArtefactBranche selected=system.branche valueAttr="key" labelAttr="label"}}
</select>
</li>
@@ -29,7 +29,7 @@
<label class="generic-label item-field-label-long">Branche secondaire : </label>
<select class="item-field-label-long" type="text" name="system.branche2" value="{{system.branche2}}"
data-dtype="string">
{{selectOptions config.optionsArtefactBranche2 selected=system.branche2 valueAttr="key" nameAttr="key" labelAttr="label"}}
{{selectOptions @root.config.optionsArtefactBranche2 selected=system.branche2 valueAttr="key" labelAttr="label"}}
</select>
</li>

View File

@@ -1,12 +1,12 @@
<form class="{{cssClass}}" autocomplete="off">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-header.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-header.hbs}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.hbs}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.hbs}}
<div class="tab details" data-group="primary" data-tab="details">

View File

@@ -1,12 +1,12 @@
<form class="{{cssClass}}" autocomplete="off">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-header.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-header.hbs}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.hbs}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.hbs}}
<div class="tab details" data-group="primary" data-tab="details">
@@ -15,12 +15,12 @@
<label class="generic-label item-field-label-long">Type : </label>
<select class="item-field-label-long" type="text" name="system.contacttype" value="{{system.contacttype}}" data-dtype="String">
{{selectOptions config.optionsTypeContact selected=system.contacttype valueAttr="key" nameAttr="key" labelAttr="label"}}
{{selectOptions @root.config.optionsTypeContact selected=system.contacttype valueAttr="key" labelAttr="label"}}
</select>
<label class="generic-label item-field-label-long">Niveau : </label>
<select class="item-field-label-long" type="text" name="system.niveau" value="{{system.niveau}}" data-dtype="Number">
{{selectOptions config.listeNiveauContact selected=system.niveau}}
{{selectOptions @root.config.listeNiveauContact selected=system.niveau}}
</select>
</li>

View File

@@ -1,18 +1,18 @@
<form class="{{cssClass}}" autocomplete="off">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-header.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-header.hbs}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.hbs}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.hbs}}
<div class="tab details" data-group="primary" data-tab="details">
<ul class="item-list alternate-list">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-prix.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-prix.hbs}}
</ul>

View File

@@ -1,12 +1,12 @@
<form class="{{cssClass}}" autocomplete="off">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-header.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-header.hbs}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.hbs}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.hbs}}
<div class="tab details" data-group="primary" data-tab="details">
<ul class="item-list alternate-list">

View File

@@ -1,12 +1,12 @@
<form class="{{cssClass}}" autocomplete="off">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-header.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-header.hbs}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.hbs}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.hbs}}
<div class="tab details" data-group="primary" data-tab="details">

View File

@@ -1,12 +1,12 @@
<form class="{{cssClass}}" autocomplete="off">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-header.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-header.hbs}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.hbs}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.hbs}}
<div class="tab details" data-group="primary" data-tab="details">
@@ -15,7 +15,7 @@
<label class="generic-label item-field-label-long">Catégorie : </label>
<select class="item-field-label-long2" type="text" name="system.mutationcategorie"
value="{{system.mutationcategorie}}" data-dtype="string">
{{selectOptions config.optionsTypeMutation selected=system.mutationcategorie valueAttr="key" nameAttr="key" labelAttr="label"}}
{{selectOptions @root.config.optionsTypeMutation selected=system.mutationcategorie valueAttr="key" labelAttr="label"}}
</select>
</li>

View File

@@ -1,12 +1,12 @@
<form class="{{cssClass}}" autocomplete="off">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-header.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-header.hbs}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.hbs}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.hbs}}
<div class="tab details" data-group="primary" data-tab="details">
<ul class="item-list alternate-list">

View File

@@ -1,12 +1,12 @@
<form class="{{cssClass}}" autocomplete="off">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-header.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-header.hbs}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.hbs}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.hbs}}
<div class="tab details" data-group="primary" data-tab="details">
@@ -22,7 +22,7 @@
value="{{system.adversitepoids}}" data-dtype="Number" />
</li>
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-prix.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-prix.hbs}}
</div>

View File

@@ -1,12 +1,12 @@
<form class="{{cssClass}}" autocomplete="off">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-header.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-header.hbs}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.hbs}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.hbs}}
<div class="tab details" data-group="primary" data-tab="details">

View File

@@ -1,14 +1,12 @@
<form class="{{cssClass}}" autocomplete="off">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-header.html}}
<section class="{{cssClass}}" autocomplete="off">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-header.hbs this}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-nav.hbs this}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-item-description.hbs this}}
<div class="tab details" data-group="primary" data-tab="details">
<div class="tab details" data-group="primary" data-tab="details">
<ul class="item-list alternate-list">
@@ -16,7 +14,7 @@
<label class="generic-label item-field-label-medium">Type </label>
<select class="status-small-label color-class-common item-field-label-long" type="text"
name="system.talenttype" value="{{system.talenttype}}" data-dtype="String">
{{selectOptions config.optionsTypeTalent selected=system.talenttype valueAttr="key" nameAttr="key" labelAttr="label"}}
{{selectOptions @root.config.optionsTypeTalent selected=system.talenttype valueAttr="key" labelAttr="label"}}
</select>
</li>
@@ -24,7 +22,7 @@
<label class="generic-label item-field-label-medium">Utilisation </label>
<select class="status-small-label color-class-common item-field-label-long" type="text"
name="system.utilisation" value="{{system.utilisation}}" data-dtype="String">
{{selectOptions config.optionsUseTalent selected=system.utilisation valueAttr="key" nameAttr="key" labelAttr="label"}}
{{selectOptions @root.config.optionsUseTalent selected=system.utilisation valueAttr="key" labelAttr="label"}}
</select>
</li>
@@ -49,10 +47,9 @@
<input class="predilection-maitrise" type="checkbox" name="system.used" {{checked system.used}} />
</li>
{{> systems/fvtt-hawkmoon-cyd/templates/partial-automation.html}}
{{> systems/fvtt-hawkmoon-cyd/templates/partial-automation.hbs}}
</ul>
</div>
</div>
</section>
</form>
</section>

View File

@@ -0,0 +1,102 @@
<li class="flexrow item">
<label class="generic-label item-field-label-long">Automatisation ? </label>
<input type="checkbox" name="system.isautomated" {{checked system.isautomated}} {{#unless isEditMode}}disabled{{/unless}} />
</li>
{{#if system.isautomated}}
<li class="flexrow item">
<ul>
{{#each system.automations as |automation key|}}
<li class="automation-item item flexrow">
<hr>
</li>
<li class="automation-item item flexrow" data-automation-field="eventtype" data-automation-index="{{key}}">
<label class="generic-label item-field-label-medium">Evènement</label>
<select class="item-field-label-long automation-edit-field" type="text"
name="system.automations.{{key}}.eventtype"
data-automation-index="{{key}}" data-automation-field="eventtype"
value="{{automation.eventtype}}" data-dtype="String" {{#unless ../isEditMode}}disabled{{/unless}}>
{{selectOptions @root.config.optionsAutomationEvent selected=automation.eventtype valueAttr="key" labelAttr="label"}}
</select>
<label class="generic-label item-field-label-medium">&nbsp;</label>
{{#if ../isEditMode}}
<button type="button" data-action="deleteAutomation" data-automation-index="{{key}}"
class="item-control item-field-label-medium" title="Supprimer">
<i class="fas fa-trash"></i>
</button>
{{/if}}
</li>
{{#if (eq automation.eventtype "on-drop")}}
<li class="automation-item item flexrow">
<label class="generic-label item-field-label-long">Compétence/Attribut</label>
<input type="text" class="item-field-label-medium automation-edit-field"
name="system.automations.{{key}}.competence"
data-automation-index="{{key}}" data-automation-field="competence"
value="{{automation.competence}}" data-dtype="String" {{#unless ../isEditMode}}disabled{{/unless}} />
</li>
<li class="automation-item item flexrow">
<label class="generic-label item-field-label-long">Valeur minimum</label>
<input type="text" class="item-field-label-medium automation-edit-field"
name="system.automations.{{key}}.minLevel"
data-automation-index="{{key}}" data-automation-field="minLevel"
value="{{automation.minLevel}}" data-dtype="Number" {{#unless ../isEditMode}}disabled{{/unless}} />
</li>
{{/if}}
{{#if (eq automation.eventtype "bonus-permanent")}}
<li class="automation-item item flexrow">
<label class="generic-label item-field-label-long">Désignation</label>
<select class="item-field-label-long automation-edit-field" type="text"
name="system.automations.{{key}}.bonusname"
data-automation-index="{{key}}" data-automation-field="bonusname"
value="{{automation.bonusname}}" data-dtype="String" {{#unless ../isEditMode}}disabled{{/unless}}>
{{selectOptions @root.config.optionsBonusPermanent selected=automation.bonusname valueAttr="key" labelAttr="label"}}
</select>
</li>
<li class="automation-item item flexrow">
<label class="generic-label item-field-label-long">Bonus</label>
<input type="text" class="item-field-label-medium automation-edit-field"
name="system.automations.{{key}}.bonus"
data-automation-index="{{key}}" data-automation-field="bonus"
value="{{automation.bonus}}" data-dtype="Number" {{#unless ../isEditMode}}disabled{{/unless}} />
</li>
{{/if}}
{{#if (eq automation.eventtype "prepare-roll")}}
<li class="automation-item item flexrow">
<label class="generic-label item-field-label-long">Compétence/Attribut</label>
<input type="text" class="item-field-label-medium automation-edit-field"
name="system.automations.{{key}}.competence"
data-automation-index="{{key}}" data-automation-field="competence"
value="{{automation.competence}}" data-dtype="String" {{#unless ../isEditMode}}disabled{{/unless}} />
</li>
<li class="automation-item item flexrow">
<label class="generic-label item-field-label-long">Bonus</label>
<input type="text" class="item-field-label-medium automation-edit-field"
name="system.automations.{{key}}.bonus"
data-automation-index="{{key}}" data-automation-field="bonus"
value="{{automation.bonus}}" data-dtype="Number" {{#unless ../isEditMode}}disabled{{/unless}} />
</li>
<li class="automation-item item flexrow">
<label class="generic-label item-field-label-long">Coût en BA</label>
<input type="text" class="item-field-label-medium automation-edit-field"
name="system.automations.{{key}}.baCost"
data-automation-index="{{key}}" data-automation-field="baCost"
value="{{automation.baCost}}" data-dtype="Number" {{#unless ../isEditMode}}disabled{{/unless}} />
</li>
{{/if}}
{{/each}}
</ul>
{{#if isEditMode}}
<li class="flexrow item">
<button type="button" data-action="addAutomation" class="chat-card-button">Ajouter une automatisation</button>
</li>
{{/if}}
{{/if}}

View File

@@ -1,74 +0,0 @@
<li class="flexrow item">
<label class="generic-label item-field-label-long">Automatisation ? </label>
<input type="checkbox" name="system.isautomated" {{checked system.isautomated}} />
</li>
{{#if system.isautomated}}
<li class="flexrow item">
<ul>
{{#each system.automations as |automation key|}}
<li class="automation-item item flexrow">
<hr>
</li>
<li class="automation-item item flexrow" data-automation-field="eventtype" data-automation-index="{{key}}">
<label class="generic-label item-field-label-medium">Evènement</label>
<select class="item-field-label-long automation-edit-field" type="text" data-automation-index="{{key}}" data-automation-field="eventtype"
value="{{automation.eventtype}}" data-dtype="String">
{{selectOptions @root.config.optionsAutomationEvent selected=automation.eventtype valueAttr="key" nameAttr="key" labelAttr="label"}}
</select>
<label class="generic-label item-field-label-medium">&nbsp;</label>
<a class="item-control item-field-label-medium delete-automation" title="Supprimer" data-automation-index="{{key}}"><i
class="fas fa-trash"></i></a>
</li>
{{#if (eq automation.eventtype "on-drop")}}
<li class="automation-item item flexrow">
<label class="generic-label item-field-label-long">Compétence/Attribut</label>
<input type="text" class="item-field-label-medium automation-edit-field" data-automation-index="{{key}}" data-automation-field="competence" value="{{automation.competence}}" data-dtype="String" />
</li>
<li class="automation-item item flexrow">
<label class="generic-label item-field-label-long">Valeur minimum</label>
<input type="text" class="item-field-label-medium automation-edit-field" data-automation-index="{{key}}" data-automation-field="minLevel" value="{{automation.minLevel}}" data-dtype="Number" />
</li>
{{/if}}
{{#if (eq automation.eventtype "bonus-permanent")}}
<li class="automation-item item flexrow">
<label class="generic-label item-field-label-long">Désignation</label>
<select class="item-field-label-long automation-edit-field" type="text" data-automation-index="{{key}}" data-automation-field="bonusname"
value="{{automation.bonusname}}" data-dtype="String">
{{selectOptions @root.config.optionsBonusPermanent selected=automation.bonusname valueAttr="key" nameAttr="key" labelAttr="label"}}
</select>
</li>
<li class="automation-item item flexrow">
<label class="generic-label item-field-label-long">Bonus</label>
<input type="text" class="item-field-label-medium automation-edit-field" data-automation-index="{{key}}" data-automation-field="bonus" value="{{automation.bonus}}" data-dtype="Number" />
</li>
{{/if}}
{{#if (eq automation.eventtype "prepare-roll")}}
<li class="automation-item item flexrow">
<label class="generic-label item-field-label-long">Compétence/Attribut</label>
<input type="text" class="item-field-label-medium automation-edit-field" data-automation-index="{{key}}" data-automation-field="competence" value="{{automation.competence}}" data-dtype="String" />
</li>
<li class="automation-item item flexrow">
<label class="generic-label item-field-label-long">Bonus</label>
<input type="text" class="item-field-label-medium automation-edit-field" data-automation-index="{{key}}" data-automation-field="bonus" value="{{automation.bonus}}" data-dtype="Number" />
</li>
<li class="automation-item item flexrow">
<label class="generic-label item-field-label-long">Coût en BA</label>
<input type="text" class="item-field-label-medium automation-edit-field" data-automation-index="{{key}}" data-automation-field="baCost" value="{{automation.baCost}}" data-dtype="Number" />
</li>
{{/if}}
{{/each}}
</ul>
<li class="flexrow item">
<button id="add-automation" class="chat-card-button">Ajouter une automatisation</button>
</li>
{{/if}}

View File

@@ -0,0 +1,10 @@
<div class="tab description" data-group="primary" data-tab="description">
<div class="editor">
{{editor
enrichedDescription
target="system.description"
button=true
editable=isEditMode
}}
</div>
</div>

View File

@@ -1,5 +0,0 @@
<div class="tab description" data-group="primary" data-tab="description">
<div class="editor">
{{editor description target="system.description" button=true owner=owner editable=editable}}
</div>
</div>

View File

@@ -0,0 +1,50 @@
<div class="header">
<header class="sheet-header">
<img
class="item-sheet-img"
src="{{item.img}}"
data-action="editImage"
title="{{item.name}}"
/>
<div class="header-fields">
<h1 class="charname">
<input
name="name"
type="text"
value="{{item.name}}"
placeholder="Name"
/>
</h1>
</div>
<div class="header-actions">
{{#if isEditMode}}
<button
type="button"
data-action="toggleSheet"
class="chat-card-button"
>
<i class="fas fa-eye"></i>
Mode Lecture
</button>
{{else}}
<button
type="button"
data-action="toggleSheet"
class="chat-card-button"
>
<i class="fas fa-edit"></i>
Mode Édition
</button>
{{/if}}
<button
type="button"
data-action="postItem"
class="chat-card-button"
title="Poster dans le chat"
>
<i class="fas fa-comment"></i>
Poster
</button>
</div>
</header>
</div>

View File

@@ -1,8 +0,0 @@
<header class="sheet-header">
<div class="flexrow background-sheet-header">
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}" />
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
</div>
</div>
</header>