@design.estate/dees-catalog 21.34.0 → 21.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist_bundle/bundle.js +242 -182
  2. package/dist_bundle/bundle.js.map +1 -1
  3. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-P3H4LK6R.js → chunk-5CNZ4UM3.js} +3 -2
  4. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-P3H4LK6R.js.map → chunk-5CNZ4UM3.js.map} +1 -1
  5. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-22Q5WLXW.js → chunk-KY5Z6Y6T.js} +2 -2
  6. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-Y4JW5Y72.js → chunk-PHFZ5EZN.js} +3 -3
  7. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{de-7LG7TVSW.js → de-AGABQ27E.js} +3 -2
  8. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/de-AGABQ27E.js.map +1 -0
  9. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-TUZWVVOC.js → dees-modal-QBFEQURL.js} +3 -3
  10. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-FZU6LDKJ.js → dees-workspace-terminal-UYSWDBV4.js} +4 -4
  11. package/dist_ts_web/00_commitinfo_data.js +1 -1
  12. package/dist_ts_web/elements/00group-kanban/dees-kanban/dees-kanban.d.ts +8 -1
  13. package/dist_ts_web/elements/00group-kanban/dees-kanban/dees-kanban.js +32 -5
  14. package/dist_ts_web/elements/00group-kanban/dees-kanban-ticket-detail/dees-kanban-ticket-detail.js +225 -179
  15. package/dist_ts_web/i18n/de.d.ts +4 -0
  16. package/dist_ts_web/i18n/de.js +2 -1
  17. package/dist_ts_web/i18n/messages.d.ts +4 -0
  18. package/dist_ts_web/i18n/messages.js +2 -1
  19. package/package.json +1 -1
  20. package/readme.md +13 -1
  21. package/ts_web/00_commitinfo_data.ts +1 -1
  22. package/ts_web/elements/00group-kanban/dees-kanban/dees-kanban.ts +24 -3
  23. package/ts_web/elements/00group-kanban/dees-kanban-ticket-detail/dees-kanban-ticket-detail.ts +240 -194
  24. package/ts_web/i18n/de.ts +1 -0
  25. package/ts_web/i18n/messages.ts +1 -0
  26. package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/de-7LG7TVSW.js.map +0 -1
  27. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-22Q5WLXW.js.map → chunk-KY5Z6Y6T.js.map} +0 -0
  28. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{chunk-Y4JW5Y72.js.map → chunk-PHFZ5EZN.js.map} +0 -0
  29. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-modal-TUZWVVOC.js.map → dees-modal-QBFEQURL.js.map} +0 -0
  30. /package/dist_bundle/chunks/U6Ua8p1giFoD1s7vrUZUdpbg/{dees-workspace-terminal-FZU6LDKJ.js.map → dees-workspace-terminal-UYSWDBV4.js.map} +0 -0
