Merge branch 'dev' of github.com:dikstub-rssa/simrs-be into migration
This commit is contained in:
@@ -66,6 +66,13 @@ func (a AuthInfo) IsPharmacist() bool {
|
||||
return *a.Employee_Position_Code == string(ero.EPCPha)
|
||||
}
|
||||
|
||||
func (a AuthInfo) IsScreener() bool { // MPP, petugas skrining
|
||||
if a.Employee_Position_Code == nil {
|
||||
return false
|
||||
}
|
||||
return *a.Employee_Position_Code == string(ero.EPCScr)
|
||||
}
|
||||
|
||||
// func (a AuthInfo) IsPayment() bool {
|
||||
// if a.Employee_Position_Code == nil {
|
||||
// return false
|
||||
@@ -97,3 +104,11 @@ func (a AuthInfo) IsNurseIntern() bool {
|
||||
func (a AuthInfo) HasEmployeePosition() bool {
|
||||
return a.Employee_Position_Code != nil
|
||||
}
|
||||
|
||||
func (a AuthInfo) IsReg() bool {
|
||||
return a.Employee_Position_Code != nil && *a.Employee_Position_Code == string(ero.EPCReg)
|
||||
}
|
||||
|
||||
func (a AuthInfo) IsSys() bool {
|
||||
return a.User_ContractPosition_Code == string(ero.CSCSys)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user