From 12522a4e6742e17b802c979b21dbbe9ba5def312 Mon Sep 17 00:00:00 2001 From: dpurbosakti Date: Thu, 2 Oct 2025 16:11:25 +0700 Subject: [PATCH] wip --- internal/domain/main-entities/division/dto.go | 10 +++++++--- pkg/auth-helper/tycovar.go | 4 ---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/domain/main-entities/division/dto.go b/internal/domain/main-entities/division/dto.go index e8ba2d97..77c0d08b 100644 --- a/internal/domain/main-entities/division/dto.go +++ b/internal/domain/main-entities/division/dto.go @@ -42,9 +42,11 @@ type MetaDto struct { type ResponseDto struct { ecore.SmallMain - Code string `json:"code"` - Name string `json:"name"` - Parent_Id *int16 `json:"parent_id"` + Code string `json:"code"` + Name string `json:"name"` + Parent_Id *int16 `json:"parent_id"` + Parent *Division `json:"parent"` + Childrens []Division `json:"childrens"` } func (d Division) ToResponse() ResponseDto { @@ -52,6 +54,8 @@ func (d Division) ToResponse() ResponseDto { Code: d.Code, Name: d.Name, Parent_Id: d.Parent_Id, + Parent: d.Parent, + Childrens: d.Childrens, } resp.SmallMain = d.SmallMain return resp diff --git a/pkg/auth-helper/tycovar.go b/pkg/auth-helper/tycovar.go index 7586956d..deda1097 100644 --- a/pkg/auth-helper/tycovar.go +++ b/pkg/auth-helper/tycovar.go @@ -39,10 +39,6 @@ func (a AuthInfo) IsPayment() bool { 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 { return a.User_Position_Code == string(ero.UPCMan) }