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

Quick fixes for the PWA #896

Merged
merged 6 commits into from
Sep 13, 2022
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix: various changes
- sort options for multiselect fields
- don't display last update for checklists if they haven't been updated
  • Loading branch information
dodumosu committed Sep 12, 2022
commit 0dbc1ab96081b2ca785a09b433f8145f6f2fea82
4 changes: 2 additions & 2 deletions apollo/pwa/templates/pwa/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ <h6 class="card-header" :class="getCompletionClass(index)"><a class="text-white"
</div>
<div class="mb-3" v-else-if="field.type === 'multiselect'">
<label :for="field.tag" class="form-label"><span class="fw-bold">[[ field.tag ]]</span> [[ field.description ]]</label>
<div class="form-check" v-for="(value, label) in field.options">
<div class="form-check" v-for="{value, label} in sortOptions(field.options)">
<label :for="field.tag" class="form-label">[[ label ]]</label>
<input type="checkbox" name="field.tag" :id="field.tag + '_' + value" class="form-check-input" :value="value" v-model="data[field.tag]" :disabled="locked" @change="markUpdated">
</div>
Expand Down Expand Up @@ -742,7 +742,7 @@ <h6 class="card-header" :class="getCompletionClass(index)"><a class="text-white"
return false;
},
formatLastUpdate(submission) {
if (isEmpty(submission)) return '';
if (isEmpty(submission) || !submission.updated) return '';
const prefix = "{{ _('Updated') }}"
return prefix + ' ' + luxon.DateTime.fromJSDate(submission.updated).setLocale('{{ g.locale.language }}').toRelative();
}
Expand Down