| @@ -425,6 +425,8 @@ function PoInputGrid({ | |||||
| getActions: (params) => { | getActions: (params) => { | ||||
| console.log(params.row.status); | console.log(params.row.status); | ||||
| const status = params.row.status.toLowerCase(); | const status = params.row.status.toLowerCase(); | ||||
| console.log(stockInLineStatusMap[status]); | |||||
| console.log(session?.user?.abilities?.includes("APPROVAL")); | |||||
| return [ | return [ | ||||
| <GridActionsCellItem | <GridActionsCellItem | ||||
| icon={<PlayArrowIcon />} | icon={<PlayArrowIcon />} | ||||
| @@ -483,10 +485,10 @@ function PoInputGrid({ | |||||
| // marginRight: 1, | // marginRight: 1, | ||||
| }} | }} | ||||
| disabled={ | disabled={ | ||||
| stockInLineStatusMap[status] === 9 || | |||||
| stockInLineStatusMap[status] <= 2 || | |||||
| stockInLineStatusMap[status] >= 7 || | |||||
| (!session?.user?.abilities?.includes("APPROVAL") && (stockInLineStatusMap[status] >= 3 || stockInLineStatusMap[status] <= 5)) | |||||
| // stockInLineStatusMap[status] === 9 || | |||||
| // stockInLineStatusMap[status] <= 2 || | |||||
| // stockInLineStatusMap[status] >= 7 || | |||||
| ((stockInLineStatusMap[status] >= 3 && stockInLineStatusMap[status] <= 5) ? !session?.user?.abilities?.includes("APPROVAL"): false) | |||||
| } | } | ||||
| // set _isNew to false after posting | // set _isNew to false after posting | ||||
| // or check status | // or check status | ||||