Add descriptions to Works

This commit is contained in:
nemunaire 2022-09-04 17:59:36 +02:00
commit 767da66f63
5 changed files with 50 additions and 18 deletions

View file

@ -106,6 +106,15 @@
</div>
</div>
<div class="row mt-2">
<div class="col-sm-3 text-sm-end">
<label for="work_description" class="col-form-label col-form-label-sm">Description</label>
</div>
<div class="col-8">
<textarea class="form-control" id="work_description" bind:value={work.descr_raw}></textarea>
</div>
</div>
<div class="row row-cols-3 mx-1 my-2">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="shown" bind:checked={work.shown}>

View file

@ -6,12 +6,14 @@ export class Work {
}
}
update({ id, title, promo, group, shown, submission_url, corrected, start_availability, end_availability }) {
update({ id, title, promo, group, shown, description, descr_raw, submission_url, corrected, start_availability, end_availability }) {
this.id = id;
this.title = title;
this.promo = promo;
this.group = group;
this.shown = shown;
this.description = description;
this.descr_raw = descr_raw;
this.submission_url = submission_url;
this.corrected = corrected;
if (this.start_availability != start_availability) {