Skip to content

Commit

Permalink
Merge pull request #4047 from mikhailprivalov/dataRangeDirectionHistory
Browse files Browse the repository at this point in the history
Data range direction history
  • Loading branch information
Wellheor1 authored Jul 2, 2024
2 parents e6b8d08 + 8d762ef commit 189bdeb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions appconf/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ def l2_modules() -> dict:
"legal_authenticator": SettingManager.get("legal_authenticator", default='false', default_type='b'),
"change_password": SettingManager.get("change_password", default='false', default_type='b'),
"limit_age_patient_registration": SettingManager.get("limit_age_patient_registration", default='false', default_type='b'),
"days_subtract": SettingManager.get("days_subtract", default='90', default_type='i'),
"forms_url": SettingManager.forms_url(),
}
cache.set(k, simplejson.dumps(result), 60 * 60 * 8)
Expand Down
8 changes: 7 additions & 1 deletion l2-frontend/src/pages/Directions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@
v-if="!l2_only_doc_call"
class="c"
>
<DirectionsHistory :patient_pk="selected_card.pk" />
<DirectionsHistory
:patient_pk="selected_card.pk"
:days-subtract="daysSubtract"
/>
</div>
<div
v-else-if="!hasGrid"
Expand Down Expand Up @@ -341,6 +344,9 @@ export default {
l2_schedule() {
return this.$store.getters.modules.l2_schedule;
},
daysSubtract() {
return this.$store.getters.modules.days_subtract;
},
},
watch: {
l2_only_doc_call: {
Expand Down
7 changes: 6 additions & 1 deletion l2-frontend/src/ui-cards/DirectionsHistory/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -454,12 +454,17 @@ export default {
required: false,
default: null,
},
daysSubtract: {
type: Number,
required: false,
default: 90,
},
},
data() {
return {
date_range: [
moment()
.subtract(6, 'month')
.subtract(this.daysSubtract, 'day')
.format('DD.MM.YY'),
moment().format('DD.MM.YY'),
],
Expand Down

0 comments on commit 189bdeb

Please sign in to comment.