diff --git a/src/pages/Route/RouteList.vue b/src/pages/Route/RouteList.vue index 3dcc0af37..5dd82cc51 100644 --- a/src/pages/Route/RouteList.vue +++ b/src/pages/Route/RouteList.vue @@ -129,6 +129,28 @@ const updateWorker = (row, worker) => { row.workerUserName = worker.name; updateRoute(row); }; + +const confirmationDialog = ref(false); +const startingDate = ref(null); + +const cloneRoutes = () => { + axios.post('Routes/clone', { + created: startingDate.value, + ids: selectedRows.value.map((row) => row?.id), + }); + refreshKey.value++; + startingDate.value = null; +}; + +const markAsServed = () => { + selectedRows.value.forEach((row) => { + if (row?.id) { + axios.patch(`Routes/${row?.id}`, { isOk: true }); + } + }); + refreshKey.value++; + startingDate.value = null; +}; + + + +

{{ t('Select the starting date') }}

+
+ + + + + + + + + {{ t('Clone') }} + + +
+
@@ -165,7 +209,26 @@ const updateWorker = (row, worker) => { - + +
+ + {{ t('Clone Selected Routes') }} + + + + {{ t('Mark as served') }} + +
{ :rows="rows" flat row-key="id" - hide-pagination selection="multiple" + :rows-per-page-options="[0]" >