step 17 : onchange dob
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
||||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
dev_mddoctorview "cpone/views/dev/mddoctor"
|
||||
|
||||
@@ -50,6 +51,32 @@ type MdDoctorHandler struct {
|
||||
MdDoctorServices MdDoctorServices
|
||||
}
|
||||
|
||||
// calculate age
|
||||
func daysInMonth(year int, month time.Month) int {
|
||||
return time.Date(year, month+1, 0, 0, 0, 0, 0, time.UTC).Day()
|
||||
}
|
||||
|
||||
func CalculateAge(birthDate, currentDate time.Time) (years, months, days int) {
|
||||
years = currentDate.Year() - birthDate.Year()
|
||||
months = int(currentDate.Month() - birthDate.Month())
|
||||
days = currentDate.Day() - birthDate.Day()
|
||||
|
||||
// Adjust if birth date is later in the year than current date
|
||||
if days < 0 {
|
||||
// Calculate days in the previous month
|
||||
lastMonth := currentDate.AddDate(0, -1, 0)
|
||||
days += daysInMonth(lastMonth.Year(), lastMonth.Month())
|
||||
months--
|
||||
}
|
||||
|
||||
if months < 0 {
|
||||
months += 12
|
||||
years--
|
||||
}
|
||||
|
||||
return years, months, days
|
||||
}
|
||||
|
||||
// GET FOTO PROFILE DOCTOR
|
||||
func (lh *MdDoctorHandler) GetFotoProfile(c echo.Context) error {
|
||||
// Mengambil nama file dari parameter URL
|
||||
@@ -3883,6 +3910,18 @@ func (lh *MdDoctorHandler) HandleOpenEditForm(c echo.Context) error {
|
||||
Code: dataDoctorList.M_DoctorReligionCode,
|
||||
})
|
||||
|
||||
birthDate, err := time.Parse("2006-01-02", dataDoctorList.M_DoctorDOB)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error convert %v", err)
|
||||
}
|
||||
|
||||
currentDate, err := time.Parse("2006-01-02", dataTglNow)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error convert %v", err)
|
||||
}
|
||||
|
||||
tahun, bulan, hari := CalculateAge(birthDate, currentDate)
|
||||
|
||||
newForm := dev_mddoctorview.BodyFormDoctor(
|
||||
// doctor id
|
||||
models.CustomTextFieldv2Prm{
|
||||
@@ -3909,7 +3948,7 @@ func (lh *MdDoctorHandler) HandleOpenEditForm(c echo.Context) error {
|
||||
Placeholder: "Tanggal Lahir Edit",
|
||||
Type: "hidden",
|
||||
ID: "doctortgllahiredit",
|
||||
Value: dataDoctorList.M_DoctorDOB,
|
||||
// Value: dataDoctorList.M_DoctorDOB,
|
||||
// Value: "2021-01-01",
|
||||
},
|
||||
// sapaan
|
||||
@@ -3999,7 +4038,7 @@ func (lh *MdDoctorHandler) HandleOpenEditForm(c echo.Context) error {
|
||||
Placeholder: "Tahun",
|
||||
Type: "text",
|
||||
ID: "doctorimbuhantahun",
|
||||
// Value: "",
|
||||
Value: strconv.Itoa(tahun) + " Tahun",
|
||||
},
|
||||
// bulan
|
||||
models.CustomTextFieldv2Prm{
|
||||
@@ -4008,6 +4047,7 @@ func (lh *MdDoctorHandler) HandleOpenEditForm(c echo.Context) error {
|
||||
Placeholder: "Bulan",
|
||||
Type: "text",
|
||||
ID: "doctorimbuhanbulan",
|
||||
Value: strconv.Itoa(bulan) + " Bulan",
|
||||
},
|
||||
// hari
|
||||
models.CustomTextFieldv2Prm{
|
||||
@@ -4016,6 +4056,7 @@ func (lh *MdDoctorHandler) HandleOpenEditForm(c echo.Context) error {
|
||||
Placeholder: "Hari",
|
||||
Type: "text",
|
||||
ID: "doctorimbuhanhari",
|
||||
Value: strconv.Itoa(hari) + " Hari",
|
||||
},
|
||||
// pendidikan terakhir
|
||||
models.CustomDropdownv1Prm{
|
||||
|
||||
@@ -307,6 +307,136 @@ templ JsMdDoctor() {
|
||||
onLoadingEnd();
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener('htmx:afterSwap', function(event) {
|
||||
// Reinitialize selectpicker after HTMX content swap
|
||||
$('.selectpicker').selectpicker('refresh');
|
||||
});
|
||||
|
||||
htmx.onLoad(function(content) {
|
||||
const dobElement = document.querySelectorAll("input[name='doctorimbuhantanggallahir']");
|
||||
const dayElement = document.querySelectorAll("input[name='doctorimbuhanhari']");
|
||||
const monthElement = document.querySelectorAll("input[name='doctorimbuhanbulan']");
|
||||
const yearElement = document.querySelectorAll("input[name='doctorimbuhantahun']");
|
||||
|
||||
function setElementsReadonly(elements) {
|
||||
elements.forEach(element => {
|
||||
element.readOnly = true;
|
||||
});
|
||||
}
|
||||
|
||||
setElementsReadonly(dayElement);
|
||||
setElementsReadonly(monthElement);
|
||||
setElementsReadonly(yearElement);
|
||||
|
||||
for(var i = 0; i < dobElement.length; i++) {
|
||||
dobElement[i].addEventListener("change", (event) => {
|
||||
try {
|
||||
todate= new Date();
|
||||
|
||||
|
||||
var age= [], fromdate= new Date(event.target.value),
|
||||
y= [todate.getFullYear(), fromdate.getFullYear()],
|
||||
ydiff= y[0]-y[1],
|
||||
m= [todate.getMonth(), fromdate.getMonth()],
|
||||
mdiff= m[0]-m[1],
|
||||
d= [todate.getDate(), fromdate.getDate()],
|
||||
ddiff= d[0]-d[1];
|
||||
|
||||
if(mdiff < 0 || (mdiff=== 0 && ddiff<0))--ydiff;
|
||||
if(mdiff<0) mdiff+= 12;
|
||||
if(ddiff<0){
|
||||
fromdate.setMonth(m[1]+1, 0);
|
||||
ddiff= fromdate.getDate()-d[1]+d[0];
|
||||
--mdiff;
|
||||
}
|
||||
if(ydiff> 0) age.push(ydiff+ ' year'+(ydiff> 1? 's ':' '));
|
||||
if(mdiff> 0) age.push(mdiff+ ' month'+(mdiff> 1? 's':''));
|
||||
if(ddiff> 0) age.push(ddiff+ ' day'+(ddiff> 1? 's':''));
|
||||
if(age.length>1) age.splice(age.length-1,0,' and ');
|
||||
for (var t = 0; t < yearElement.length; ++t) {
|
||||
yearElement[t].value = ydiff;
|
||||
}
|
||||
for (var m = 0; m < monthElement.length; ++m) {
|
||||
monthElement[m].value = mdiff;
|
||||
|
||||
}
|
||||
for (var d = 0; d < dayElement.length; ++d) {
|
||||
dayElement[d].value = ddiff;
|
||||
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
|
||||
}
|
||||
}, false);
|
||||
}
|
||||
function tentukanTanggalLahir(umurTahun, umurBulan, umurHari) {
|
||||
// Memecah tanggal sekarang menjadi tahun, bulan, dan hari
|
||||
var tanggalSekarang = new Date().toISOString().slice(0, 10)
|
||||
console.log("tanggal sekarang");
|
||||
console.log(tanggalSekarang);
|
||||
const [tahunSekarang, bulanSekarang, hariSekarang] = tanggalSekarang.split('-').map(Number);
|
||||
|
||||
|
||||
// Mengurangi umur dari tanggal sekarang
|
||||
let tahunLahir = tahunSekarang - umurTahun;
|
||||
let bulanLahir = bulanSekarang - umurBulan;
|
||||
let hariLahir = hariSekarang - umurHari;
|
||||
|
||||
// Jika hari negatif, kurangi satu bulan dan tambahkan jumlah hari dari bulan sebelumnya
|
||||
if (hariLahir < 0) {
|
||||
bulanLahir--;
|
||||
|
||||
// Mendapatkan jumlah hari dalam bulan sebelumnya
|
||||
const bulanSebelumnya = bulanSekarang - 1 < 1 ? 12 : bulanSekarang - 1;
|
||||
const tahunSebelumnya = bulanSebelumnya === 12 ? tahunSekarang - 1 : tahunSekarang;
|
||||
hariLahir += new Date(tahunSebelumnya, bulanSebelumnya, 0).getDate();
|
||||
}
|
||||
|
||||
// Jika bulan negatif, kurangi satu tahun dan tambahkan 12 bulan
|
||||
if (bulanLahir < 0) {
|
||||
tahunLahir--;
|
||||
bulanLahir += 12;
|
||||
}
|
||||
|
||||
// Mengembalikan tanggal lahir dalam format YYYY-MM-DD
|
||||
return `${tahunLahir}-${String(bulanLahir).padStart(2, '0')}-${String(hariLahir).padStart(2, '0')}`;
|
||||
}
|
||||
|
||||
dayElement[0].addEventListener("change", (event) => {
|
||||
const tgll = tentukanTanggalLahir(yearElement[0].value, monthElement[0].value, dayElement[0].value);
|
||||
console.log(`Tanggal Lahir: ${tgll}`);
|
||||
dobElement[0].value = tgll + " Hari"
|
||||
});
|
||||
monthElement[0].addEventListener("change", (event) => {
|
||||
const tgll = tentukanTanggalLahir(yearElement[0].value, monthElement[0].value, dayElement[0].value);
|
||||
console.log(`Tanggal Lahir: ${tgll}`);
|
||||
dobElement[0].value = tgll + " Bulan"
|
||||
|
||||
});
|
||||
yearElement[0].addEventListener("change", (event) => {
|
||||
const tgll = tentukanTanggalLahir(yearElement[0].value, monthElement[0].value, dayElement[0].value);
|
||||
console.log(`Tanggal Lahir: ${tgll}`);
|
||||
dobElement[0].value = tgll + " Tahun"
|
||||
});
|
||||
dayElement[1].addEventListener("change", (event) => {
|
||||
const tgll = tentukanTanggalLahir(yearElement[1].value, monthElement[1].value, dayElement[1].value);
|
||||
console.log(`Tanggal Lahir: ${tgll}`);
|
||||
dobElement[1].value = tgll + " Hari"
|
||||
});
|
||||
monthElement[1].addEventListener("change", (event) => {
|
||||
const tgll = tentukanTanggalLahir(yearElement[1].value, monthElement[1].value, dayElement[1].value);
|
||||
console.log(`Tanggal Lahir: ${tgll}`);
|
||||
dobElement[1].value = tgll + " Bulan"
|
||||
|
||||
});
|
||||
yearElement[1].addEventListener("change", (event) => {
|
||||
const tgll = tentukanTanggalLahir(yearElement[1].value, monthElement[1].value, dayElement[1].value);
|
||||
console.log(`Tanggal Lahir: ${tgll}`);
|
||||
dobElement[1].value = tgll + " Tahun"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -321,94 +321,6 @@ templ BodyFormDoctor(
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
function formatDate(todayInput, birthdateValue)
|
||||
{
|
||||
var today = new Date(todayInput);
|
||||
|
||||
var years = today.getFullYear() - birthdateValue.getFullYear();
|
||||
var months = today.getMonth() - birthdateValue.getMonth();
|
||||
var days = today.getDate() - birthdateValue.getDate();
|
||||
|
||||
if (days < 0) {
|
||||
months--;
|
||||
days += new Date(today.getFullYear(), today.getMonth(), 0).getDate();
|
||||
}
|
||||
|
||||
if (months < 0) {
|
||||
years--;
|
||||
months += 12;
|
||||
}
|
||||
|
||||
document.querySelector("[name='doctorimbuhantahun']").value = years + ' Tahun';
|
||||
document.querySelector("[name='doctorimbuhanbulan']").value = months + ' Bulan';
|
||||
document.querySelector("[name='doctorimbuhanhari']").value = days + ' Hari';
|
||||
}
|
||||
|
||||
document.addEventListener('htmx:afterSwap', function(event) {
|
||||
// Reinitialize selectpicker after HTMX content swap
|
||||
$('.selectpicker').selectpicker('refresh');
|
||||
|
||||
document.getElementById('doctorimbuhantahun').setAttribute('readonly',true)
|
||||
document.getElementById('doctorimbuhanbulan').setAttribute('readonly',true)
|
||||
document.getElementById('doctorimbuhanhari').setAttribute('readonly',true)
|
||||
|
||||
// onchange date picker
|
||||
var birthdateInput = document.querySelector("#doctorimbuhantanggallahir");
|
||||
var invalidFeedback = birthdateInput.closest(".form-group").querySelector(".invalid-feedback");
|
||||
|
||||
var birthdateValue = birthdateInput.value;
|
||||
|
||||
var todayInput = document.querySelector("#doctortglnow");
|
||||
|
||||
birthdateInput.addEventListener('change', function() {
|
||||
var birthdateValue = new Date(birthdateInput.value);
|
||||
if (!isNaN(birthdateValue)) {
|
||||
formatDate(todayInput.value, birthdateValue)
|
||||
} else{
|
||||
birthdateInput.classList.add('is-invalid');
|
||||
invalidFeedback.textContent = 'Tanggal lahir tidak valid.';
|
||||
}
|
||||
})
|
||||
|
||||
var birthdateNowEdit = document.querySelector("#doctortgllahiredit");
|
||||
if (birthdateNowEdit.value.trim() !== "") {
|
||||
birthdateInput.value = birthdateNowEdit.value
|
||||
formatDate(todayInput.value, new Date(birthdateInput.value))
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
document.getElementById('doctorimbuhantahun').setAttribute('readonly',true)
|
||||
document.getElementById('doctorimbuhanbulan').setAttribute('readonly',true)
|
||||
document.getElementById('doctorimbuhanhari').setAttribute('readonly',true)
|
||||
|
||||
// onchange date picker
|
||||
var birthdateInput = document.querySelector("#doctorimbuhantanggallahir");
|
||||
var invalidFeedback = birthdateInput.closest(".form-group").querySelector(".invalid-feedback");
|
||||
|
||||
var birthdateValue = birthdateInput.value;
|
||||
|
||||
var todayInput = document.querySelector("#doctortglnow");
|
||||
|
||||
birthdateInput.addEventListener('change', function() {
|
||||
var birthdateValue = new Date(birthdateInput.value);
|
||||
if (!isNaN(birthdateValue)) {
|
||||
formatDate(todayInput.value, birthdateValue)
|
||||
} else{
|
||||
birthdateInput.classList.add('is-invalid');
|
||||
invalidFeedback.textContent = 'Tanggal lahir tidak valid.';
|
||||
}
|
||||
})
|
||||
|
||||
var birthdateNowEdit = document.querySelector("#doctortgllahiredit");
|
||||
if (birthdateNowEdit.value.trim() !== "") {
|
||||
birthdateInput.value = birthdateNowEdit.value
|
||||
formatDate(todayInput.value, new Date(birthdateInput.value))
|
||||
}
|
||||
});
|
||||
</script>
|
||||
}
|
||||
|
||||
script JsHideModalDoctor(modalID string) {
|
||||
|
||||
@@ -500,7 +500,7 @@ func BodyFormDoctor(
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><!-- Nomor HP end --></div></div><!-- col 3 start --></div></div></div><script>\r\n\r\n\tfunction formatDate(todayInput, birthdateValue)\r\n\t{\r\n\t\tvar today = new Date(todayInput);\r\n\t\t\t\t\r\n\t\tvar years = today.getFullYear() - birthdateValue.getFullYear();\r\n\t\tvar months = today.getMonth() - birthdateValue.getMonth();\r\n\t\tvar days = today.getDate() - birthdateValue.getDate();\r\n\t\t\r\n\t\tif (days < 0) {\r\n\t\t\tmonths--;\r\n\t\t\tdays += new Date(today.getFullYear(), today.getMonth(), 0).getDate();\r\n\t\t}\r\n\t\t\r\n\t\tif (months < 0) {\r\n\t\t\tyears--;\r\n\t\t\tmonths += 12;\r\n\t\t}\r\n\r\n\t\tdocument.querySelector(\"[name='doctorimbuhantahun']\").value = years + ' Tahun';\r\n\t\tdocument.querySelector(\"[name='doctorimbuhanbulan']\").value = months + ' Bulan';\r\n\t\tdocument.querySelector(\"[name='doctorimbuhanhari']\").value = days + ' Hari';\r\n\t}\r\n\r\n document.addEventListener('htmx:afterSwap', function(event) {\r\n // Reinitialize selectpicker after HTMX content swap\r\n $('.selectpicker').selectpicker('refresh');\r\n\r\n\t\tdocument.getElementById('doctorimbuhantahun').setAttribute('readonly',true)\r\n\t\tdocument.getElementById('doctorimbuhanbulan').setAttribute('readonly',true)\r\n\t\tdocument.getElementById('doctorimbuhanhari').setAttribute('readonly',true)\r\n\r\n\t\t// onchange date picker\r\n\t\tvar birthdateInput = document.querySelector(\"#doctorimbuhantanggallahir\");\r\n \tvar invalidFeedback = birthdateInput.closest(\".form-group\").querySelector(\".invalid-feedback\");\r\n\r\n \tvar birthdateValue = birthdateInput.value;\r\n\r\n\t\tvar todayInput = document.querySelector(\"#doctortglnow\");\r\n\t\r\n\t\tbirthdateInput.addEventListener('change', function() {\r\n\t\t\tvar birthdateValue = new Date(birthdateInput.value);\r\n\t\t\tif (!isNaN(birthdateValue)) {\r\n\t\t\t\tformatDate(todayInput.value, birthdateValue)\r\n\t\t\t} else{\r\n\t\t\t\tbirthdateInput.classList.add('is-invalid');\r\n\t\t\t\tinvalidFeedback.textContent = 'Tanggal lahir tidak valid.';\r\n\t\t\t}\r\n\t\t})\r\n\r\n\t\tvar birthdateNowEdit = document.querySelector(\"#doctortgllahiredit\");\r\n\t\tif (birthdateNowEdit.value.trim() !== \"\") {\r\n\t\t\tbirthdateInput.value = birthdateNowEdit.value\r\n\t\t\tformatDate(todayInput.value, new Date(birthdateInput.value))\r\n\t\t}\r\n });\r\n\r\n\tdocument.addEventListener('DOMContentLoaded', function() {\r\n\t\tdocument.getElementById('doctorimbuhantahun').setAttribute('readonly',true)\r\n\t\tdocument.getElementById('doctorimbuhanbulan').setAttribute('readonly',true)\r\n\t\tdocument.getElementById('doctorimbuhanhari').setAttribute('readonly',true)\r\n\r\n\t\t// onchange date picker\r\n\t\tvar birthdateInput = document.querySelector(\"#doctorimbuhantanggallahir\");\r\n \tvar invalidFeedback = birthdateInput.closest(\".form-group\").querySelector(\".invalid-feedback\");\r\n\r\n \tvar birthdateValue = birthdateInput.value;\r\n\r\n\t\tvar todayInput = document.querySelector(\"#doctortglnow\");\r\n\t\r\n\t\tbirthdateInput.addEventListener('change', function() {\r\n\t\t\tvar birthdateValue = new Date(birthdateInput.value);\r\n\t\t\tif (!isNaN(birthdateValue)) {\r\n\t\t\t\tformatDate(todayInput.value, birthdateValue)\r\n\t\t\t} else{\r\n\t\t\t\tbirthdateInput.classList.add('is-invalid');\r\n\t\t\t\tinvalidFeedback.textContent = 'Tanggal lahir tidak valid.';\r\n\t\t\t}\r\n\t\t})\r\n\r\n\t\tvar birthdateNowEdit = document.querySelector(\"#doctortgllahiredit\");\r\n\t\tif (birthdateNowEdit.value.trim() !== \"\") {\r\n\t\t\tbirthdateInput.value = birthdateNowEdit.value\r\n\t\t\tformatDate(todayInput.value, new Date(birthdateInput.value))\r\n\t\t}\r\n\t});\r\n </script>")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div><!-- Nomor HP end --></div></div><!-- col 3 start --></div></div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -580,7 +580,7 @@ func ActionFormDoctor(LinkClose string, targetClose string, hxSwapClose string,
|
||||
var templ_7745c5c3_Var14 string
|
||||
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(LinkClose)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mddoctor\mddoctorformmodal.templ`, Line: 438, Col: 22}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mddoctor\mddoctorformmodal.templ`, Line: 350, Col: 22}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -593,7 +593,7 @@ func ActionFormDoctor(LinkClose string, targetClose string, hxSwapClose string,
|
||||
var templ_7745c5c3_Var15 string
|
||||
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(targetClose)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mddoctor\mddoctorformmodal.templ`, Line: 439, Col: 26}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mddoctor\mddoctorformmodal.templ`, Line: 351, Col: 26}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -606,7 +606,7 @@ func ActionFormDoctor(LinkClose string, targetClose string, hxSwapClose string,
|
||||
var templ_7745c5c3_Var16 string
|
||||
templ_7745c5c3_Var16, templ_7745c5c3_Err = templ.JoinStringErrs(hxSwapClose)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mddoctor\mddoctorformmodal.templ`, Line: 440, Col: 24}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mddoctor\mddoctorformmodal.templ`, Line: 352, Col: 24}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var16))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -647,7 +647,7 @@ func BtnCloseFormDoctor(LinkClose string, targetClose string, hxSwapClose string
|
||||
var templ_7745c5c3_Var18 string
|
||||
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(LinkClose)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mddoctor\mddoctorformmodal.templ`, Line: 461, Col: 21}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mddoctor\mddoctorformmodal.templ`, Line: 373, Col: 21}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -660,7 +660,7 @@ func BtnCloseFormDoctor(LinkClose string, targetClose string, hxSwapClose string
|
||||
var templ_7745c5c3_Var19 string
|
||||
templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(targetClose)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mddoctor\mddoctorformmodal.templ`, Line: 462, Col: 25}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mddoctor\mddoctorformmodal.templ`, Line: 374, Col: 25}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -673,7 +673,7 @@ func BtnCloseFormDoctor(LinkClose string, targetClose string, hxSwapClose string
|
||||
var templ_7745c5c3_Var20 string
|
||||
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(hxSwapClose)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mddoctor\mddoctorformmodal.templ`, Line: 463, Col: 23}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mddoctor\mddoctorformmodal.templ`, Line: 375, Col: 23}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -728,7 +728,7 @@ func DeleteConfirmationBodyDoctor(inputId models.CustomTextFieldv2Prm,
|
||||
var templ_7745c5c3_Var23 string
|
||||
templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(componentID)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mddoctor\mddoctorformmodal.templ`, Line: 480, Col: 22}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mddoctor\mddoctorformmodal.templ`, Line: 392, Col: 22}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -750,7 +750,7 @@ func DeleteConfirmationBodyDoctor(inputId models.CustomTextFieldv2Prm,
|
||||
var templ_7745c5c3_Var25 string
|
||||
templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(message)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mddoctor\mddoctorformmodal.templ`, Line: 481, Col: 14}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mddoctor\mddoctorformmodal.templ`, Line: 393, Col: 14}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -768,7 +768,7 @@ func DeleteConfirmationBodyDoctor(inputId models.CustomTextFieldv2Prm,
|
||||
var templ_7745c5c3_Var26 string
|
||||
templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(v)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mddoctor\mddoctorformmodal.templ`, Line: 486, Col: 68}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mddoctor\mddoctorformmodal.templ`, Line: 398, Col: 68}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -791,7 +791,7 @@ func DeleteConfirmationBodyDoctor(inputId models.CustomTextFieldv2Prm,
|
||||
var templ_7745c5c3_Var27 string
|
||||
templ_7745c5c3_Var27, templ_7745c5c3_Err = templ.JoinStringErrs(v)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mddoctor\mddoctorformmodal.templ`, Line: 492, Col: 10}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mddoctor\mddoctorformmodal.templ`, Line: 404, Col: 10}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var27))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -858,7 +858,7 @@ func ActionFormDoctorDelete(LinkClose string, targetClose string, hxSwapClose st
|
||||
var templ_7745c5c3_Var30 string
|
||||
templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(LinkClose)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mddoctor\mddoctorformmodal.templ`, Line: 506, Col: 22}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mddoctor\mddoctorformmodal.templ`, Line: 418, Col: 22}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -871,7 +871,7 @@ func ActionFormDoctorDelete(LinkClose string, targetClose string, hxSwapClose st
|
||||
var templ_7745c5c3_Var31 string
|
||||
templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinStringErrs(targetClose)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mddoctor\mddoctorformmodal.templ`, Line: 507, Col: 26}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mddoctor\mddoctorformmodal.templ`, Line: 419, Col: 26}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -884,7 +884,7 @@ func ActionFormDoctorDelete(LinkClose string, targetClose string, hxSwapClose st
|
||||
var templ_7745c5c3_Var32 string
|
||||
templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(hxSwapClose)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mddoctor\mddoctorformmodal.templ`, Line: 508, Col: 24}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `views\dev\mddoctor\mddoctorformmodal.templ`, Line: 420, Col: 24}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
||||
Reference in New Issue
Block a user