Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
4868f03
Rename Subject to Affected Item on activity monitor
apodacaduron Jan 26, 2026
aef8e40
Merge branch 'main' of https://github.com/sjacorg/bayanat into Usabil…
apodacaduron Jan 26, 2026
9cf9e98
add asterisk to bulletin dialog required fields
apodacaduron Jan 27, 2026
b2af492
allow passing a slot to date and search components
apodacaduron Jan 27, 2026
3d95c16
refactor events section to add dynamic asterisks and red outlines dyn…
apodacaduron Jan 27, 2026
39db50e
import asterisk on actors and incidents
apodacaduron Jan 27, 2026
451474d
add asterisk to actor and incident form
apodacaduron Jan 27, 2026
a001ae3
add asterisk to locations form
apodacaduron Jan 27, 2026
555e7bf
add asterisks and required field to sources page
apodacaduron Jan 27, 2026
b77761d
add asterisk and form with required fields to labels
apodacaduron Jan 27, 2026
5cabb34
add asterisk and form with required fields to eventtypes
apodacaduron Jan 27, 2026
7636dd6
refactor editable table to support form and dynamic required fields w…
apodacaduron Jan 27, 2026
679ffe0
pass required fields to component data page and fix infinite loop on …
apodacaduron Jan 27, 2026
c0a22f0
Merge branch 'main' of https://github.com/sjacorg/bayanat into Usabil…
apodacaduron Jan 28, 2026
ab2421b
make group name required using form and add asterisk to label
apodacaduron Jan 28, 2026
fc55900
make group color required, replace input for color input and add hex …
apodacaduron Jan 28, 2026
d9de97e
rename keys from title to name
apodacaduron Jan 28, 2026
4f54956
add asterisks to required fields in shortactordialog
apodacaduron Jan 28, 2026
4969637
add asterisk to change password form
apodacaduron Jan 28, 2026
a7dba4c
change notifications drawer width
apodacaduron Jan 28, 2026
812d3c1
update texts on important notifications dialog, change button look, c…
apodacaduron Jan 28, 2026
f5a16b4
update urgent notification style, add new borders, change style of ma…
apodacaduron Jan 28, 2026
944f0ce
implement mark all as read functionality on notifications drawer and …
apodacaduron Jan 28, 2026
2c6eb94
change text color, icon size and position
apodacaduron Jan 28, 2026
0981cb0
disable mark all as read if all are read
apodacaduron Jan 28, 2026
5b8b63b
tweak icon styles for urgent notifications
apodacaduron Jan 28, 2026
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
2 changes: 1 addition & 1 deletion enferno/admin/templates/admin/activity.html
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@
{ title: "{{_('User')}}", value: "user_id", width:50, sortable: false },
{ title: "{{_('Action')}}", value: "action", width:50, sortable: false },
{ title: "{{_('Status')}}", value: "status", width:50, sortable: false },
{ title: "{{_('Subject')}}", value: "subject", width:50, sortable: false },
{ title: "{{_('Affected Item')}}", value: "subject", width:50, sortable: false },
{ title: "{{_('Class')}}", value: "model", width:100, sortable: false },
{ title: "{{_('Details')}}", value: "details", width:200, sortable: false },
],
Expand Down
2 changes: 2 additions & 0 deletions enferno/admin/templates/admin/actors.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@
<script src="/static/js/components/PdfViewer.js"></script>
<script src="/static/js/components/SnapshotDialog.js"></script>
<script src="/static/js/components/Visualization.js"></script>
<script src="/static/js/components/Asterisk.js"></script>
<script src="/static/js/force-graph.min.js"></script>


Expand Down Expand Up @@ -1698,6 +1699,7 @@
app.component('EventsSection', EventsSection);
app.component('ReadMore', ReadMore);
app.component('FieldRenderer', FieldRenderer);
app.component('Asterisk', Asterisk);

