step 6 : form add finished col 1 left
This commit is contained in:
@@ -26,7 +26,10 @@ type MdDoctorServices interface {
|
||||
// EditMdGroupResult(id string, groupresultname string, groupresultflagpertest string, groupresultflagnonlab string, groupresultresumemcu string) (models.DoctorV1, error)
|
||||
// DeleteMdGroupResult(id string) (models.DoctorV1, error)
|
||||
GetMdDoctorBreadcrumb(title string) (models.BreadCrumbV1, error)
|
||||
// GetMdGroupResultResumeMcu() ([]models.GroupResultResumeMcu, error)
|
||||
GetListMdSapaan() ([]models.TitleSapaan, error)
|
||||
GetJenisKelamin() ([]models.HardCodeDropdownV0, error)
|
||||
GetKewarganegaraan() ([]models.HardCodeRadioButtonV0, error)
|
||||
GetListMdSpesialis() ([]models.SpecialistV0, error)
|
||||
}
|
||||
|
||||
func NewMdDoctorHandler(us MdDoctorServices) *MdDoctorHandler {
|
||||
@@ -148,87 +151,187 @@ func (lh *MdDoctorHandler) HandleShowMdDoctorScreen(c echo.Context) error {
|
||||
dev_mddoctorview.AfterRequestContentMdDoctor(),
|
||||
)
|
||||
|
||||
// // listItem
|
||||
// dataResultMcu, err := lh.MdDoctorServices.GetMdGroupResultResumeMcu()
|
||||
// fmt.Println(dataResultMcu)
|
||||
// fmt.Println(err)
|
||||
// if err != nil {
|
||||
// defer logger.Sync()
|
||||
// logger.Info("ERROR BREADCRUMB DEV",
|
||||
// zap.Any("error", err),
|
||||
// )
|
||||
// fmt.Println(dataResultMcu)
|
||||
// return err
|
||||
// }
|
||||
// listItem Sapaan
|
||||
dataResultSapaan, err := lh.MdDoctorServices.GetListMdSapaan()
|
||||
fmt.Println(dataResultSapaan)
|
||||
fmt.Println(err)
|
||||
if err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Info("ERROR BREADCRUMB DEV",
|
||||
zap.Any("error", err),
|
||||
)
|
||||
fmt.Println(dataResultSapaan)
|
||||
return err
|
||||
}
|
||||
|
||||
// defer logger.Sync()
|
||||
// logger.Info("LOAD BREADCRUMB DEV",
|
||||
// zap.Any("data", dataBreadCrumb),
|
||||
// )
|
||||
// listItem Jenis Kelamin
|
||||
dataResultJenisKelamin, err := lh.MdDoctorServices.GetJenisKelamin()
|
||||
fmt.Println(dataResultJenisKelamin)
|
||||
fmt.Println(err)
|
||||
if err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Info("ERROR BREADCRUMB DEV",
|
||||
zap.Any("error", err),
|
||||
)
|
||||
fmt.Println(dataResultJenisKelamin)
|
||||
return err
|
||||
}
|
||||
|
||||
// // Component Dropdown MCU
|
||||
// listItemResultMcuComponent := dev_mddoctorview.ItemDropdown(dataResultMcu, 0)
|
||||
// listItem Golongan Darah
|
||||
dataResultGolonganDarah, err := services.GetTerminologyList(
|
||||
models.TerminologyParamv0{
|
||||
AttributePath: "Person.blood.type",
|
||||
CodeSystem: "http://loinc.org",
|
||||
},
|
||||
)
|
||||
fmt.Println(dataResultGolonganDarah)
|
||||
fmt.Println(err)
|
||||
if err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Info("ERROR BREADCRUMB DEV",
|
||||
zap.Any("error", err),
|
||||
)
|
||||
fmt.Println(dataResultGolonganDarah)
|
||||
return err
|
||||
}
|
||||
|
||||
// listItem Kewarganegaraan
|
||||
dataResultKewarganegaraan, err := lh.MdDoctorServices.GetKewarganegaraan()
|
||||
fmt.Println(dataResultKewarganegaraan)
|
||||
fmt.Println(err)
|
||||
if err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Info("ERROR BREADCRUMB DEV",
|
||||
zap.Any("error", err),
|
||||
)
|
||||
fmt.Println(dataResultKewarganegaraan)
|
||||
return err
|
||||
}
|
||||
|
||||
// listItem Specialist
|
||||
dataResultSpecialist, err := lh.MdDoctorServices.GetListMdSpesialis()
|
||||
fmt.Println(dataResultSpecialist)
|
||||
fmt.Println(err)
|
||||
if err != nil {
|
||||
defer logger.Sync()
|
||||
logger.Info("ERROR BREADCRUMB DEV",
|
||||
zap.Any("error", err),
|
||||
)
|
||||
fmt.Println(dataResultSpecialist)
|
||||
return err
|
||||
}
|
||||
|
||||
defer logger.Sync()
|
||||
logger.Info("LOAD BREADCRUMB DEV",
|
||||
zap.Any("data", dataBreadCrumb),
|
||||
)
|
||||
|
||||
// Component Dropdown MCU
|
||||
listItemResultSapaanComponent := dev_mddoctorview.ItemDropdownSapaan(dataResultSapaan, 0, "Sapaan")
|
||||
|
||||
// Component Dropdown JK
|
||||
listItemResultJKComponent := dev_mddoctorview.ItemDropdownJenisKelamin(dataResultJenisKelamin, 0, "Jenis Kelamin")
|
||||
|
||||
// Component Dropdown Golongan Darah
|
||||
listItemResultGDComponent := dev_mddoctorview.ItemDropdownTerminology(dataResultGolonganDarah,
|
||||
models.TerminologySelectedV0{},
|
||||
"Golongan Darah",
|
||||
)
|
||||
|
||||
// Component Radio Button Kewarganegaraan
|
||||
listItemResultKewarganegaraanComponent := dev_mddoctorview.ItemRadioButtonKewarganegaraan(dataResultKewarganegaraan, 0)
|
||||
|
||||
// Component Dropdown MCU
|
||||
listItemResultSpesialisComponent := dev_mddoctorview.ItemDropdownSpesialis(dataResultSpecialist, 0, "Pilih Spesialis")
|
||||
|
||||
//modal add form
|
||||
// dialogAddBodyCmp := dev_mddoctorview.BodyFormGroupResult(
|
||||
// models.CustomTextFieldv2Prm{
|
||||
// Label: "Group Result name",
|
||||
// Name: "groupresultid",
|
||||
// Placeholder: "Group Result name",
|
||||
// Type: "hidden",
|
||||
// ID: "groupresultid",
|
||||
// },
|
||||
// models.CustomTextFieldv2Prm{
|
||||
// Label: "Group Result Name",
|
||||
// Name: "groupresultname",
|
||||
// Placeholder: "Group Result Name",
|
||||
// Type: "text", ID: "groupresultname"},
|
||||
// models.CustomCheckboxv1Prm{
|
||||
// Label: "Group Result Flag Per Test (Dicentang Maka Ya)",
|
||||
// Name: "groupresultflagpertest",
|
||||
// ID: "groupresultflagpertest",
|
||||
// Value: "N",
|
||||
// },
|
||||
// models.CustomCheckboxv1Prm{
|
||||
// Label: "Group Result Flag Non Lab (Dicentang Maka Ya)",
|
||||
// Name: "groupresultflagnonlab",
|
||||
// ID: "groupresultflagnonlab",
|
||||
// Value: "N",
|
||||
// },
|
||||
// models.CustomDropdownv1Prm{
|
||||
// Label: "Group Result Resume MCU",
|
||||
// Name: "groupresultresumemcu",
|
||||
// ID: "groupresultresumemcu",
|
||||
// },
|
||||
// listItemResultMcuComponent,
|
||||
// dialogAddBodyID, dev_mddoctorview.JsHideModalGroupResult(""))
|
||||
dialogAddBodyCmp := dev_mddoctorview.BodyFormDoctor(
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Doctor ID",
|
||||
Name: "doctorid",
|
||||
Placeholder: "Doctor ID",
|
||||
Type: "hidden",
|
||||
ID: "doctorid",
|
||||
},
|
||||
models.CustomDropdownv1Prm{
|
||||
Label: "Sapaan",
|
||||
Name: "doctorsapaan",
|
||||
ID: "doctorsapaan",
|
||||
},
|
||||
listItemResultSapaanComponent,
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Imbuhan Awal 1",
|
||||
Name: "doctorimbuhanawal1",
|
||||
Placeholder: "Awal 1",
|
||||
Type: "text",
|
||||
ID: "doctorimbuhanawal1",
|
||||
},
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Imbuhan Awal 2",
|
||||
Name: "doctorimbuhanawal2",
|
||||
Placeholder: "Awal 2",
|
||||
Type: "text",
|
||||
ID: "doctorimbuhanawal2",
|
||||
},
|
||||
models.CustomDropdownv1Prm{
|
||||
Label: "Jenis Kelamin",
|
||||
Name: "doctorjeniskelamin",
|
||||
ID: "doctorjeniskelamin",
|
||||
},
|
||||
listItemResultJKComponent,
|
||||
models.CustomDropdownv1Prm{
|
||||
Label: "Golongan Darah",
|
||||
Name: "doctorgolongandarah",
|
||||
ID: "doctorgolongandarah",
|
||||
},
|
||||
listItemResultGDComponent,
|
||||
models.CustomRadioButtonv1Prm{
|
||||
Label: "Kewarganegaraan",
|
||||
Name: "doctorkewarganegaraan",
|
||||
ID: "doctorkewarganegaraan",
|
||||
},
|
||||
listItemResultKewarganegaraanComponent,
|
||||
models.CustomTextFieldv2Prm{
|
||||
Label: "Nomor Identitas",
|
||||
Name: "doctornomoridentitas",
|
||||
Placeholder: "Nomor Identitas",
|
||||
Type: "text",
|
||||
ID: "doctornomoridentitas",
|
||||
},
|
||||
models.CustomDropdownv1Prm{
|
||||
Label: "Spesialis",
|
||||
Name: "doctorspesialis",
|
||||
ID: "doctorspesialis",
|
||||
},
|
||||
listItemResultSpesialisComponent,
|
||||
dialogAddBodyID, dev_mddoctorview.JsHideModalDoctor(""))
|
||||
|
||||
// modalActioAddCmp := dev_mddoctorview.ActionFormGroupResult(
|
||||
// "/dev/md/doctorv2/closeaddform",
|
||||
// "#"+dialogAddBodyID,
|
||||
// "outerHTML",
|
||||
// "#"+dialogAddID)
|
||||
// btnCloaseModalAdd := dev_mddoctorview.BtnCloseFormGroupResult(
|
||||
// "/dev/md/doctorv2/closeaddform",
|
||||
// "#"+dialogAddBodyID,
|
||||
// "outerHTML",
|
||||
// "#"+dialogAddID)
|
||||
modalActioAddCmp := dev_mddoctorview.ActionFormDoctor(
|
||||
"/dev/md/doctorv2/closeaddform",
|
||||
"#"+dialogAddBodyID,
|
||||
"outerHTML",
|
||||
"#"+dialogAddID)
|
||||
btnCloaseModalAdd := dev_mddoctorview.BtnCloseFormDoctor(
|
||||
"/dev/md/doctorv2/closeaddform",
|
||||
"#"+dialogAddBodyID,
|
||||
"outerHTML",
|
||||
"#"+dialogAddID)
|
||||
|
||||
// // add
|
||||
// modalAddFormComponent := dev_mddoctorview.GroupResultForm(
|
||||
// models.GroupResultFormComponent{
|
||||
// IDComponent: "formgroupresult",
|
||||
// Link: "/dev/md/doctorv2/add",
|
||||
// HxTarget: "#" + dialogAddBodyID,
|
||||
// HxSwap: "outerHTML",
|
||||
// HxInclude: "#tableID, #paginationID, #searchID, #dialogAddBodyID, #dialogAddID, #dialogDeleteBodyID, #dialogEditBodyID, #" + searchID + ", #currpage" + paginationID,
|
||||
// ModalID: dialogAddID,
|
||||
// ModalTitle: "New-Group Result",
|
||||
// DialogBody: dialogAddBodyCmp,
|
||||
// DialogAction: modalActioAddCmp,
|
||||
// ButtonCLose: btnCloaseModalAdd,
|
||||
// },
|
||||
// )
|
||||
modalAddFormComponent := dev_mddoctorview.DoctorForm(
|
||||
models.DoctorFormComponent{
|
||||
IDComponent: "formdoctor",
|
||||
Link: "/dev/md/doctorv2/add",
|
||||
HxTarget: "#" + dialogAddBodyID,
|
||||
HxSwap: "outerHTML",
|
||||
HxInclude: "#tableID, #paginationID, #searchID, #dialogAddBodyID, #dialogAddID, #dialogDeleteBodyID, #dialogEditBodyID, #" + searchID + ", #currpage" + paginationID,
|
||||
ModalID: dialogAddID,
|
||||
ModalTitle: "New-Doctor",
|
||||
DialogBody: dialogAddBodyCmp,
|
||||
DialogAction: modalActioAddCmp,
|
||||
ButtonCLose: btnCloaseModalAdd,
|
||||
},
|
||||
)
|
||||
|
||||
// //modal edit form
|
||||
// dialogEditBodyCmp := dev_mddoctorview.BodyFormGroupResult(
|
||||
@@ -346,7 +449,7 @@ func (lh *MdDoctorHandler) HandleShowMdDoctorScreen(c echo.Context) error {
|
||||
// },
|
||||
// )
|
||||
|
||||
modalAddFormComponent := dev_mddoctorview.EmptyDiv1()
|
||||
// modalAddFormComponent := dev_mddoctorview.EmptyDiv1()
|
||||
modalEditFormComponent := dev_mddoctorview.EmptyDiv1()
|
||||
modalDeleteFormComponent := dev_mddoctorview.EmptyDiv1()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user