You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
130 lines
6.7 KiB
130 lines
6.7 KiB
<div>
|
|
<div class="row">
|
|
<div class="col-sm-12 col-md-4">
|
|
<x-card :title="__('domains/admission/field.admission_schedule_detail.schedule_detail')">
|
|
<div class="row gy-3">
|
|
<div class="col-md-6 col-12 font-bold">
|
|
{{ __('domains/admission/field.admission_schedule.track_name') }}
|
|
</div>
|
|
<div class="col-md-6 text-muted col-12">{{ $this->admissionSchedule->admissionTrack->name }}</div>
|
|
|
|
<div class="col-md-6 col-12 font-bold">
|
|
{{ __('domains/admission/field.admission_schedule.term_name') }}
|
|
</div>
|
|
<div class="col-md-6 text-muted col-12">{{ $this->admissionSchedule->term->name }}</div>
|
|
|
|
<div class="col-md-6 col-12 font-bold">
|
|
{{ __('domains/admission/field.admission_schedule.date_start') }}
|
|
</div>
|
|
<div class="col-md-6 text-muted col-12">
|
|
{{ $this->admissionSchedule->date_start->format('d/M/Y') }}
|
|
</div>
|
|
|
|
<div class="col-md-6 col-12 font-bold">
|
|
{{ __('domains/admission/field.admission_schedule.date_end') }}
|
|
</div>
|
|
<div class="col-md-6 text-muted col-12">
|
|
{{ $this->admissionSchedule->date_end->format('d/M/Y') }}
|
|
</div>
|
|
|
|
<div class="col-md-6 col-12 font-bold">
|
|
{{ __('domains/admission/field.admission_schedule.re_registration_date_start') }}
|
|
</div>
|
|
<div class="col-md-6 text-muted col-12">
|
|
{{ $this->admissionSchedule->re_registration_date_start->format('d/M/Y') }}
|
|
</div>
|
|
|
|
<div class="col-md-6 col-12 font-bold">
|
|
{{ __('domains/admission/field.admission_schedule.re_registration_date_end') }}
|
|
</div>
|
|
<div class="col-md-6 text-muted col-12">
|
|
{{ $this->admissionSchedule->re_registration_date_end->format('d/M/Y') }}
|
|
</div>
|
|
</div>
|
|
</x-card>
|
|
</div>
|
|
<div class="col-sm-12 col-md-8">
|
|
<x-card :title="__('domains/admission/field.admission_schedule_detail.fee_detail')">
|
|
<x-slot:actions>
|
|
<x-button type="button" theme="primary" size="sm" icon="tabler-plus" icon-only />
|
|
</x-slot:actions>
|
|
|
|
<x-container.accordion id="fee-detail" wire:ignore.self>
|
|
@foreach ($this->studyPrograms as $study)
|
|
<x-container.accordion-item item-id="{{ $study->ulid }}">
|
|
<x-slot:header class="d-flex gap-3">
|
|
@if ($this->checkFeeSetup($study->id))
|
|
<x-badge variant="success" label="Complete" />
|
|
@else
|
|
<x-badge variant="danger" label="Not Set" />
|
|
@endif
|
|
<span>{{ $study->name }}</span>
|
|
</x-slot:header>
|
|
|
|
<div class="table-responsive">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
@foreach ($this->feeTypes as $fee)
|
|
<th>{{ $fee->name }}</th>
|
|
@endforeach
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($this->academicPrograms as $program)
|
|
<tr>
|
|
<td><strong>{{ $program->name }}</strong></td>
|
|
@foreach ($this->feeTypes as $fee)
|
|
@php($lookupKey = "{$study->id}_{$program->id}_{$fee->id}")
|
|
@php($feeRate = isset($this->feeRates[$lookupKey]) ? $this->feeRates[$lookupKey] : ' 0 ')
|
|
<td wire:key="{{ $lookupKey }}">
|
|
<x-badge
|
|
data-fee-type-id="{{ $fee->ulid }}"
|
|
data-program-id="{{ $program->ulid }}"
|
|
data-study-program-id="{{ $study->ulid }}"
|
|
data-fee-type="{{ $feeRate }}"
|
|
class="cursor-pointer"
|
|
x-on:click="$js.ask"
|
|
:label="$feeRate"
|
|
:variant="$this->setBadgeVariant($feeRate)"
|
|
/>
|
|
</td>
|
|
@endforeach
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</x-container.accordion-item>
|
|
@endforeach
|
|
</x-container.accordion>
|
|
</x-card>
|
|
</div>
|
|
</div>
|
|
|
|
@script
|
|
<script>
|
|
$js.ask = function (self) {
|
|
var dataset = self.target.dataset;
|
|
window.Swal.fire({
|
|
text: "You won't be able to revert this!",
|
|
input: 'text',
|
|
showCancelButton: true,
|
|
showLoaderOnConfirm: true,
|
|
inputValidator: (value) => {
|
|
if (!value) {
|
|
return 'You need to write something!';
|
|
}
|
|
},
|
|
preConfirm: (value) => {
|
|
return new Promise((resolve, reject) => {
|
|
$wire.updateFee(dataset.feeTypeId, dataset.programId, dataset.studyProgramId, value);
|
|
resolve();
|
|
});
|
|
},
|
|
});
|
|
};
|
|
</script>
|
|
@endscript
|
|
</div>
|
|
|