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.2 KiB
130 lines
6.2 KiB
<div>
|
|
<div class="row">
|
|
<div class="col-sm-12 col-md-4">
|
|
<x-card :title="__('domains/admission/section.admission-schedule-detail.schedule-detail')">
|
|
<div class="row gy-3">
|
|
<div class="col-12 col-md-6 font-bold">
|
|
{{ __('domains/admission/field.admission-schedule.track_name') }}
|
|
</div>
|
|
<div class="col-12 col-md-6 text-muted">
|
|
{{ $this->admissionSchedule->admissionTrack->name }}
|
|
</div>
|
|
|
|
<div class="col-12 col-md-6 font-bold">
|
|
{{ __('domains/admission/field.admission-schedule.term_name') }}
|
|
</div>
|
|
<div class="col-12 col-md-6 text-muted">
|
|
{{ $this->admissionSchedule->term->name }}
|
|
</div>
|
|
|
|
<div class="col-12 col-md-6 font-bold">
|
|
{{ __('domains/admission/field.admission-schedule.date-start') }}
|
|
</div>
|
|
<div class="col-12 col-md-6 text-muted">
|
|
{{ $this->admissionSchedule->date_start->format('d/M/Y') }}
|
|
</div>
|
|
|
|
<div class="col-12 col-md-6 font-bold">
|
|
{{ __('domains/admission/field.admission-schedule.date-end') }}
|
|
</div>
|
|
<div class="col-12 col-md-6 text-muted">
|
|
{{ $this->admissionSchedule->date_end->format('d/M/Y') }}
|
|
</div>
|
|
|
|
<div class="col-12 col-md-6 font-bold">
|
|
{{ __('domains/admission/field.admission-schedule.re-registration-date-start') }}
|
|
</div>
|
|
<div class="col-12 col-md-6 text-muted">
|
|
{{ $this->admissionSchedule->re_registration_date_start->format('d/M/Y') }}
|
|
</div>
|
|
|
|
<div class="col-12 col-md-6 font-bold">
|
|
{{ __('domains/admission/field.admission-schedule.re-registration-date-end') }}
|
|
</div>
|
|
<div class="col-12 col-md-6 text-muted">
|
|
{{ $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/section.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">
|
|
@foreach($this->studyPrograms as $study)
|
|
<x-container.accordion-item>
|
|
<x-slot:header class="d-flex gap-3">
|
|
<x-badge variant="danger" label="Not Set" />
|
|
<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($feeRate = $this->feeRates
|
|
->where('study_program_id', $study->id)
|
|
->where('academic_program_id', $program->id)
|
|
->where('fee_type_id', $fee->id)->first()?->amount ?? '0')
|
|
<td>
|
|
<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="danger" />
|
|
</td>
|
|
@endforeach
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</x-container.accordion-item>
|
|
@endforeach
|
|
</x-container.accordion>
|
|
</x-card>
|
|
</div>
|
|
</div>
|
|
|
|
@script
|
|
<script>
|
|
this.$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>
|
|
|