@@ -164,6 +164,14 @@ export class DeesKanban extends DeesElement {
164
164
  @property({ attribute: false })
165
165
  accessor projects: IKanbanProject[] = [];
166
166
 
167
+ /**
168
+ * Every task and epic belongs to a project: the create dialog offers no "No project", says so,
169
+ * and creates nothing until one is chosen; a subtask still takes its parent's. The provider
170
+ * enforces the rule as well; while the board knows no projects, its refusal is what shows.
171
+ */
172
+ @property({ type: Boolean, reflect: true })
173
+ accessor projectRequired = false;
174
+
167
175
  /** The reader's person `id`; set, the filters offer "Assigned to me". */
168
176
  @property({ type: String, reflect: true })
169
177
  accessor currentPersonId = '';
@@ -1216,7 +1224,8 @@ export class DeesKanban extends DeesElement {
1216
1224
  /**
1217
1225
  * Asks for a new ticket's title and, for a task or an epic while the board knows projects, its
1218
1226
  * project, then has the provider create it. The project starts at the board's project filter,
1219
- * else the parent's; a subtask takes its parent's.
1227
+ * else the parent's; a subtask takes its parent's. With `projectRequired`, the dialog creates
1228
+ * nothing until a project is chosen.
1220
1229
  */
1221
1230
  private async createTicket(input: Omit<IKanbanCreate, 'title'>): Promise<void> {
1222
1231
  if (!this.provider.createTicket || !this.columns.some(column => column.id === input.columnId))
@@ -1235,19 +1244,25 @@ export class DeesKanban extends DeesElement {
1235
1244
  ? parentProject || input.project
1236
1245
  : input.project || this.filterValues.project || parentProject) || '';
1237
1246
  const projects = kanbanProjects(this.projects, this.tickets);
1247
+ const required = this.projectRequired;
1238
1248
  let choice: DeesInputDropdown | undefined;
1239
1249
  if (input.kind !== 'subtask' && projects.length) {
1240
1250
  choice = new DeesInputDropdown();
1241
1251
  choice.label = this.t('kanban.project');
1242
- // As in the detail, a ticket that starts in a project stays in one.
1252
+ // As in the detail, a ticket that starts in a project stays in one; where projects are
1253
+ // required, every ticket starts in one.
1243
1254
  choice.options = [
1244
- ...project ? [] : [{ key: '', option: this.t('kanban.noProject') }],
1255
+ ...project || required ? [] : [{ key: '', option: this.t('kanban.noProject') }],
1245
1256
  ...projects.map(item => ({ key: item.id, option: item.name })),
1246
1257
  ...project && !projects.some(item => item.id === project)
1247
1258
  ? [{ key: project, option: project }]
1248
1259
  : [],
1249
1260
  ];
1250
1261
  choice.selectedOption = choice.options.find(option => option.key === project) ?? null;
1262
+ if (required) {
1263
+ choice.required = true;
1264
+ choice.description = this.t('kanban.projectRequired');
1265
+ }
1251
1266
  }
1252
1267
  const title = new DeesInputText();
1253
1268
  title.label = this.t('kanban.ticketTitle');
@@ -1263,6 +1278,12 @@ export class DeesKanban extends DeesElement {
1263
1278
  return;
1264
1279
  }
1265
1280
  const chosen = choice ? choice.getValue()?.key ?? '' : project;
1281
+ if (choice && required && !chosen) {
1282
+ // The projects open for the person to choose one; the field's description says why.
1283
+ choice.focus();
1284
+ if (!choice.isOpened) await choice.toggleSelectionBox();
1285
+ return;
1286
+ }
1266
1287
  creating = true;
1267
1288
  title.disabled = true;
1268
1289
  if (choice) choice.disabled = true;
@@ -144,32 +144,44 @@ export class DeesKanbanTicketDetail extends DeesElement {
144
144
  public static styles = [
145
145
  ...kanbanStyles,
146
146
  css`
147
+ /*
148
+ * The toolbar runs across the top. Under its hairline the main column scrolls on its own
149
+ * and the properties fill the other side down to the bottom edge. Given a height, such as a
150
+ * modal's body, the detail fills it; otherwise it is as tall as its content.
151
+ */
147
152
  :host {
148
- padding: 24px;
153
+ display: grid;
154
+ grid-template-columns: minmax(0, 1fr) 280px;
155
+ grid-template-rows: auto minmax(0, 1fr);
156
+ grid-template-areas: 'toolbar toolbar' 'main props';
157
+ height: 100%;
158
+ min-height: 0;
149
159
  }
150
160
 
151
- .layout {
152
- display: grid;
153
- grid-template-columns: minmax(0, 1fr) 248px;
154
- grid-template-areas: 'lead props' 'body props';
155
- gap: 24px;
156
- align-items: start;
161
+ .main {
162
+ grid-area: main;
163
+ min-width: 0;
164
+ padding: 20px 24px 24px;
165
+ overflow-y: auto;
166
+ overscroll-behavior: contain;
167
+ scrollbar-width: thin;
157
168
  }
158
169
 
159
170
  .lead {
160
- grid-area: lead;
161
171
  min-width: 0;
162
172
  }
163
173
 
164
174
  .body {
165
- grid-area: body;
166
175
  min-width: 0;
176
+ margin-top: 24px;
167
177
  }
168
178
 
169
179
  .toolbar {
170
- margin-bottom: 20px;
180
+ grid-area: toolbar;
171
181
  flex-wrap: nowrap;
172
182
  min-width: 0;
183
+ padding: var(--dees-spacing-md) 24px 14px;
184
+ border-bottom: var(--dees-line-width-hairline) solid var(--dees-color-border-subtle);
173
185
  }
174
186
 
175
187
  .toolbar .badge {
@@ -309,13 +321,35 @@ export class DeesKanbanTicketDetail extends DeesElement {
309
321
  font-variant-numeric: tabular-nums;
310
322
  }
311
323
 
324
+ /* The properties are the side of the surface, not a box on it; they stay while the main column scrolls. */
312
325
  aside {
313
326
  grid-area: props;
314
327
  min-width: 0;
315
- padding: 14px 16px;
316
- border-radius: var(--dees-radius-xl);
317
- corner-shape: var(--dees-corner-shape);
318
- background: var(--dees-color-settings-group);
328
+ padding: 20px 24px 24px 20px;
329
+ border-left: var(--dees-line-width-hairline) solid var(--dees-color-border-subtle);
330
+ background: var(--dees-color-modal-sidebar);
331
+ overflow-y: auto;
332
+ overscroll-behavior: contain;
333
+ scrollbar-width: thin;
334
+ }
335
+
336
+ /* Edit ticket shares the Status label's line without making it taller: 1lh is the label's line. */
337
+ .field-head {
338
+ display: flex;
339
+ align-items: center;
340
+ gap: 8px;
341
+ margin-bottom: 5px;
342
+ font-size: var(--dees-font-caption1-size);
343
+ }
344
+
345
+ .fields .field-head label {
346
+ flex: 1;
347
+ margin-bottom: 0;
348
+ }
349
+
350
+ .field-head dees-button {
351
+ flex-shrink: 0;
352
+ margin-block: calc((var(--dees-control-height-sm) - 1lh) / -2);
319
353
  }
320
354
 
321
355
  .fields {
@@ -584,21 +618,32 @@ export class DeesKanbanTicketDetail extends DeesElement {
584
618
  grid-area: apply;
585
619
  }
586
620
 
621
+ /* One column the container scrolls; the properties follow the main content as a full-width section. */
587
622
  @media (max-width: 700px) {
588
623
  :host {
624
+ display: block;
625
+ height: auto;
626
+ }
627
+ .toolbar {
628
+ gap: 6px;
629
+ padding: var(--dees-spacing-md) 16px;
630
+ }
631
+ .main {
589
632
  padding: 16px;
633
+ overflow: visible;
590
634
  }
591
- .layout {
592
- grid-template-columns: minmax(0, 1fr);
593
- grid-template-areas: 'lead' 'props' 'body';
594
- gap: 20px;
635
+ aside {
636
+ padding: 16px 16px 20px;
637
+ border-left: 0;
638
+ border-top: var(--dees-line-width-hairline) solid var(--dees-color-border-subtle);
639
+ overflow: visible;
595
640
  }
596
641
  .fields {
597
642
  grid-template-columns: repeat(2, minmax(0, 1fr));
598
643
  }
599
- .toolbar {
600
- gap: 6px;
601
- margin-bottom: 16px;
644
+ /* Edit ticket stays at the far side, clear of the next field. */
645
+ .fields .status {
646
+ grid-column: 1 / -1;
602
647
  }
603
648
  .child {
604
649
  gap: 7px;
@@ -777,22 +822,9 @@ export class DeesKanbanTicketDetail extends DeesElement {
777
822
  @click=${() => kanbanEvent(this, 'kanban-ticket-open', { ticketId: parent.id })}
778
823
  >${parent.title}</button>`
779
824
  : ''}
780
- <span class="spacer"></span>
781
- ${editable && !this.editing
782
- ? html`<dees-button
783
- size="sm"
784
- type="ghost"
785
- text=${this.t('kanban.editTicket')}
786
- icon="lucide:Pencil"
787
- @clicked=${() => {
788
- this.editing = true;
789
- this.changeDraft({});
790
- }}
791
- ></dees-button>`
792
- : ''}
793
825
  </div>
794
- ${this.error ? html`<p class="error" role="alert">${this.error}</p>` : ''}
795
- <div class="layout">
826
+ <div class="main">
827
+ ${this.error ? html`<p class="error" role="alert">${this.error}</p>` : ''}
796
828
  <section class="lead">
797
829
  ${this.editing && editable
798
830
  ? html`<div class="edit">
@@ -848,163 +880,6 @@ export class DeesKanbanTicketDetail extends DeesElement {
848
880
  >${ticket.description || this.t('kanban.noDescription')}</div>`}
849
881
  ${ticket.source ? this.renderSource(ticket.source) : ''}
850
882
  </section>
851
- <aside>
852
- <div class="fields">
853
- <div>
854
- <label class="caption">${this.t('kanban.status')}</label>
855
- <dees-input-dropdown
856
- label=${this.t('kanban.status')}
857
- .labelPosition=${'none'}
858
- .options=${this.columns.map(column => ({ key: column.id, option: column.title }))}
859
- .value=${{
860
- key: ticket.columnId,
861
- option:
862
- this.columns.find(column => column.id === ticket.columnId)?.title ??
863
- ticket.columnId,
864
- }}
865
- .disabled=${!movable || this.saving}
866
- @selectedOption=${(event: CustomEvent<{ key: string }>) =>
867
- kanbanEvent(this, 'kanban-ticket-move', {
868
- ticketId: ticket.id,
869
- columnId: event.detail.key,
870
- })}
871
- ></dees-input-dropdown>
872
- </div>
873
- ${this.editing && editable && projects.length
874
- ? html`<div>
875
- <label class="caption">${this.t('kanban.project')}</label>
876
- <dees-input-dropdown
877
- label=${this.t('kanban.project')}
878
- .labelPosition=${'none'}
879
- .disabled=${this.saving}
880
- .value=${{
881
- key: draft.project ?? '',
882
- option: draft.project
883
- ? kanbanProjectName(projects, draft.project)
884
- : this.t('kanban.noProject'),
885
- }}
886
- .options=${[
887
- ...(ticket.project ? [] : [{ key: '', option: this.t('kanban.noProject') }]),
888
- ...projects.map(project => ({ key: project.id, option: project.name })),
889
- ]}
890
- @selectedOption=${(event: CustomEvent<{ key: string }>) =>
891
- this.changeDraft({ project: event.detail.key })}
892
- ></dees-input-dropdown>
893
- </div>`
894
- : ticket.project || projects.length
895
- ? html`<div>
896
- <label class="caption">${this.t('kanban.project')}</label>
897
- <span class="value ${ticket.project ? '' : 'muted'}">${ticket.project
898
- ? kanbanProjectName(projects, ticket.project)
899
- : this.t('kanban.noProject')}</span>
900
- </div>`
901
- : ''}
902
- ${this.editing && editable
903
- ? html`
904
- <div>
905
- <label class="caption">${this.t('kanban.priorityLabel')}</label>
906
- <dees-input-dropdown
907
- label=${this.t('kanban.priorityLabel')}
908
- .labelPosition=${'none'}
909
- .disabled=${this.saving}
910
- .value=${{ key: draft.priority, option: this.t('kanban.priority', { priority: draft.priority }) }}
911
- .options=${(['none', 'low', 'normal', 'high', 'urgent'] as const).map(key => ({
912
- key,
913
- option: this.t('kanban.priority', { priority: key }),
914
- }))}
915
- @selectedOption=${(event: CustomEvent<{ key: TKanbanPriority }>) =>
916
- this.changeDraft({ priority: event.detail.key })}
917
- ></dees-input-dropdown>
918
- </div>
919
- <div>
920
- <label class="caption">${this.t('kanban.assignee')}</label>
921
- <dees-input-dropdown
922
- label=${this.t('kanban.assignee')}
923
- .labelPosition=${'none'}
924
- .disabled=${this.saving}
925
- .value=${{
926
- key: draft.assigneeId,
927
- option:
928
- this.people.find(person => person.id === draft.assigneeId)?.name ??
929
- ticket.assignee?.name ??
930
- this.t('kanban.unassigned'),
931
- }}
932
- .options=${[
933
- { key: '', option: this.t('kanban.unassigned') },
934
- ...this.people.map(person => ({ key: person.id, option: person.name })),
935
- ]}
936
- @selectedOption=${(event: CustomEvent<{ key: string }>) =>
937
- this.changeDraft({ assigneeId: event.detail.key })}
938
- ></dees-input-dropdown>
939
- </div>
940
- ${ticket.kind !== 'epic'
941
- ? html`<div>
942
- <label class="caption">${this.t(ticket.kind === 'task' ? 'kanban.epic' : 'kanban.parentTask')}</label>
943
- <dees-input-dropdown
944
- label=${this.t(ticket.kind === 'task' ? 'kanban.epic' : 'kanban.parentTask')}
945
- .labelPosition=${'none'}
946
- .disabled=${this.saving}
947
- .value=${{
948
- key: draft.parentId,
949
- option: parents.find(item => item.id === draft.parentId)?.title ?? this.t('kanban.none'),
950
- }}
951
- .options=${[
952
- ...(ticket.kind === 'task' ? [{ key: '', option: this.t('kanban.none') }] : []),
953
- ...parents.map(item => ({ key: item.id, option: ticketLabel(item) })),
954
- ]}
955
- @selectedOption=${(event: CustomEvent<{ key: string }>) =>
956
- this.changeDraft({ parentId: event.detail.key })}
957
- ></dees-input-dropdown>
958
- </div>`
959
- : ''}
960
- `
961
- : html`<div>
962
- <label class="caption">${this.t('kanban.priorityLabel')}</label>
963
- <span class="priority value" data-priority=${ticket.priority ?? 'none'}><dees-icon
964
- .icon=${kanbanPriorityIcon(ticket.priority)}
965
- iconSize="13"
966
- aria-hidden="true"
967
- ></dees-icon>${this.t('kanban.priority', { priority: ticket.priority ?? 'none' })}</span>
968
- </div>
969
- <div>
970
- <label class="caption">${this.t('kanban.assignee')}</label>
971
- <span class="person value"><span class="avatar" aria-hidden="true">${ticket.assignee
972
- ? kanbanInitials(ticket.assignee.name)
973
- : '–'}</span>${ticket.assignee?.name ?? this.t('kanban.unassigned')}</span>
974
- </div>`}
975
- ${this.editing && editable
976
- ? html`<div>
977
- <label class="caption">${this.t('kanban.labels')}</label>
978
- <dees-input-tags
979
- label=${this.t('kanban.labels')}
980
- .labelPosition=${'none'}
981
- .disabled=${this.saving}
982
- .value=${draft.labels ?? ticket.labels ?? []}
983
- .suggestions=${labels}
984
- .placeholder=${this.t('kanban.labelsPlaceholder')}
985
- @change=${(event: CustomEvent<{ value: string[] }>) => {
986
- event.stopPropagation();
987
- this.changeDraft({ labels: [...event.detail.value] });
988
- }}
989
- @input=${(event: Event) => event.stopPropagation()}
990
- ></dees-input-tags>
991
- </div>`
992
- : ticket.labels?.length
993
- ? html`<div>
994
- <label class="caption">${this.t('kanban.labels')}</label>
995
- <div class="row value">
996
- ${ticket.labels.map(label => html`<span class="badge">${label}</span>`)}
997
- </div>
998
- </div>`
999
- : ''}
1000
- </div>
1001
- ${ticket.createdAt || ticket.updatedAt
1002
- ? html`<footer class="stamps">
1003
- ${ticket.createdAt ? this.renderStamp('created', ticket.createdAt, ticket.createdBy) : ''}
1004
- ${ticket.updatedAt ? this.renderStamp('updated', ticket.updatedAt, ticket.updatedBy) : ''}
1005
- </footer>`
1006
- : ''}
1007
- </aside>
1008
883
  <div class="body">
1009
884
  ${ticket.links?.length
1010
885
  ? html`<section class="links">
@@ -1053,7 +928,178 @@ export class DeesKanbanTicketDetail extends DeesElement {
1053
928
  : ''}
1054
929
  ${this.provider.loadActivity ? this.renderFeed(ticket) : this.renderDiscussion(ticket)}
1055
930
  </div>
1056
- </div>`;
931
+ </div>
932
+ <aside>
933
+ <div class="fields">
934
+ <div class="status">
935
+ <div class="field-head">
936
+ <label class="caption">${this.t('kanban.status')}</label>
937
+ ${editable && !this.editing
938
+ ? html`<dees-button
939
+ size="sm"
940
+ type="ghost"
941
+ text=${this.t('kanban.editTicket')}
942
+ icon="lucide:Pencil"
943
+ @clicked=${() => {
944
+ this.editing = true;
945
+ this.changeDraft({});
946
+ }}
947
+ ></dees-button>`
948
+ : ''}
949
+ </div>
950
+ <dees-input-dropdown
951
+ label=${this.t('kanban.status')}
952
+ .labelPosition=${'none'}
953
+ .options=${this.columns.map(column => ({ key: column.id, option: column.title }))}
954
+ .value=${{
955
+ key: ticket.columnId,
956
+ option:
957
+ this.columns.find(column => column.id === ticket.columnId)?.title ??
958
+ ticket.columnId,
959
+ }}
960
+ .disabled=${!movable || this.saving}
961
+ @selectedOption=${(event: CustomEvent<{ key: string }>) =>
962
+ kanbanEvent(this, 'kanban-ticket-move', {
963
+ ticketId: ticket.id,
964
+ columnId: event.detail.key,
965
+ })}
966
+ ></dees-input-dropdown>
967
+ </div>
968
+ ${this.editing && editable && projects.length
969
+ ? html`<div>
970
+ <label class="caption">${this.t('kanban.project')}</label>
971
+ <dees-input-dropdown
972
+ label=${this.t('kanban.project')}
973
+ .labelPosition=${'none'}
974
+ .disabled=${this.saving}
975
+ .value=${{
976
+ key: draft.project ?? '',
977
+ option: draft.project
978
+ ? kanbanProjectName(projects, draft.project)
979
+ : this.t('kanban.noProject'),
980
+ }}
981
+ .options=${[
982
+ ...(ticket.project ? [] : [{ key: '', option: this.t('kanban.noProject') }]),
983
+ ...projects.map(project => ({ key: project.id, option: project.name })),
984
+ ]}
985
+ @selectedOption=${(event: CustomEvent<{ key: string }>) =>
986
+ this.changeDraft({ project: event.detail.key })}
987
+ ></dees-input-dropdown>
988
+ </div>`
989
+ : ticket.project || projects.length
990
+ ? html`<div>
991
+ <label class="caption">${this.t('kanban.project')}</label>
992
+ <span class="value ${ticket.project ? '' : 'muted'}">${ticket.project
993
+ ? kanbanProjectName(projects, ticket.project)
994
+ : this.t('kanban.noProject')}</span>
995
+ </div>`
996
+ : ''}
997
+ ${this.editing && editable
998
+ ? html`
999
+ <div>
1000
+ <label class="caption">${this.t('kanban.priorityLabel')}</label>
1001
+ <dees-input-dropdown
1002
+ label=${this.t('kanban.priorityLabel')}
1003
+ .labelPosition=${'none'}
1004
+ .disabled=${this.saving}
1005
+ .value=${{ key: draft.priority, option: this.t('kanban.priority', { priority: draft.priority }) }}
1006
+ .options=${(['none', 'low', 'normal', 'high', 'urgent'] as const).map(key => ({
1007
+ key,
1008
+ option: this.t('kanban.priority', { priority: key }),
1009
+ }))}
1010
+ @selectedOption=${(event: CustomEvent<{ key: TKanbanPriority }>) =>
1011
+ this.changeDraft({ priority: event.detail.key })}
1012
+ ></dees-input-dropdown>
1013
+ </div>
1014
+ <div>
1015
+ <label class="caption">${this.t('kanban.assignee')}</label>
1016
+ <dees-input-dropdown
1017
+ label=${this.t('kanban.assignee')}
1018
+ .labelPosition=${'none'}
1019
+ .disabled=${this.saving}
1020
+ .value=${{
1021
+ key: draft.assigneeId,
1022
+ option:
1023
+ this.people.find(person => person.id === draft.assigneeId)?.name ??
1024
+ ticket.assignee?.name ??
1025
+ this.t('kanban.unassigned'),
1026
+ }}
1027
+ .options=${[
1028
+ { key: '', option: this.t('kanban.unassigned') },
1029
+ ...this.people.map(person => ({ key: person.id, option: person.name })),
1030
+ ]}
1031
+ @selectedOption=${(event: CustomEvent<{ key: string }>) =>
1032
+ this.changeDraft({ assigneeId: event.detail.key })}
1033
+ ></dees-input-dropdown>
1034
+ </div>
1035
+ ${ticket.kind !== 'epic'
1036
+ ? html`<div>
1037
+ <label class="caption">${this.t(ticket.kind === 'task' ? 'kanban.epic' : 'kanban.parentTask')}</label>
1038
+ <dees-input-dropdown
1039
+ label=${this.t(ticket.kind === 'task' ? 'kanban.epic' : 'kanban.parentTask')}
1040
+ .labelPosition=${'none'}
1041
+ .disabled=${this.saving}
1042
+ .value=${{
1043
+ key: draft.parentId,
1044
+ option: parents.find(item => item.id === draft.parentId)?.title ?? this.t('kanban.none'),
1045
+ }}
1046
+ .options=${[
1047
+ ...(ticket.kind === 'task' ? [{ key: '', option: this.t('kanban.none') }] : []),
1048
+ ...parents.map(item => ({ key: item.id, option: ticketLabel(item) })),
1049
+ ]}
1050
+ @selectedOption=${(event: CustomEvent<{ key: string }>) =>
1051
+ this.changeDraft({ parentId: event.detail.key })}
1052
+ ></dees-input-dropdown>
1053
+ </div>`
1054
+ : ''}
1055
+ `
1056
+ : html`<div>
1057
+ <label class="caption">${this.t('kanban.priorityLabel')}</label>
1058
+ <span class="priority value" data-priority=${ticket.priority ?? 'none'}><dees-icon
1059
+ .icon=${kanbanPriorityIcon(ticket.priority)}
1060
+ iconSize="13"
1061
+ aria-hidden="true"
1062
+ ></dees-icon>${this.t('kanban.priority', { priority: ticket.priority ?? 'none' })}</span>
1063
+ </div>
1064
+ <div>
1065
+ <label class="caption">${this.t('kanban.assignee')}</label>
1066
+ <span class="person value"><span class="avatar" aria-hidden="true">${ticket.assignee
1067
+ ? kanbanInitials(ticket.assignee.name)
1068
+ : '–'}</span>${ticket.assignee?.name ?? this.t('kanban.unassigned')}</span>
1069
+ </div>`}
1070
+ ${this.editing && editable
1071
+ ? html`<div>
1072
+ <label class="caption">${this.t('kanban.labels')}</label>
1073
+ <dees-input-tags
1074
+ label=${this.t('kanban.labels')}
1075
+ .labelPosition=${'none'}
1076
+ .disabled=${this.saving}
1077
+ .value=${draft.labels ?? ticket.labels ?? []}
1078
+ .suggestions=${labels}
1079
+ .placeholder=${this.t('kanban.labelsPlaceholder')}
1080
+ @change=${(event: CustomEvent<{ value: string[] }>) => {
1081
+ event.stopPropagation();
1082
+ this.changeDraft({ labels: [...event.detail.value] });
1083
+ }}
1084
+ @input=${(event: Event) => event.stopPropagation()}
1085
+ ></dees-input-tags>
1086
+ </div>`
1087
+ : ticket.labels?.length
1088
+ ? html`<div>
1089
+ <label class="caption">${this.t('kanban.labels')}</label>
1090
+ <div class="row value">
1091
+ ${ticket.labels.map(label => html`<span class="badge">${label}</span>`)}
1092
+ </div>
1093
+ </div>`
1094
+ : ''}
1095
+ </div>
1096
+ ${ticket.createdAt || ticket.updatedAt
1097
+ ? html`<footer class="stamps">
1098
+ ${ticket.createdAt ? this.renderStamp('created', ticket.createdAt, ticket.createdBy) : ''}
1099
+ ${ticket.updatedAt ? this.renderStamp('updated', ticket.updatedAt, ticket.updatedBy) : ''}
1100
+ </footer>`
1101
+ : ''}
1102
+ </aside>`;
1057
1103
  }
1058
1104
 
1059
1105
  private renderDiscussion(ticket: IKanbanTicket, inFeed = false): TemplateResult {
package/ts_web/i18n/de.ts CHANGED
@@ -905,6 +905,7 @@ export default dcMessages.translation('de', {
905
905
  'kanban.project': 'Projekt',
906
906
  'kanban.allProjects': 'Alle Projekte',
907
907
  'kanban.noProject': 'Kein Projekt',
908
+ 'kanban.projectRequired': 'Jedes Ticket gehört zu einem Projekt.',
908
909
  'kanban.label': 'Label',
909
910
  'kanban.allLabels': 'Alle Labels',
910
911
  'kanban.anyone': 'Alle Personen',
@@ -939,6 +939,7 @@ export const dcMessages = plugins.smarti18n.defineCatalog({
939
939
  'kanban.project': { message: 'Project', description: 'The project a ticket belongs to: the board\'s project filter and a ticket\'s field.' },
940
940
  'kanban.allProjects': { message: 'All projects', description: 'The project filter\'s option that shows the tasks of every project.' },
941
941
  'kanban.noProject': { message: 'No project', description: 'A ticket\'s project field while the ticket belongs to no project.' },
942
+ 'kanban.projectRequired': { message: 'Every ticket belongs to a project.', description: 'Below the create dialog\'s project field where the board requires one: why the dialog offers no "No project".' },
942
943
  'kanban.label': { message: 'Label', description: 'The board\'s label filter.' },
943
944
  'kanban.allLabels': { message: 'All labels', description: 'The label filter\'s option that shows tasks with any label.' },
944
945
  'kanban.anyone': { message: 'Anyone', description: 'The assignee filter\'s option that shows the tasks of every person.' },