app.component('RelatedBulletinsCard', RelatedBulletinsCard);
app.component('RelatedActorsCard', RelatedActorsCard);
Expand Down
2 changes: 2 additions & 0 deletions enferno/admin/templates/admin/bulletins.html
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@
<script src="/static/js/components/EventsSection.js"></script>
<script src="/static/js/components/ReadMore.js"></script>
<script src="/static/js/components/FieldRenderer.js"></script>
<script src="/static/js/components/Asterisk.js"></script>


<script src="/static/js/components/MissingPersonCard.js"></script>
Expand Down Expand Up @@ -1758,6 +1759,7 @@
app.component('IdNumberDynamicField', IdNumberDynamicField);
app.component('EventsSection', EventsSection);
app.component('FieldRenderer', FieldRenderer);
app.component('Asterisk', Asterisk);

app.use(router).use(vuetify);
router.isReady().then(() => {
Expand Down
108 changes: 61 additions & 47 deletions enferno/admin/templates/admin/component-data.html

Large diffs are not rendered by default.

169 changes: 89 additions & 80 deletions enferno/admin/templates/admin/eventtypes.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,73 +38,72 @@
</v-btn>

<v-dialog v-model="dialog" max-width="500px">

<v-card>
<v-card-title block>
<span class="headline">${ formTitle }</span>


</v-card-title>

<v-card-text>
<v-container>
<v-row>
<v-col cols="12" md="6">
<v-text-field
variant="solo"
v-model="editedItem.title"
label="{{ _('Title') }}"
></v-text-field>
</v-col>
<v-col cols="12" md="6">
<v-text-field
variant="solo"
v-model="editedItem.title_ar"
label="{{ _('Title (AR)') }}"
></v-text-field>
</v-col>
</v-row>
<v-row>
<v-col cols="12" md="6">
<v-checkbox label="{{ _('For Actors') }}"
v-model="editedItem.for_actor">
</v-checkbox>

</v-col>
<v-col cols="12" md="6">
<v-checkbox label="{{ _('For Bulletins') }}"
v-model="editedItem.for_bulletin">
</v-checkbox>

</v-col>
<v-form ref="form" @submit.prevent="save">
<v-card-text>
<v-container>
<v-row>
<v-col>
<v-textarea variant="solo"
v-model="editedItem.comments"
label="{{ _('Comments') }}">

</v-textarea>
<v-col cols="12" md="6">
<v-text-field
v-model="editedItem.title"
:rules="[validationRules.required()]"
>
<template v-slot:label>{{ _('Title') }} <Asterisk /></template>
</v-text-field>
</v-col>
<v-col cols="12" md="6">
<v-text-field
v-model="editedItem.title_ar"
label="{{ _('Title (AR)') }}"
></v-text-field>
</v-col>
</v-row>
</v-row>
</v-container>
</v-card-text>
<v-row>
<v-col cols="12" md="6">
<v-checkbox label="{{ _('For Actors') }}"
v-model="editedItem.for_actor">
</v-checkbox>

<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="blue darken-1"
text
@click="close"
>{{ _('Cancel') }}</v-btn
>
<v-btn
color="blue darken-1"
text
@click="save"
>{{ _('Save') }}</v-btn
>
</v-card-actions>
</v-col>
<v-col cols="12" md="6">
<v-checkbox label="{{ _('For Bulletins') }}"
v-model="editedItem.for_bulletin">
</v-checkbox>

</v-col>
<v-row>
<v-col>
<v-textarea
v-model="editedItem.comments"
label="{{ _('Comments') }}">

</v-textarea>
</v-col>
</v-row>
</v-row>
</v-container>
</v-card-text>

<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="blue darken-1"
text
@click="close"
>{{ _('Cancel') }}</v-btn
>
<v-btn
color="blue darken-1"
text
type="submit"
>{{ _('Save') }}</v-btn
>
</v-card-actions>
</v-form>
</v-card>
</v-dialog>

Expand Down Expand Up @@ -186,6 +185,7 @@
</v-main>

{% endblock %} {% block js %}
<script src="/static/js/components/Asterisk.js"></script>
<script>

const {createApp} = Vue;
Expand All @@ -199,6 +199,7 @@

data: () => ({
dialog: dialog,
validationRules: validationRules,
imDialog: false,
drawer: drawer,
loading: true,
Expand Down Expand Up @@ -301,31 +302,39 @@
},

save() {
if (this.editedIndex > -1) {
Object.assign(this.items[this.editedIndex], this.editedItem);
api.put(`/admin/api/eventtype/${this.editedItem.id}`, {item: this.editedItem})
this.$refs.form.validate().then(({ valid }) => {
if (!valid) {
this.showSnack("{{ _('Please review form for errors.') }}");
return;
}

if (this.editedIndex > -1) {
Object.assign(this.items[this.editedIndex], this.editedItem);
api.put(`/admin/api/eventtype/${this.editedItem.id}`, {item: this.editedItem})
.then(response => {
this.showSnack(response.data);
this.refresh();
this.close();
}).catch(err => {
this.showSnack(this.parseValidationError(err?.response?.data));
})

} else {

api.post("/admin/api/eventtype/", {item: this.editedItem})
.then(response => {
this.showSnack(response.data);
this.refresh();
this.close();
}).catch(err => {
this.showSnack(this.parseValidationError(err?.response?.data));
})

} else {

api.post("/admin/api/eventtype/", {item: this.editedItem})
.then(response => {
this.showSnack(response.data);
this.refresh();
this.close();
}).catch(err => {
this.showSnack(this.parseValidationError(err?.response?.data));
})
}
this.showSnack(response.data);
this.refresh();
this.close();
}).catch(err => {
this.showSnack(this.parseValidationError(err?.response?.data));
})
}
});
}
}
});
app.component('Asterisk', Asterisk);
app.use(vuetify).mount("#app")
</script>
{% endblock %}
{% endblock %}
2 changes: 2 additions & 0 deletions enferno/admin/templates/admin/incidents.html
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@
<script src="/static/js/components/RelationEditorCard.js"></script>
<script src="/static/js/components/EventsSection.js"></script>
<script src="/static/js/components/FieldRenderer.js"></script>
<script src="/static/js/components/Asterisk.js"></script>

