Merge branch 'dev' of github.com:dikstub-rssa/simrs-be into migration

This commit is contained in:
dpurbosakti
2025-12-09 12:47:44 +07:00
44 changed files with 2462 additions and 256 deletions
+15
View File
@@ -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)
}