diff --git a/component/modal/modal.templ b/component/modal/modal.templ index 9742c2f..8a4b936 100644 --- a/component/modal/modal.templ +++ b/component/modal/modal.templ @@ -28,3 +28,32 @@ templ Modal(modalID string, modalTitle string, modalBody templ.Component, modalA } + +templ ModalXL(modalID string, modalTitle string, modalBody templ.Component, modalAction templ.Component, btnClose templ.Component) { + +} diff --git a/component/modal/modal_templ.go b/component/modal/modal_templ.go index 265f7e4..4af1cc3 100644 --- a/component/modal/modal_templ.go +++ b/component/modal/modal_templ.go @@ -83,3 +83,77 @@ func Modal(modalID string, modalTitle string, modalBody templ.Component, modalAc return templ_7745c5c3_Err }) } + +func ModalXL(modalID string, modalTitle string, modalBody templ.Component, modalAction templ.Component, btnClose templ.Component) templ.Component { + return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) { + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer) + if !templ_7745c5c3_IsBuffer { + templ_7745c5c3_Buffer = templ.GetBuffer() + defer templ.ReleaseBuffer(templ_7745c5c3_Buffer) + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var4 := templ.GetChildren(ctx) + if templ_7745c5c3_Var4 == nil { + templ_7745c5c3_Var4 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var6 string + templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(modalTitle) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `component\modal\modal.templ`, Line: 46, Col: 18} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = btnClose.Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = modalBody.Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + if !templ_7745c5c3_IsBuffer { + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteTo(templ_7745c5c3_W) + } + return templ_7745c5c3_Err + }) +} diff --git a/models/doctor.models.go b/models/doctor.models.go index 35e5785..e132a0a 100644 --- a/models/doctor.models.go +++ b/models/doctor.models.go @@ -28,8 +28,9 @@ type DoctorV1 struct { M_DoctorM_SpecialistID string `db:"M_DoctorM_SpecialistID"` M_SpecialistID string `db:"M_SpecialistID"` M_SpecialistName string `db:"M_SpecialistName"` + M_TitleName string `db:"M_TitleName"` M_DoctorAddress string `db:"M_DoctorAddress"` - M_DoctorAddressRegionalCd string `db:"M_DoctorAddressRegionalCd"` + M_DoctorAddressRegionalCd int `db:"M_DoctorAddressRegionalCd"` M_DoctorAddressCity string `db:"M_DoctorAddressCity"` M_DoctorAddressDistrict string `db:"M_DoctorAddressDistrict"` M_DoctorAddressState string `db:"M_DoctorAddressState"` diff --git a/services/dev/md.doctor.services.go b/services/dev/md.doctor.services.go index 9f60311..6f0de01 100644 --- a/services/dev/md.doctor.services.go +++ b/services/dev/md.doctor.services.go @@ -620,38 +620,12 @@ func (su *ServicesMdDoctor) GetListMdDoctor(search string, currentPage int, rowP querytotal := ` SELECT COUNT(*) FROM m_doctor as d - -- join terminology religion - JOIN terminology as religion - ON d.M_DoctorReligionCode = religion.code - AND d.M_DoctorReligionSystem = religion.code_system - AND religion.status_cd = 'normal' - -- join terminology blood type - JOIN terminology as bloodType - ON d.M_DoctorBloodTypeCode = bloodType.code - AND d.M_DoctorBloodTypeSystem = bloodType.code_system - AND bloodType.status_cd = 'normal' - -- join terminology blood rhesus - JOIN terminology as bloodRh - ON d.M_DoctorBloodRhCode = bloodRh.code - AND d.M_DoctorBloodRhSystem = bloodRh.code_system - AND bloodRh.status_cd = 'normal' - -- join terminology education - JOIN terminology as education - ON d.M_DoctorEducationCode = education.code - AND d.M_DoctorEducationSystem = education.code_system - AND education.status_cd = 'normal' - -- join terminology ethnic - JOIN terminology as ethnic - ON d.M_DoctorEtnicCode = ethnic.code - AND d.M_DoctorEtnicSystem = ethnic.code_system - AND ethnic.status_cd = 'normal' - -- join terminology identifier - JOIN terminology as identifier - ON d.M_DoctorIdentifierCode = identifier.code - AND d.M_DoctorIdentifierSystem = identifier.code_system - AND identifier.status_cd = 'normal' + -- join m_title + LEFT JOIN m_title as title + ON d.M_DoctorM_TitleID = title.M_TitleID + AND title.M_TitleIsActive = 'Y' -- join m_specialist - JOIN m_specialist as spesialis + LEFT JOIN m_specialist as spesialis ON d.M_DoctorM_SpecialistID = spesialis.M_SpecialistID AND spesialis.M_SpecialistIsActive = 'Y' WHERE d.M_DoctorIsActive = 'Y' AND @@ -713,6 +687,8 @@ func (su *ServicesMdDoctor) GetListMdDoctor(search string, currentPage int, rowP d.M_DoctorM_SpecialistID, spesialis.M_SpecialistID, spesialis.M_SpecialistName, + IFNULL(d.M_DoctorAddress, '') as M_DoctorAddress, + IFNULL(title.M_TitleName, '') as M_TitleName, d.M_DoctorCreated, d.M_DoctorCreatedUserID, d.M_DoctorLastUpdated, @@ -720,38 +696,12 @@ func (su *ServicesMdDoctor) GetListMdDoctor(search string, currentPage int, rowP d.M_DoctorDeletedUserID, d.M_DoctorDeleted FROM m_doctor as d - -- join terminology religion - JOIN terminology as religion - ON d.M_DoctorReligionCode = religion.code - AND d.M_DoctorReligionSystem = religion.code_system - AND religion.status_cd = 'normal' - -- join terminology blood type - JOIN terminology as bloodType - ON d.M_DoctorBloodTypeCode = bloodType.code - AND d.M_DoctorBloodTypeSystem = bloodType.code_system - AND bloodType.status_cd = 'normal' - -- join terminology blood rhesus - JOIN terminology as bloodRh - ON d.M_DoctorBloodRhCode = bloodRh.code - AND d.M_DoctorBloodRhSystem = bloodRh.code_system - AND bloodRh.status_cd = 'normal' - -- join terminology education - JOIN terminology as education - ON d.M_DoctorEducationCode = education.code - AND d.M_DoctorEducationSystem = education.code_system - AND education.status_cd = 'normal' - -- join terminology ethnic - JOIN terminology as ethnic - ON d.M_DoctorEtnicCode = ethnic.code - AND d.M_DoctorEtnicSystem = ethnic.code_system - AND ethnic.status_cd = 'normal' - -- join terminology identifier - JOIN terminology as identifier - ON d.M_DoctorIdentifierCode = identifier.code - AND d.M_DoctorIdentifierSystem = identifier.code_system - AND identifier.status_cd = 'normal' + -- join m_title + LEFT JOIN m_title as title + ON d.M_DoctorM_TitleID = title.M_TitleID + AND title.M_TitleIsActive = 'Y' -- join m_specialist - JOIN m_specialist as spesialis + LEFT JOIN m_specialist as spesialis ON d.M_DoctorM_SpecialistID = spesialis.M_SpecialistID AND spesialis.M_SpecialistIsActive = 'Y' WHERE d.M_DoctorIsActive = 'Y' AND