|
@@ -7,7 +7,7 @@
|
|
|
|
|
|
|
|
<UiInputDateRangePicker
|
|
<UiInputDateRangePicker
|
|
|
:model-value="datesRange"
|
|
:model-value="datesRange"
|
|
|
- max-height="28"
|
|
|
|
|
|
|
+ :max-height="28"
|
|
|
@update:model-value="updateDateTimeRange"
|
|
@update:model-value="updateDateTimeRange"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
@@ -37,7 +37,6 @@ import {WatchStopHandle} from "@vue/runtime-core";
|
|
|
import {useEntityManager} from "~/composables/data/useEntityManager";
|
|
import {useEntityManager} from "~/composables/data/useEntityManager";
|
|
|
import Access from "~/models/Access/Access";
|
|
import Access from "~/models/Access/Access";
|
|
|
import DateUtils from "~/services/utils/dateUtils";
|
|
import DateUtils from "~/services/utils/dateUtils";
|
|
|
-import formatISO from 'date-fns/formatISO'
|
|
|
|
|
|
|
|
|
|
const btn: Ref = ref(null)
|
|
const btn: Ref = ref(null)
|
|
|
const show: Ref<boolean> = ref(false)
|
|
const show: Ref<boolean> = ref(false)
|
|
@@ -46,8 +45,6 @@ const { setDirty } = useFormStore()
|
|
|
const accessProfileStore = useAccessProfileStore()
|
|
const accessProfileStore = useAccessProfileStore()
|
|
|
const { em } = useEntityManager()
|
|
const { em } = useEntityManager()
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
const start = accessProfileStore.historical.dateStart
|
|
const start = accessProfileStore.historical.dateStart
|
|
|
const end = accessProfileStore.historical.dateStart
|
|
const end = accessProfileStore.historical.dateStart
|
|
|
|
|
|
|
@@ -65,20 +62,18 @@ const updateDateTimeRange = async (dates: Array<Date>): Promise<any> => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
accessProfileStore.setHistoricalRange(
|
|
accessProfileStore.setHistoricalRange(
|
|
|
- formatISO(datesRange.value[0], { representation: 'date' }),
|
|
|
|
|
- formatISO(datesRange.value[1], { representation: 'date' })
|
|
|
|
|
|
|
+ DateUtils.formatIsoShortDate(datesRange.value[0]),
|
|
|
|
|
+ DateUtils.formatIsoShortDate(datesRange.value[1])
|
|
|
)
|
|
)
|
|
|
setDirty(false)
|
|
setDirty(false)
|
|
|
|
|
|
|
|
- const access = await em.fetch(Access, accessProfileStore.id)
|
|
|
|
|
-
|
|
|
|
|
- const settings = access.setting
|
|
|
|
|
- settings.historical = accessProfileStore.historical
|
|
|
|
|
|
|
+ console.log(accessProfileStore.id)
|
|
|
|
|
+ console.log({'historical': accessProfileStore.historical})
|
|
|
|
|
|
|
|
await em.patch(
|
|
await em.patch(
|
|
|
Access,
|
|
Access,
|
|
|
accessProfileStore.id,
|
|
accessProfileStore.id,
|
|
|
- {'setting': settings}
|
|
|
|
|
|
|
+ {'historical': accessProfileStore.historical}
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
window.location.reload()
|
|
window.location.reload()
|