|
|
@@ -9,6 +9,9 @@ import BookingDetailDialog from './components/BookingDetailDialog.vue'
|
|
|
import EmailDialog from './components/EmailDialog.vue'
|
|
|
import TipsDialog from './components/TipsDialog.vue'
|
|
|
import { useRouter } from 'vue-router'
|
|
|
+import { useUserStore } from '@/stores/modules/user'
|
|
|
+
|
|
|
+const userStore = useUserStore()
|
|
|
const router = useRouter()
|
|
|
|
|
|
const props = defineProps({
|
|
|
@@ -388,7 +391,11 @@ defineExpose({
|
|
|
</el-button>
|
|
|
<!-- email -->
|
|
|
<el-button
|
|
|
- v-if="!isEmployeeRole && row.status === 'Approved'"
|
|
|
+ v-if="
|
|
|
+ !isEmployeeRole &&
|
|
|
+ row.status === 'Approved' &&
|
|
|
+ row.modify_by === userStore.userInfo.uname
|
|
|
+ "
|
|
|
@click="clickEmailBtn(row)"
|
|
|
class="action-btn el-button--blue"
|
|
|
style="height: 24px; width: 24px"
|
|
|
@@ -400,7 +407,11 @@ defineExpose({
|
|
|
@click="handleEdit(row)"
|
|
|
class="action-btn el-button--blue"
|
|
|
style="height: 24px; width: 24px"
|
|
|
- v-if="!isEmployeeRole && (row.status === 'Pending Approval' || row.status === 'Rejected')"
|
|
|
+ v-if="
|
|
|
+ !isEmployeeRole &&
|
|
|
+ (row.status === 'Pending Approval' || row.status === 'Rejected') &&
|
|
|
+ row.modify_by === userStore.userInfo.uname
|
|
|
+ "
|
|
|
>
|
|
|
<span class="font_family icon-icon_edit_b"> </span>
|
|
|
</el-button>
|
|
|
@@ -409,7 +420,11 @@ defineExpose({
|
|
|
@click="handleTips('cancel', row)"
|
|
|
class="action-btn el-button--blue"
|
|
|
style="height: 24px; width: 24px"
|
|
|
- v-if="!isEmployeeRole && row.status === 'Pending Approval'"
|
|
|
+ v-if="
|
|
|
+ !isEmployeeRole &&
|
|
|
+ row.status === 'Pending Approval' &&
|
|
|
+ row.modify_by === userStore.userInfo.uname
|
|
|
+ "
|
|
|
>
|
|
|
<span class="font_family icon-icon_cancelled_b"> </span>
|
|
|
</el-button>
|
|
|
@@ -417,14 +432,22 @@ defineExpose({
|
|
|
<el-button
|
|
|
@click="handleTips('approve', row)"
|
|
|
class="action-btn el-button--blue"
|
|
|
- v-if="isEmployeeRole && row.status === 'Pending Approval'"
|
|
|
+ v-if="
|
|
|
+ isEmployeeRole &&
|
|
|
+ row.status === 'Pending Approval' &&
|
|
|
+ row.kln_pic.includes(userStore.userInfo.employee_email)
|
|
|
+ "
|
|
|
style="height: 24px; width: 24px"
|
|
|
>
|
|
|
<span class="font_family icon-icon_confirm_b"> </span>
|
|
|
</el-button>
|
|
|
<!-- reject -->
|
|
|
<el-button
|
|
|
- v-if="isEmployeeRole && row.status === 'Pending Approval'"
|
|
|
+ v-if="
|
|
|
+ isEmployeeRole &&
|
|
|
+ row.status === 'Pending Approval' &&
|
|
|
+ row.kln_pic.includes(userStore.userInfo.employee_email)
|
|
|
+ "
|
|
|
@click="handleTips('reject', row)"
|
|
|
class="action-btn el-button--blue"
|
|
|
style="height: 24px; width: 24px"
|