add workstation enable text

This commit is contained in:
mahdahar 2025-11-07 08:49:01 +07:00
parent 82f8097337
commit a907fb675e

View File

@ -23,7 +23,11 @@ class WorkstationModel extends BaseModel {
}
public function getWorkstation($WorkstationID) {
$rows = $this->select('workstation.*, department.DepartmentName, wst1.WorkstationName as LinkToName')
$rows = $this->select("workstation.*, department.DepartmentName, wst1.WorkstationName as LinkToName,
CASE
WHEN workstation.Enable = 1 THEN 'Enabled'
ELSE 'Disabled'
END AS EnableText")
->join('workstation wst1', 'workstation.LinkTo=wst1.WorkstationID', 'left')
->join('department', 'department.DepartmentID=workstation.DepartmentID', 'left')
->where('workstation.WorkstationID', $WorkstationID)