<script src="/static/js/components/PdfViewer.js"></script>
<script src="/static/js/components/ImageViewer.js"></script>
Expand Down Expand Up @@ -1556,6 +1557,7 @@
app.component('RelationEditorCard', RelationEditorCard);
app.component('EventsSection', EventsSection);
app.component('FieldRenderer', FieldRenderer);
app.component('Asterisk', Asterisk);

app.use(router).use(vuetify);
router.isReady().then(() => {
Expand Down
4 changes: 3 additions & 1 deletion enferno/admin/templates/admin/jsapi.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ markFieldAsRequired_: "{{ _('Make the field required') }}",
markFieldAsSearchable_: "{{ _('Make the field searchable') }}",
showField_: "{{ _('Show Field') }}",
hideField_: "{{ _('Hide Field') }}",
requiredFields_: "{{ _('Required fields') }}",
showOption_: "{{ _('Show Option') }}",
hideOption_: "{{ _('Hide Option') }}",
deleteField_: "{{ _('Delete Field') }}",
Expand Down Expand Up @@ -118,9 +119,10 @@ to_: "{{ _('To') }}",
comments_: "{{ _('Comments') }}",
commentsAr_: "{{ _('Comments (Ar)') }}",
status_: "{{ _('Status') }}",
restrictToAccessGroups_: "{{ _('Restrict Actor to Access Group(s)') }}",
restrictActorToAccessGroups_: "{{ _('Restrict Actor to Access Group(s)') }}",
noAccessAccessGroups_: "{{ _('No Access Access Groups') }}",
profile_: "{{ _('Profile') }}",
location_: "{{ _('Location') }}",

showMore_: "{{ _('Show more') }}",
showLess_: "{{ _('Show less') }}",
Expand Down
Loading