Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change column order in attachments table #203

Merged
merged 1 commit into from
Oct 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions app/components/document-attachments.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<tr>
<th>{{t "attachments.filename"}}</th>
<th>{{t "attachments.filesize"}}</th>
<th>{{t "attachments.type"}}</th>
<th colspan="2">{{t "attachments.decision"}}</th>
<th>{{t "attachments.decision"}}</th>
<th colspan="2">{{t "attachments.type"}}</th>
{{!-- <th>{{t "attachments.delete"}}</th> --}}
</tr>
</thead>
Expand All @@ -26,22 +26,21 @@
</a>
</td>
<td>{{attachment.file.humanReadableSize}}</td>

<td class="au-c-custom-select-cell">
<select class="au-c-custom-select" {{on "change" (perform this.onSelectType attachment)}} disabled={{not attachment.decision}}>
<select class="au-c-custom-select" {{on "change" (perform this.onSelectDecision attachment)}}>
<option value="">{{t "attachments.typePlaceholder"}}</option>
{{#each this.typeOptions as |typeOption|}}
<option value={{typeOption.id}} selected={{eq attachment.type.id typeOption.id}}>{{typeOption.label}}
</option>
{{#each @decisions as |decisionOption|}}
<option value={{decisionOption.uri}} selected={{eq attachment.decision decisionOption.uri}}>
{{decisionOption.title}}</option>
{{/each}}
</select>
</td>
<td class="au-c-custom-select-cell">
<select class="au-c-custom-select" {{on "change" (perform this.onSelectDecision attachment)}}>
<select class="au-c-custom-select" {{on "change" (perform this.onSelectType attachment)}} disabled={{not attachment.decision}}>
<option value="">{{t "attachments.typePlaceholder"}}</option>
{{#each @decisions as |decisionOption|}}
<option value={{decisionOption.uri}} selected={{eq attachment.decision decisionOption.uri}}>
{{decisionOption.title}}</option>
{{#each this.typeOptions as |typeOption|}}
<option value={{typeOption.id}} selected={{eq attachment.type.id typeOption.id}}>{{typeOption.label}}
</option>
{{/each}}
</select>
</td>
Expand Down