added sender ID export, edit payment bug fix, profile page bug fix
This commit is contained in:
@@ -122,11 +122,23 @@
|
||||
<label class="form-label text-secondary fw-semibold small">Date of Birth (Month & Day)</label>
|
||||
<div class="row g-2">
|
||||
@php
|
||||
// Extract current month and day if they exist in the DB (e.g., "12-25" or "2026-12-25")
|
||||
$currentDob = $staff->dob ? date('m-d', strtotime($staff->dob)) : '--';
|
||||
[$currMonth, $currDay] = explode('-', $currentDob) + [null, null];
|
||||
$currMonth = null;
|
||||
$currDay = null;
|
||||
|
||||
if ($staff->dob) {
|
||||
$parts = explode('-', $staff->dob);
|
||||
if (count($parts) === 3) {
|
||||
// Handles "YYYY-MM-DD"
|
||||
$currMonth = str_pad($parts[1], 2, '0', STR_PAD_LEFT);
|
||||
$currDay = str_pad($parts[2], 2, '0', STR_PAD_LEFT);
|
||||
} elseif (count($parts) === 2) {
|
||||
// Handles "MM-DD"
|
||||
$currMonth = str_pad($parts[0], 2, '0', STR_PAD_LEFT);
|
||||
$currDay = str_pad($parts[1], 2, '0', STR_PAD_LEFT);
|
||||
}
|
||||
}
|
||||
@endphp
|
||||
|
||||
|
||||
<!-- Month Dropdown -->
|
||||
<div class="col-7">
|
||||
<select class="form-select" name="birth_month">
|
||||
@@ -274,6 +286,9 @@
|
||||
@push('scripts')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
// Force the browser (and any attached libraries like Select2) to visually update to the selected options
|
||||
$('select[name="birth_month"]').val($('select[name="birth_month"] option[selected]').val()).trigger('change');
|
||||
$('select[name="birth_day"]').val($('select[name="birth_day"] option[selected]').val()).trigger('change');
|
||||
// Profile Photo Preview
|
||||
$('#profilePhoto').on('change', function(e) {
|
||||
if(e.target.files && e.target.files[0]) {
|
||||
|
||||
Reference in New Issue
Block a user