|
|
@@ -53,8 +53,11 @@ const handleColumns = (columns: any, status?: string) => {
|
|
|
curColumn = {
|
|
|
...curColumn,
|
|
|
formatter: ({ cellValue }: any) => {
|
|
|
+ if (!cellValue) return '--'
|
|
|
const rangeData = cellValue.split(';')
|
|
|
- return formatTimezone(rangeData[0]) + ' -- ' + formatTimezone(rangeData[1])
|
|
|
+ const leftDate = rangeData[0] ? formatTimezone(rangeData[0]) : '_'
|
|
|
+ const rightDate = rangeData[1] ? formatTimezone(rangeData[0]) : '_'
|
|
|
+ return leftDate + ' -- ' + rightDate
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -320,7 +323,7 @@ const clickEmailBtn = (row: any) => {
|
|
|
const handelEdit = (row: any) => {
|
|
|
router.push({
|
|
|
path: '/destination-delivery/CreateNewBooking',
|
|
|
- query: { a: row._serial_no}
|
|
|
+ query: { a: row._serial_no }
|
|
|
})
|
|
|
}
|
|
|
|
|
|
@@ -409,7 +412,7 @@ defineExpose({
|
|
|
</el-button>
|
|
|
<!-- email -->
|
|
|
<el-button
|
|
|
- v-if="isEmployeeRole && row.status === 'Approved'"
|
|
|
+ v-if="!isEmployeeRole && row.status === 'Approved'"
|
|
|
@click="clickEmailBtn(row)"
|
|
|
class="action-btn el-button--blue"
|
|
|
style="height: 24px; width: 24px"
|
|
|
@@ -421,7 +424,7 @@ defineExpose({
|
|
|
@click="handelEdit(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'"
|
|
|
>
|
|
|
<span class="font_family icon-icon_edit_b"> </span>
|
|
|
</el-button>
|
|
|
@@ -430,7 +433,7 @@ 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'"
|
|
|
>
|
|
|
<span class="font_family icon-icon_cancelled_b"> </span>
|
|
|
</el-button>
|
|
|
@@ -438,14 +441,14 @@ 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'"
|
|
|
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'"
|
|
|
@click="handleTips('reject', row)"
|
|
|
class="action-btn el-button--blue"
|
|
|
style="height: 24px; width: 24px"
|