This commit is contained in:
dpurbosakti
2025-10-02 16:11:25 +07:00
parent 07914619d9
commit 12522a4e67
2 changed files with 7 additions and 7 deletions

No files matched your search

@@ -42,9 +42,11 @@ type MetaDto struct {
type ResponseDto struct { type ResponseDto struct {
ecore.SmallMain ecore.SmallMain
Code string `json:"code"` Code string `json:"code"`
Name string `json:"name"` Name string `json:"name"`
Parent_Id *int16 `json:"parent_id"` Parent_Id *int16 `json:"parent_id"`
Parent *Division `json:"parent"`
Childrens []Division `json:"childrens"`
} }
func (d Division) ToResponse() ResponseDto { func (d Division) ToResponse() ResponseDto {
@@ -52,6 +54,8 @@ func (d Division) ToResponse() ResponseDto {
Code: d.Code, Code: d.Code,
Name: d.Name, Name: d.Name,
Parent_Id: d.Parent_Id, Parent_Id: d.Parent_Id,
Parent: d.Parent,
Childrens: d.Childrens,
} }
resp.SmallMain = d.SmallMain resp.SmallMain = d.SmallMain
return resp return resp
-4
View File
@@ -39,10 +39,6 @@ func (a AuthInfo) IsPayment() bool {
return a.User_Position_Code == string(ero.UPCPay) return a.User_Position_Code == string(ero.UPCPay)
} }
func (a AuthInfo) IsPaymentVerificator() bool {
return a.User_Position_Code == string(ero.UPCPav)
}
func (a AuthInfo) IsManagement() bool { func (a AuthInfo) IsManagement() bool {
return a.User_Position_Code == string(ero.UPCMan) return a.User_Position_Code == string(ero.UPCMan)
} }