diff --git a/src/views/contract/ListContractView.vue b/src/views/contract/ListContractView.vue
index 3cda50c..13a0889 100644
--- a/src/views/contract/ListContractView.vue
+++ b/src/views/contract/ListContractView.vue
@@ -3,58 +3,27 @@
Periode
-
-
+
+
-
Cetak
-
Buat
+
+
+ Cetak
+
+
+ Buat
-
-
+
+
@@ -70,24 +39,15 @@
-
+
Verifikasi
-
+
Hapus
@@ -100,90 +60,47 @@
-
-
+
+
- {{ item }}
+ {{ item }}
-
-
+
{{
statusText(scope.row)
- }}
+ }}
-
+
-
+
-
+
Cetak
-
+
Hapus
- Bersihkan Pilihan
+ Bersihkan Pilihan
Setel Ulang Penyaringan
Tampilkan Rincian
@@ -203,6 +120,7 @@ import {
import { formatDate } from "@/utils/date";
import { useUserStore } from "@/stores/user";
import { ElNotification, ElTable } from "element-plus";
+import { BASE_URL } from "@/api/api";
const user = useUserStore();
const router = useRouter();
@@ -323,12 +241,12 @@ const clearSelection = () => {
};
const expandData = () => {
- if(contractsTableRef.value){
+ if (contractsTableRef.value) {
contractsTableRef.value.data.forEach((row: any) => {
- contractsTableRef.value!.toggleRowExpansion(row, undefined);
- });
+ contractsTableRef.value!.toggleRowExpansion(row, undefined);
+ });
}
-
+
};
const filterPeriod = (value: string, row: any) => {
@@ -463,7 +381,7 @@ const handleDeleteContract = (id: string) => {
};
const handlePrint = (index: number, row: any) => {
- console.log(index, row);
+ window.location.href = `${BASE_URL}/v1/contracts/${row._id}/print`;
};
const isSelecetable = (row: any, index: number) => {
@@ -532,6 +450,7 @@ watch(
.el-table .danger-row {
--el-table-tr-bg-color: var(--el-color-danger-light-9);
}
+
.el-table .success-row {
--el-table-tr-bg-color: var(--el-color-success-light-9);
}