979 lines
66 KiB
PHP
979 lines
66 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
@include('layouts.shared/title-meta', ['title' => 'Form'])
|
|
@include('layouts.shared/head-css', ['mode' => $mode ?? '', 'demo' => $demo ?? ''])
|
|
<link href="{{ asset('assets/libs/sweetalert2/sweetalert2.min.css') }}" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<div id="pageloader">
|
|
<img src="/images/loader-large.gif" alt="processing..." />
|
|
</div>
|
|
|
|
@php
|
|
$brandData = [
|
|
|
|
['brand'=>'No. of Transplants', 'slug'=>'no_of_transpalnt_done','pseudoId'=>'no_of_transplants_week1','pseudoId2'=>'no_of_transplants_week2','pseudoId3'=>'no_of_transplants_week3','pseudoId4'=>'no_of_transplants_week4','pseudoId5'=>'no_of_transplants_total'],
|
|
['brand'=>'Cellcept Share Plan Achieved (De Novo no. of Patients)', 'slug'=>'cellcept_share_plan_ach','pseudoId'=>'cellcept_share_plan_week1','pseudoId2'=>'cellcept_share_plan_week2','pseudoId3'=>'cellcept_share_plan_week3','pseudoId4'=>'cellcept_share_plan_week4','pseudoId5'=>'cellcept_share_plan_total'],
|
|
['brand'=>'Cellcept Share Plan Achieved (Switch no. of Patients)', 'slug'=>'cellcept_share_plan_switch_ach','pseudoId'=>'cellcept_share_plan_switch_week1','pseudoId2'=>'cellcept_share_plan_switch_week2','pseudoId3'=>'cellcept_share_plan_switch_week3','pseudoId4'=>'cellcept_share_plan_switch_week4','pseudoId5'=>'cellcept_share_plan_switch_total']
|
|
];
|
|
|
|
$brandData2 = [
|
|
|
|
['brand'=>'No. of Dialysis sessions done', 'slug'=>'no_of_dialysis_sessions_ach','pseudoId'=>'no_of_dialysis_sessions_week1','pseudoId2'=>'no_of_dialysis_sessions_week2','pseudoId3'=>'no_of_dialysis_sessions_week3','pseudoId4'=>'no_of_dialysis_sessions_week4','pseudoId5'=>'no_of_dialysis_sessions_total'],
|
|
['brand'=>'Mircera 50: units Achieved', 'slug'=>'mircera_50_units_ach','pseudoId'=>'mircera_50_units_week1','pseudoId2'=>'mircera_50_units_week2','pseudoId3'=>'mircera_50_units_week3','pseudoId4'=>'mircera_50_units_week4','pseudoId5'=>'mircera_50_units_total'],
|
|
['brand'=>'Mircera 75: units Achieved', 'slug'=>'mircera_75_units_ach','pseudoId'=>'mircera_75_units_week1','pseudoId2'=>'mircera_75_units_week2','pseudoId3'=>'mircera_75_units_week3','pseudoId4'=>'mircera_75_units_week4','pseudoId5'=>'mircera_75_units_total'],
|
|
['brand'=>'Mircera 100: units Achieved', 'slug'=>'mircera_100_units_ach','pseudoId'=>'mircera_100_units_week1','pseudoId2'=>'mircera_100_units_week2','pseudoId3'=>'mircera_100_units_week3','pseudoId4'=>'mircera_100_units_week4','pseudoId5'=>'mircera_100_units_total']
|
|
|
|
];
|
|
|
|
|
|
@endphp
|
|
|
|
<body class="loading">
|
|
<div class="account-pages">
|
|
<div class="container">
|
|
<div class="row justify-content-center">
|
|
<div class="col-md-8 col-lg-6 col-xl-5 p-0">
|
|
<div class="card">
|
|
<div class="card-body p-3 row">
|
|
|
|
@if (Session::has('error'))
|
|
<div class="alert alert-danger">{{ Session::get('error') }}</div>
|
|
<br>
|
|
@endif
|
|
@if (session('success'))
|
|
<div class=" alert alert-success">{{ session('success') }}
|
|
</div>
|
|
<br>
|
|
@endif
|
|
{{-- <div class="col-8">
|
|
<h4 class="page-title">Plan Vs Execution Tracker</h4>
|
|
</div> --}}
|
|
@if (!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval !=
|
|
'yes'))
|
|
<div class="col-4">
|
|
@if ($form->link_type == 'form')
|
|
<!-- <a href="/form/history" class="float-end pt-1">View History</a> -->
|
|
<button type="button" class="btn btn-primary btn-xs" id="add-camp-btn">Add
|
|
Plan</button>
|
|
@else
|
|
<a href="{{ url()->previous() }}" class="float-end pt-1">Back</a>
|
|
@endif
|
|
</div>
|
|
@endif
|
|
|
|
@php
|
|
$history = Formhelper::getMultiformData($form->partition, $form->form_id, $form->user_id);
|
|
// echo "<pre>";
|
|
// print_r($history);
|
|
@endphp
|
|
|
|
|
|
<div class="col-12" id="table-wrapper">
|
|
|
|
|
|
<div class="table-responsive">
|
|
<table class="table table-borderless table-nowrap table-hover table-centered m-0">
|
|
|
|
<thead class="table-light">
|
|
<tr>
|
|
<th>Action.</th>
|
|
<th>Date of Entry</th>
|
|
<th>Execution Done</th>
|
|
<th>Doctor Name</th>
|
|
<th>Select Month</th>
|
|
<th>UID</th>
|
|
<th>Speciality</th>
|
|
<th>Select Centre/Hospital</th>
|
|
<th>Type of Transplant</th>
|
|
<th>No. of Transplants</th>
|
|
<th>Cellcept Share Plan (De Novo no. of Patients)</th>
|
|
<th>Cellcept Share Plan (Switch no. of Patients)</th>
|
|
<th>No. of Dialysis sessions planned</th>
|
|
<th>Mircera 50: units planned</th>
|
|
<th>Mircera 75: units planned</th>
|
|
<th>Mircera 100: units planned</th>
|
|
|
|
<th>No. of Transplants done Week 1</th>
|
|
<th>No. of Transplants done Week 2</th>
|
|
<th>No. of Transplants done Week 3</th>
|
|
<th>No. of Transplants done Week 4</th>
|
|
<th>Total No. of Transplants </th>
|
|
|
|
<th>Cellcept share (De novo no. of patients) Achieved Week 1</th>
|
|
<th>Cellcept share (De novo no. of patients) Achieved Week 2</th>
|
|
<th>Cellcept share (De novo no. of patients) Achieved Week 3</th>
|
|
<th>Cellcept share (De novo no. of patients) Achieved Week 4</th>
|
|
<th> Total Cellcept share (De novo no. of patients)</th>
|
|
|
|
|
|
<th>Cellcept share (Switch no. of patients) Achieved Week 1</th>
|
|
<th>Cellcept share (Switch no. of patients) Achieved Week 2</th>
|
|
<th>Cellcept share (Switch no. of patients) Achieved Week 3</th>
|
|
<th>Cellcept share (Switch no. of patients) Achieved Week 4</th>
|
|
<th>Total Cellcept share (Switch no. of patients)</th>
|
|
|
|
|
|
<th>No. of Dialysis sessions done Week 1</th>
|
|
<th>No. of Dialysis sessions done Week 2</th>
|
|
<th>No. of Dialysis sessions done Week 3</th>
|
|
<th>No. of Dialysis sessions done Week 4</th>
|
|
<th>Total No. of Dialysis sessions done</th>
|
|
|
|
|
|
<th>Mircera 50: units Achieved Week 1</th>
|
|
<th>Mircera 50: units Achieved Week 2</th>
|
|
<th>Mircera 50: units Achieved Week 3</th>
|
|
<th>Mircera 50: units Achieved Week 4</th>
|
|
<th>Total Mircera 50: units Achieved</th>
|
|
|
|
|
|
<th>Mircera 75: units Achieved Week 1</th>
|
|
<th>Mircera 75: units Achieved Week 2</th>
|
|
<th>Mircera 75: units Achieved Week 3</th>
|
|
<th>Mircera 75: units Achieved Week 4</th>
|
|
<th>Total Mircera 75: units Achieved</th>
|
|
|
|
|
|
<th>Mircera 100: units Achieved Week 1</th>
|
|
<th>Mircera 100: units Achieved Week 2</th>
|
|
<th>Mircera 100: units Achieved Week 3</th>
|
|
<th>Mircera 100: units Achieved Week 4</th>
|
|
<th>Total Mircera 100: units Achieved</th>
|
|
|
|
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($history->data->submissions as $sub)
|
|
@php
|
|
$sub->formdata->id = $sub->id;
|
|
@endphp
|
|
<tr>
|
|
<td>
|
|
<button type="button" class="btn btn-xs btn-info edit-btn"
|
|
plan_details="{{ json_encode($sub->formdata) }}"><i
|
|
class="mdi mdi-pencil"></i> Execute</button>
|
|
</td>
|
|
<td>{{ $sub->formdata->plan_date }}</td>
|
|
<td>{{ isset($sub->formdata->execution_done) && $sub->formdata->execution_done == 'yes' ? 'Yes' : 'No' }}
|
|
</td>
|
|
|
|
<td>
|
|
@if (isset($sub->formdata->contact_id) && $sub->formdata->contact_id
|
|
!== '')
|
|
{{ $sub->formdata->contact_id }}
|
|
@elseif (isset($sub->formdata->doctor_name))
|
|
{{ $sub->formdata->doctor_name }}
|
|
@else
|
|
{{-- Default value or empty string, adjust as needed --}}
|
|
{{ '' }}
|
|
@endif
|
|
</td>
|
|
<td>{{$sub->formdata->select_month}}</td>
|
|
|
|
<td>{{isset($sub->formdata->msl_code) ? $sub->formdata->msl_code: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->speciality) ? $sub->formdata->speciality: ''}}
|
|
</td>
|
|
|
|
<td>{{isset($sub->formdata->select_center_hospital) ? $sub->formdata->select_center_hospital: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->type_of_activity) ? $sub->formdata->type_of_activity: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->no_of_transpalnt) ? $sub->formdata->no_of_transpalnt: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->cellcept_share_plan) ? $sub->formdata->cellcept_share_plan: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->cellcept_share_plan_switch) ? $sub->formdata->cellcept_share_plan_switch: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->no_of_dialysis_sessions) ? $sub->formdata->no_of_dialysis_sessions: ''}}
|
|
</td>
|
|
|
|
|
|
<td>{{isset($sub->formdata->mircera_50_units) ? (int)$sub->formdata->mircera_50_units: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->mircera_75_units) ? (int)$sub->formdata->mircera_75_units: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->mircera_100_units) ? (int)$sub->formdata->mircera_100_units: ''}}
|
|
</td>
|
|
|
|
|
|
<td>{{isset($sub->formdata->no_of_transplants_week1) ? (int)$sub->formdata->no_of_transplants_week1: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->no_of_transplants_week2) ? (int)$sub->formdata->no_of_transplants_week2: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->no_of_transplants_week3) ? (int)$sub->formdata->no_of_transplants_week3: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->no_of_transplants_week4) ? (int)$sub->formdata->no_of_transplants_week4: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->no_of_transplants_total) ? (int)$sub->formdata->no_of_transplants_total: ''}}
|
|
</td>
|
|
|
|
<td>{{isset($sub->formdata->cellcept_share_plan_week1) ? (int)$sub->formdata->cellcept_share_plan_week1: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->cellcept_share_plan_week2) ? (int)$sub->formdata->cellcept_share_plan_week2: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->cellcept_share_plan_week3) ? (int)$sub->formdata->cellcept_share_plan_week3: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->cellcept_share_plan_week4) ? (int)$sub->formdata->cellcept_share_plan_week4: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->cellcept_share_plan_total) ? (int)$sub->formdata->cellcept_share_plan_total: ''}}
|
|
</td>
|
|
|
|
<td>{{isset($sub->formdata->cellcept_share_plan_switch_week1) ? (int)$sub->formdata->cellcept_share_plan_switch_week1: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->cellcept_share_plan_switch_week2) ? (int)$sub->formdata->cellcept_share_plan_switch_week2: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->cellcept_share_plan_switch_week3) ? (int)$sub->formdata->cellcept_share_plan_switch_week3: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->cellcept_share_plan_switch_week4) ? (int)$sub->formdata->cellcept_share_plan_switch_week4: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->no_of_transplants_total) ? (int)$sub->formdata->no_of_transplants_total: ''}}
|
|
</td>
|
|
|
|
<td>{{isset($sub->formdata->no_of_dialysis_sessions_week1) ? (int)$sub->formdata->no_of_dialysis_sessions_week1: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->no_of_dialysis_sessions_week2) ? (int)$sub->formdata->no_of_dialysis_sessions_week2: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->no_of_dialysis_sessions_week3) ? (int)$sub->formdata->no_of_dialysis_sessions_week3: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->no_of_dialysis_sessions_week4) ? (int)$sub->formdata->no_of_dialysis_sessions_week4: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->no_of_dialysis_sessions_total) ? (int)$sub->formdata->no_of_dialysis_sessions_total: ''}}
|
|
</td>
|
|
|
|
<td>{{isset($sub->formdata->mircera_50_units_week1) ? (int)$sub->formdata->mircera_50_units_week1: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->mircera_50_units_week2) ? (int)$sub->formdata->mircera_50_units_week2: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->mircera_50_units_week3) ? (int)$sub->formdata->mircera_50_units_week3: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->mircera_50_units_week4) ? (int)$sub->formdata->mircera_50_units_week4: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->mircera_50_units_total) ? (int)$sub->formdata->mircera_50_units_total: ''}}
|
|
</td>
|
|
|
|
<td>{{isset($sub->formdata->mircera_75_units_week1) ? (int)$sub->formdata->mircera_75_units_week1: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->mircera_75_units_week2) ? (int)$sub->formdata->mircera_75_units_week2: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->mircera_75_units_week3) ? (int)$sub->formdata->mircera_75_units_week3: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->mircera_75_units_week4) ? (int)$sub->formdata->mircera_75_units_week4: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->mircera_75_units_total) ? (int)$sub->formdata->mircera_75_units_total: ''}}
|
|
</td>
|
|
|
|
|
|
<td>{{isset($sub->formdata->mircera_100_units_week1) ? (int)$sub->formdata->mircera_100_units_week1: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->mircera_100_units_week2) ? (int)$sub->formdata->mircera_100_units_week2: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->mircera_100_units_week3) ? (int)$sub->formdata->mircera_100_units_week3: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->mircera_100_units_week4) ? (int)$sub->formdata->mircera_100_units_week4: ''}}
|
|
</td>
|
|
<td>{{isset($sub->formdata->mircera_100_units_total) ? (int)$sub->formdata->mircera_100_units_total: ''}}
|
|
</td>
|
|
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="form-wrapper">
|
|
<div class="col-8">
|
|
<h5 class="page-title">Plan</h5>
|
|
</div>
|
|
<form method="POST" action="/form/submit" id="report-form"
|
|
enctype="multipart/form-data">
|
|
<input type="hidden" name="form_id" value="{{ $form_id }}">
|
|
@csrf
|
|
@if ($id)
|
|
<input type="hidden" name="id" value="{{ $id }}">
|
|
@endif
|
|
@foreach ($questions as $question)
|
|
@if (in_array($question->code, ['transplant_monthly_execution','dialysis_monthly_execution']))
|
|
@continue
|
|
@endif
|
|
<div class="col-md-12 mb-2">
|
|
<label for="field-{{ $question->code }}"
|
|
class="form-label">{{ $question->question }} {!! $question->required ==
|
|
'yes' ? '<span class="text-danger">*</span>' : '' !!}
|
|
</label>
|
|
@switch($question->type)
|
|
@case('hidden')
|
|
<input type="{{ $question->type }}" id="field-{{ $question->code }}"
|
|
name="{{ $question->code }}"
|
|
value="{{ isset($question->value) ? $question->value : '' }}">
|
|
@break
|
|
|
|
@case('text')
|
|
@case('email')
|
|
|
|
@case('tel')
|
|
@case('date')
|
|
<input type="{{ $question->type }}" id="field-{{ $question->code }}"
|
|
name="{{ $question->code }}" class="form-control"
|
|
{{ $question->required == 'yes' ? 'required' : '' }}
|
|
value="{{ isset($question->value) ? $question->value : '' }}">
|
|
@break
|
|
|
|
@case('number')
|
|
<input type="{{ $question->type }}" min="0" max="9999999999" step="1"
|
|
id="field-{{ $question->code }}" name="{{ $question->code }}"
|
|
class="form-control" {{ $question->required == 'yes' ? 'required' : '' }}
|
|
value="{{ isset($question->value) ? $question->value : 0 }}">
|
|
@break
|
|
|
|
@case('textarea')
|
|
<textarea id="field-{{ $question->code }}" name="{{ $question->code }}"
|
|
class="form-control"
|
|
{{ $question->required == 'yes' ? 'required' : '' }}>{{ isset($question->value) ? $question->value : '' }}</textarea>
|
|
@break
|
|
|
|
@case('dropdown')
|
|
<select class="form-control" id="field-{{ $question->code }}" name="{{ $question->code }}" {{ $question->required == 'yes' ? 'required' : '' }}>
|
|
<option value=""> -- Select -- </option>
|
|
@foreach ($question->options as $option)
|
|
@if($question->code == 'contact_id' && isset($option->contact->type) && $option->contact->type == 'doctor' )
|
|
<option value="{{ $option->value }}" {{ isset($question->value) && $question->value == $option->value ? 'selected' : '' }} {{ $question->code == 'contact_id' ? 'msl_code= ' . (isset($option->contact->uid_number)?$option->contact->uid_number:'') . ' ' : '' }} {{ isset($question->value) && $question->value == $option->value ? 'selected' : '' }} {{ $question->code == 'contact_id' ? 'speciality= ' . (isset($option->contact->speciality) ? $option->contact->speciality :'') . ' ' : '' }} >
|
|
{{ $option->display }}
|
|
</option>
|
|
@elseif($question->code == 'select_center_hospital' && isset($option->contact->type) && $option->contact->type == 'hospital')
|
|
<option value="{{ $option->value }}" {{ isset($question->value) && $question->value == $option->value ? 'selected' : '' }} {{ $question->code == 'contact_id' ? 'pcode= ' . (isset($option->contact->pcode)?$option->contact->pcode:'') . ' ' : '' }} {{ isset($question->value) && $question->value == $option->value ? 'selected' : '' }} {{ $question->code == 'contact_id' ? 'speciality= ' . (isset($option->contact->speciality) ? $option->contact->speciality :'') . ' ' : '' }} >
|
|
{{ $option->display }}
|
|
</option>
|
|
@elseif($question->code == 'select_month'|| $question->code == 'type_of_activity')
|
|
<option value="{{ $option->value }}" {{ isset($question->value) && $question->value == $option->value ? 'selected' : '' }} {{ $question->code == 'contact_id' ? 'pcode= ' . (isset($option->contact->pcode)?$option->contact->pcode:'') . ' ' : '' }} {{ isset($question->value) && $question->value == $option->value ? 'selected' : '' }} {{ $question->code == 'contact_id' ? 'speciality= ' . (isset($option->contact->speciality) ? $option->contact->speciality :'') . ' ' : '' }} >
|
|
{{ $option->display }}
|
|
</option>
|
|
@endif
|
|
@endforeach
|
|
</select>
|
|
@break
|
|
|
|
|
|
|
|
@case('checkbox')
|
|
@foreach ($question->options as $option)
|
|
<div class="form-check mb-2 form-check-primary">
|
|
<input class="form-check-input" type="checkbox"
|
|
id="field-{{ $question->code }}-{{ $option->value }}"
|
|
name="{{ $question->code }}[]" value="{{ $option->value }}"
|
|
{{ isset($question->value) && $question->value != '' && in_array($option->value, $question->value) ? 'checked' : '' }}>
|
|
<label class="form-check-label"
|
|
for="field-{{ $question->code }}-{{ $option->value }}">{{ $option->display }}</label>
|
|
</div>
|
|
@endforeach
|
|
@break
|
|
|
|
@case('file')
|
|
<input type="file" id="field-{{ $question->code }}" name="{{ $question->code }}"
|
|
class="form-control" value="" accept="image/jpg, image/jpeg, image/png"
|
|
required>
|
|
@break
|
|
@case('multitextbox')
|
|
@foreach($question->options as $option)
|
|
<div class="form-check mb-2 form-check-primary">
|
|
<input class="form-check-input" type="checkbox" id="field-{{$question->code}}-{{$option->value}}" name="{{$question->code}}[]" value="{{$option->value}}" {{isset($question->value) && $question->value != '' && in_array($option->value, $question->value) ? 'checked':''}}>
|
|
<label class="form-check-label" for="field-{{$question->code}}-{{$option->value}}">{{$option->display}}</label>
|
|
</div>
|
|
@endforeach
|
|
@break
|
|
@endswitch
|
|
</div>
|
|
@endforeach
|
|
@if (!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval
|
|
!= 'yes'))
|
|
<div class="text-center d-grid mt-3">
|
|
<button class="btn btn-primary" type="submit" id="submit-btn"> Submit
|
|
</button>
|
|
</div>
|
|
@endif
|
|
</form>
|
|
</div>
|
|
|
|
<div id="execution-form-wrapper">
|
|
<div class="col-8">
|
|
<h5 class="page-title">Execution</h5>
|
|
</div>
|
|
<form method="POST" action="/form/submit" id="execution-form"
|
|
enctype="multipart/form-data">
|
|
<input type="hidden" name="form_id" value="{{ $form_id }}">
|
|
@csrf
|
|
<input type="hidden" name="id" value="" id="execution-id">
|
|
<input type="hidden" name="execution_done" value="yes">
|
|
@foreach ($questions as $question)
|
|
<div class="col-md-12 mb-2">
|
|
<label for="execution-{{ $question->code }}"
|
|
class="form-label">{{ $question->question }} {!! $question->required ==
|
|
'yes' ? '<span class="text-danger">*</span>' : '' !!}
|
|
</label>
|
|
@switch($question->type)
|
|
@case('hidden')
|
|
<input type="{{ $question->type }}" id="execution-{{ $question->code }}"
|
|
name="{{ $question->code }}"
|
|
value="{{ isset($question->value) ? $question->value : '' }}">
|
|
@break
|
|
|
|
@case('text')
|
|
@case('email')
|
|
|
|
@case('tel')
|
|
@case('date')
|
|
<input type="{{ $question->type }}" id="execution-{{ $question->code }}"
|
|
name="{{ $question->code }}" class="form-control"
|
|
{{ $question->required == 'yes' ? 'required' : '' }}
|
|
value="{{ isset($question->value) ? $question->value : '' }}">
|
|
@break
|
|
|
|
@case('number')
|
|
<input type="{{ $question->type }}" min="0" max="9999999999" step="1"
|
|
id="execution-{{ $question->code }}" name="{{ $question->code }}"
|
|
class="form-control" {{ $question->required == 'yes' ? 'required' : '' }}
|
|
value="{{ isset($question->value) ? $question->value : 0 }}">
|
|
@break
|
|
|
|
@case('textarea')
|
|
<textarea id="execution-{{ $question->code }}" name="{{ $question->code }}"
|
|
class="form-control"
|
|
{{ $question->required == 'yes' ? 'required' : '' }}>{{ isset($question->value) ? $question->value : '' }}</textarea>
|
|
@break
|
|
|
|
@case('dropdown')
|
|
<select class="form-control" id="execution-{{ $question->code }}" name="{{ $question->code }}" {{ $question->required == 'yes' ? 'required' : '' }}>
|
|
<option value=""> -- Select -- </option>
|
|
@foreach ($question->options as $option)
|
|
@if($question->code == 'contact_id' && isset($option->contact->type) && $option->contact->type == 'doctor' )
|
|
<option value="{{ $option->value }}" {{ isset($question->value) && $question->value == $option->value ? 'selected' : '' }} {{ $question->code == 'contact_id' ? 'msl_code= ' . (isset($option->contact->uid_number)?$option->contact->uid_number:'') . ' ' : '' }} {{ isset($question->value) && $question->value == $option->value ? 'selected' : '' }} {{ $question->code == 'contact_id' ? 'speciality= ' . (isset($option->contact->speciality) ? $option->contact->speciality :'') . ' ' : '' }} >
|
|
{{ $option->display }}
|
|
</option>
|
|
@elseif($question->code == 'select_center_hospital' && isset($option->contact->type) && $option->contact->type == 'hospital')
|
|
<option value="{{ $option->value }}" {{ isset($question->value) && $question->value == $option->value ? 'selected' : '' }} {{ $question->code == 'contact_id' ? 'pcode= ' . (isset($option->contact->pcode)?$option->contact->pcode:'') . ' ' : '' }} {{ isset($question->value) && $question->value == $option->value ? 'selected' : '' }} {{ $question->code == 'contact_id' ? 'speciality= ' . (isset($option->contact->speciality) ? $option->contact->speciality :'') . ' ' : '' }} >
|
|
{{ $option->display }}
|
|
</option>
|
|
@elseif($question->code == 'select_month' || $question->code == 'type_of_activity')
|
|
<option value="{{ $option->value }}" {{ isset($question->value) && $question->value == $option->value ? 'selected' : '' }} {{ $question->code == 'contact_id' ? 'pcode= ' . (isset($option->contact->pcode)?$option->contact->pcode:'') . ' ' : '' }} {{ isset($question->value) && $question->value == $option->value ? 'selected' : '' }} {{ $question->code == 'contact_id' ? 'speciality= ' . (isset($option->contact->speciality) ? $option->contact->speciality :'') . ' ' : '' }} >
|
|
{{ $option->display }}
|
|
</option>
|
|
@endif
|
|
@endforeach
|
|
</select>
|
|
@break
|
|
|
|
@case('checkbox')
|
|
@foreach ($question->options as $option)
|
|
<div class="form-check mb-2 form-check-primary">
|
|
<input class="form-check-input" type="checkbox"
|
|
id="execution-{{ $question->code }}-{{ $option->value }}"
|
|
name="{{ $question->code }}[]" value="{{ $option->value }}"
|
|
{{ isset($question->value) && $question->value != '' && in_array($option->value, $question->value) ? 'checked' : '' }}>
|
|
<label class="form-check-label"
|
|
for="execution-{{ $question->code }}-{{ $option->value }}">{{ $option->display }}</label>
|
|
</div>
|
|
@endforeach
|
|
@break
|
|
|
|
@case('file')
|
|
<input type="file" id="execution-{{ $question->code }}"
|
|
name="{{ $question->code }}" class="form-control" value=""
|
|
accept="image/jpg, image/jpeg, image/png">
|
|
@break
|
|
@case('multitextbox')
|
|
|
|
@if($question->code=='transplant_monthly_execution')
|
|
<div class="row">
|
|
<div style="width: auto; overflow-y: auto; overflow-x: auto;">
|
|
<table class="table tableclass">
|
|
<thead id="heading">
|
|
<tr>
|
|
<th>Transplant Monthly Execution</th>
|
|
<th>Monthly Plan</th>
|
|
<th>Week 1 Achieved</th>
|
|
<th>Week 2 Achieved</th>
|
|
<th>Week 3 Achieved</th>
|
|
<th>Week 4 Achieved</th>
|
|
<th>Total</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($brandData as $brand)
|
|
<tr>
|
|
|
|
<td>{{ $brand['brand'] }}</td>
|
|
<td>
|
|
<input type="number" id="execution-{{ $brand['slug'] }}"
|
|
name="{{ $brand['slug'] }}"
|
|
class="form-control form-control-large" readonly="true" value="{{isset($formdata->no_of_transpalnt) ? $formdata->no_of_transpalnt : 0 }}" >
|
|
</td>
|
|
<td>
|
|
<input type="number" id="execution-{{ $brand['pseudoId'] }}"
|
|
name="{{ $brand['pseudoId'] }}"
|
|
class="form-control form-control-large" value="{{ $id && isset($formdata) && isset($formdata->{$brand['pseudoId']}) ? $formdata->{$brand['pseudoId']} : 0 }}">
|
|
</td>
|
|
<td>
|
|
<input type="number" id="execution-{{ $brand['pseudoId2'] }}"
|
|
name="{{ $brand['pseudoId2'] }}"
|
|
class="form-control form-control-large" value="{{ $id && isset($formdata) && isset($formdata->{$brand['pseudoId2']}) ? $formdata->{$brand['pseudoId2']} : 0 }}">
|
|
</td>
|
|
<td>
|
|
<input type="number" id="execution-{{ $brand['pseudoId3'] }}"
|
|
name="{{ $brand['pseudoId3'] }}"
|
|
class="form-control form-control-large" value="{{ $id && isset($formdata) && isset($formdata->{$brand['pseudoId3']}) ? $formdata->{$brand['pseudoId3']} : 0 }}">
|
|
</td>
|
|
<td>
|
|
<input type="number" id="execution-{{ $brand['pseudoId4'] }}"
|
|
name="{{ $brand['pseudoId4'] }}"
|
|
class="form-control form-control-large" value="{{ $id && isset($formdata) && isset($formdata->{$brand['pseudoId4']}) ? $formdata->{$brand['pseudoId4']} : 0 }}">
|
|
</td>
|
|
<td>
|
|
<input type="number" id="execution-{{ $brand['pseudoId5'] }}"
|
|
name="{{ $brand['pseudoId5'] }}"
|
|
class="form-control form-control-large" readonly="true" value="{{ $id && isset($formdata) && isset($formdata->{$brand['pseudoId4']}) ? $formdata->{$brand['pseudoId4']} : 0 }}">
|
|
</td>
|
|
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
@if($question->code=='dialysis_monthly_execution')
|
|
<div class="row">
|
|
|
|
<div style="width: auto; overflow-y: auto; overflow-x: auto;">
|
|
<table class="table tableclass">
|
|
<thead id="heading">
|
|
<tr>
|
|
<th>Dialysis Monthly Execution</th>
|
|
<th>Monthly Plan</th>
|
|
<th>Week 1 Achieved</th>
|
|
<th>Week 2 Achieved</th>
|
|
<th>Week 3 Achieved</th>
|
|
<th>Week 4 Achieved</th>
|
|
<th>Total</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($brandData2 as $brand)
|
|
<tr>
|
|
|
|
<td>{{ $brand['brand'] }}</td>
|
|
<td>
|
|
<input type="number" step="1" min="0" id="execution-{{ $brand['slug'] }}"
|
|
name="{{ $brand['slug'] }}"
|
|
class="form-control form-control-large" readonly="true" value="{{ isset($formdata->{$brand['slug']}) ? $formdata->{$brand['slug']} : 0 }}" >
|
|
</td>
|
|
|
|
<td>
|
|
<input type="number" step="1" min="0" id="execution-{{ $brand['pseudoId'] }}"
|
|
name="{{ $brand['pseudoId'] }}"
|
|
class="form-control form-control-large" value="{{ $id && isset($formdata) && isset($formdata->{$brand['pseudoId']}) ? $formdata->{$brand['pseudoId']} : 0 }}">
|
|
</td>
|
|
<td>
|
|
<input type="number" step="1" min="0" id="execution-{{ $brand['pseudoId2'] }}"
|
|
name="{{ $brand['pseudoId2'] }}"
|
|
class="form-control form-control-large" value="{{ $id && isset($formdata) && isset($formdata->{$brand['pseudoId2']}) ? $formdata->{$brand['pseudoId2']} : 0 }}">
|
|
</td>
|
|
<td>
|
|
<input type="number" step="1" min="0" id="execution-{{ $brand['pseudoId3'] }}"
|
|
name="{{ $brand['pseudoId3'] }}"
|
|
class="form-control form-control-large" value="{{ $id && isset($formdata) && isset($formdata->{$brand['pseudoId3']}) ? $formdata->{$brand['pseudoId3']} : 0 }}">
|
|
</td>
|
|
<td>
|
|
<input type="number" step="1" min="0" id="execution-{{ $brand['pseudoId4'] }}"
|
|
name="{{ $brand['pseudoId4'] }}"
|
|
class="form-control form-control-large" value="{{ $id && isset($formdata) && isset($formdata->{$brand['pseudoId4']}) ? $formdata->{$brand['pseudoId4']} : 0 }}">
|
|
</td>
|
|
<td>
|
|
<input type="number" step="1" min="0" id="execution-{{ $brand['pseudoId5'] }}"
|
|
name="{{ $brand['pseudoId5'] }}"
|
|
class="form-control form-control-large" readonly="true" value="{{ $id && isset($formdata) && isset($formdata->{$brand['pseudoId4']}) ? $formdata->{$brand['pseudoId4']} : 0 }}">
|
|
</td>
|
|
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
@endif
|
|
|
|
@break
|
|
|
|
|
|
@endswitch
|
|
</div>
|
|
@endforeach
|
|
@if (!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval
|
|
!= 'yes'))
|
|
<div class="text-center d-grid mt-3">
|
|
<button class="btn btn-primary" type="submit" id="submit-btn"> Submit
|
|
</button>
|
|
</div>
|
|
@endif
|
|
</form>
|
|
</div>
|
|
|
|
</div> <!-- end card-body -->
|
|
</div>
|
|
<!-- end card -->
|
|
|
|
<!-- end row -->
|
|
|
|
</div> <!-- end col -->
|
|
</div>
|
|
<!-- end row -->
|
|
</div>
|
|
<!-- end container -->
|
|
</div>
|
|
<!-- end page -->
|
|
<style type="text/css">
|
|
#pageloader {
|
|
background: rgba(255, 255, 255, 0.8);
|
|
display: none;
|
|
height: 100%;
|
|
position: fixed;
|
|
width: 100%;
|
|
z-index: 9999;
|
|
}
|
|
|
|
#pageloader img {
|
|
left: 50%;
|
|
margin-left: -32px;
|
|
margin-top: -32px;
|
|
position: absolute;
|
|
top: 50%;
|
|
}
|
|
.form-control-large{
|
|
width: 75px;
|
|
}
|
|
</style>
|
|
@include('layouts.shared/footer-script')
|
|
<script src="{{ asset('assets/libs/sweetalert2/sweetalert2.min.js') }}"></script>
|
|
<script type="text/javascript">
|
|
jQuery(document).ready(function($) {
|
|
$('#form-wrapper').hide()
|
|
$('#execution-form-wrapper').hide()
|
|
|
|
// $('#add-camp-btn').click(function() {
|
|
// $('#form-wrapper').show()
|
|
// $('#table-wrapper').hide()
|
|
// })
|
|
|
|
$('#add-camp-btn').click(function() {
|
|
$('#table-wrapper').hide(0)
|
|
$('#form-wrapper').show(100, () => {
|
|
$('#add-camp-btn').hide(0);
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
$('.edit-btn').click(function() {
|
|
$('#execution-form-wrapper').show(100, () => {
|
|
$('#add-camp-btn').hide(0);
|
|
})
|
|
$('#table-wrapper').hide()
|
|
|
|
|
|
let contacts=document.getElementById('execution-contact_id');
|
|
contacts.addEventListener('mousedown',function(e){
|
|
e.preventDefault();
|
|
})
|
|
|
|
let months=document.getElementById('execution-select_month');
|
|
months.addEventListener('mousedown',function(e){
|
|
e.preventDefault();
|
|
})
|
|
|
|
let hospitalName=document.getElementById('execution-select_center_hospital');
|
|
hospitalName.addEventListener('mousedown',function(e){
|
|
e.preventDefault();
|
|
})
|
|
|
|
let type=document.getElementById('execution-type_of_activity');
|
|
type.addEventListener('mousedown',function(e){
|
|
e.preventDefault();
|
|
})
|
|
|
|
$('#execution-speciality').prop('readonly', true)
|
|
$('#execution-plan_date').prop('readonly', true)
|
|
$('#execution-msl_code').prop('readonly',true);
|
|
//$('#execution-time').prop('disabled', true)
|
|
|
|
|
|
|
|
let selected = JSON.parse($(this).attr('plan_details'))
|
|
console.log("Plan_Details : ",selected);
|
|
console.log("Hospital Name is : ",selected['contact_id']);
|
|
for (let k of Object.keys(selected)) {
|
|
|
|
if (selected[k] != '') {
|
|
if (k == 'contact_id') {
|
|
//$("#execution-contact_id option:contains(" + selected[k] + ")").prop('selected', true)
|
|
// console.log($("#execution-contact_id option:contains(" + selected[k] + ")").attr('value'))
|
|
$('#execution-contact_id').val($("#execution-contact_id option:contains(" +
|
|
selected[k] + ")").attr('value'));
|
|
}
|
|
|
|
|
|
|
|
else
|
|
$('#execution-' + k).val(selected[k]);
|
|
}
|
|
// if(selected[k] != '')
|
|
// $('#execution-'+k).val(selected[k]);
|
|
}
|
|
let docid = $('#execution-contact_id option').map(function() {
|
|
if ($(this).text().trim() == selected['contact_id']) return this;
|
|
}).attr('value')
|
|
console.log("docid : ",docid);
|
|
|
|
$('#execution-contact_id').val(docid)
|
|
$('#execution-id').val(selected['id'])
|
|
|
|
let hospital = $('#execution-select_center_hospital option').map(function() {
|
|
if ($(this).text().trim() == selected['select_center_hospital']) return this;
|
|
}).attr('value')
|
|
console.log("hospital : ",hospital);
|
|
|
|
$('#execution-select_center_hospital').val(hospital)
|
|
|
|
|
|
let no_of_transplant=$('#execution-no_of_transpalnt').val();
|
|
let cellcept_share_plan=$('#execution-cellcept_share_plan').val();
|
|
let cellcept_share_plan_switch=$('#execution-cellcept_share_plan_switch').val();
|
|
let no_of_dialysis=$('#execution-no_of_dialysis_sessions').val();
|
|
let mircera_50=$('#execution-mircera_50_units').val();
|
|
let mircera_75=$('#execution-mircera_75_units').val();
|
|
let mircera_100=$('#execution-mircera_100_units').val();
|
|
|
|
|
|
$('#execution-no_of_transpalnt_done').val(no_of_transplant);
|
|
$('#execution-cellcept_share_plan_ach').val(cellcept_share_plan);
|
|
$('#execution-cellcept_share_plan_switch_ach').val(cellcept_share_plan_switch);
|
|
$('#execution-no_of_dialysis_sessions_ach').val(no_of_dialysis);
|
|
$('#execution-mircera_50_units_ach').val(mircera_50);
|
|
$('#execution-mircera_75_units_ach').val(mircera_75);
|
|
$('#execution-mircera_100_units_ach').val(mircera_100);
|
|
|
|
$('#execution-no_of_transplants_week1,#execution-no_of_transplants_week2,#execution-no_of_transplants_week3,#execution-no_of_transplants_week4').on('keyup',function(){
|
|
let total=(
|
|
(parseInt($('#execution-no_of_transplants_week1').val())||0)+
|
|
(parseInt($('#execution-no_of_transplants_week2').val())||0)+
|
|
(parseInt($('#execution-no_of_transplants_week3').val())||0)+
|
|
(parseInt($('#execution-no_of_transplants_week4').val())||0)
|
|
|
|
);
|
|
$('#execution-no_of_transplants_total').val(total);
|
|
})
|
|
|
|
$('#execution-cellcept_share_plan_week1,#execution-cellcept_share_plan_week2,#execution-cellcept_share_plan_week3,#execution-cellcept_share_plan_week4').on('keyup',function(){
|
|
let total=(
|
|
(parseInt($('#execution-cellcept_share_plan_week1').val())||0)+
|
|
(parseInt($('#execution-cellcept_share_plan_week2').val())||0)+
|
|
(parseInt($('#execution-cellcept_share_plan_week3').val())||0)+
|
|
(parseInt($('#execution-cellcept_share_plan_week4').val())||0)
|
|
|
|
);
|
|
$('#execution-cellcept_share_plan_total').val(total);
|
|
})
|
|
|
|
$('#execution-cellcept_share_plan_switch_week1,#execution-cellcept_share_plan_switch_week2,#execution-cellcept_share_plan_switch_week3,#execution-cellcept_share_plan_switch_week4').on('keyup',function(){
|
|
let total=(
|
|
(parseInt($('#execution-cellcept_share_plan_switch_week1').val())||0)+
|
|
(parseInt($('#execution-cellcept_share_plan_switch_week2').val())||0)+
|
|
(parseInt($('#execution-cellcept_share_plan_switch_week3').val())||0)+
|
|
(parseInt($('#execution-cellcept_share_plan_switch_week4').val())||0)
|
|
|
|
);
|
|
$('#execution-cellcept_share_plan_switch_total').val(total);
|
|
})
|
|
|
|
|
|
$('#execution-no_of_dialysis_sessions_week1,#execution-no_of_dialysis_sessions_week2,#execution-no_of_dialysis_sessions_week3,#execution-no_of_dialysis_sessions_week4').on('keyup',function(){
|
|
let total=(
|
|
(parseInt($('#execution-no_of_dialysis_sessions_week1').val())||0)+
|
|
(parseInt($('#execution-no_of_dialysis_sessions_week2').val())||0)+
|
|
(parseInt($('#execution-no_of_dialysis_sessions_week3').val())||0)+
|
|
(parseInt($('#execution-no_of_dialysis_sessions_week4').val())||0)
|
|
|
|
);
|
|
$('#execution-no_of_dialysis_sessions_total').val(total);
|
|
})
|
|
|
|
$('#execution-mircera_50_units_week1,#execution-mircera_50_units_week2,#execution-mircera_50_units_week3,#execution-mircera_50_units_week4').on('keyup',function(){
|
|
let total=(
|
|
(parseInt($('#execution-mircera_50_units_week1').val())||0)+
|
|
(parseInt($('#execution-mircera_50_units_week2').val())||0)+
|
|
(parseInt($('#execution-mircera_50_units_week3').val())||0)+
|
|
(parseInt($('#execution-mircera_50_units_week4').val())||0)
|
|
|
|
);
|
|
$('#execution-mircera_50_units_total').val(total);
|
|
})
|
|
|
|
$('#execution-mircera_75_units_week1,#execution-mircera_75_units_week2,#execution-mircera_75_units_week3,#execution-mircera_75_units_week4').on('keyup',function(){
|
|
let total=(
|
|
(parseInt($('#execution-mircera_75_units_week1').val())||0)+
|
|
(parseInt($('#execution-mircera_75_units_week2').val())||0)+
|
|
(parseInt($('#execution-mircera_75_units_week3').val())||0)+
|
|
(parseInt($('#execution-mircera_75_units_week4').val())||0)
|
|
|
|
);
|
|
$('#execution-mircera_75_units_total').val(total);
|
|
})
|
|
|
|
$('#execution-mircera_100_units_week1,#execution-mircera_100_units_week2,#execution-mircera_100_units_week3,#execution-mircera_100_units_week4').on('keyup',function(){
|
|
let total=(
|
|
(parseInt($('#execution-mircera_100_units_week1').val())||0)+
|
|
(parseInt($('#execution-mircera_100_units_week2').val())||0)+
|
|
(parseInt($('#execution-mircera_100_units_week3').val())||0)+
|
|
(parseInt($('#execution-mircera_100_units_week4').val())||0)
|
|
|
|
);
|
|
$('#execution-mircera_100_units_total').val(total);
|
|
})
|
|
|
|
$('#execution-no_of_transpalnt,#execution-cellcept_share_plan,#execution-cellcept_share_plan_switch,#execution-no_of_dialysis_sessions,#execution-mircera_50_units,#execution-mircera_75_units,#execution-mircera_100_units').attr('readonly',true);
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('#report-form').on('submit', function(event) {
|
|
event.preventDefault();
|
|
$("#pageloader").fadeIn();
|
|
$.ajax({
|
|
type: "POST",
|
|
url: '/form/ajaxsubmit',
|
|
data: new FormData($('#report-form')[0]),
|
|
processData: false,
|
|
contentType: false,
|
|
success: function(data) {
|
|
$("#pageloader").fadeOut();
|
|
if (data.status == 'success') {
|
|
Swal.fire({
|
|
title: 'Great!',
|
|
text: 'Your data is successfully submitted!',
|
|
icon: 'success'
|
|
})
|
|
window.location.reload();
|
|
//$('#report-form').trigger("reset");
|
|
} else {
|
|
Swal.fire({
|
|
icon: 'error',
|
|
title: 'Data not submitted',
|
|
text: 'Something went wrong, please try again after some time!'
|
|
})
|
|
}
|
|
},
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$('#field-contact_id').change(function() {
|
|
$('#field-speciality').val($('option:selected', this).attr(
|
|
'speciality'))
|
|
})
|
|
|
|
$('#field-contact_id').change(function() {
|
|
$('#field-msl_code').val($('option:selected', this).attr('msl_code'))
|
|
})
|
|
|
|
|
|
$('#field-msl_code').prop('readonly',true);
|
|
$('#field-speciality').prop('readonly',true);
|
|
|
|
$('label[for="field-type_of_activity"]').html('<b>Transplant Monthly Plan</b><br/>Type of Transplant<span class="text-danger"> *</span>');
|
|
$('label[for="field-no_of_dialysis_sessions"]').html('<b>Dialysis Monthly Plan</b><br/>No. of Dialysis sessions planned<span class="text-danger"> *</span>');
|
|
|
|
|
|
$('#execution-form').on('submit', function(event) {
|
|
event.preventDefault();
|
|
$("#pageloader").fadeIn();
|
|
$.ajax({
|
|
type: "POST",
|
|
url: '/form/ajaxsubmit',
|
|
data: new FormData($('#execution-form')[0]),
|
|
processData: false,
|
|
contentType: false,
|
|
success: function(data) {
|
|
$("#pageloader").fadeOut();
|
|
if (data.status == 'success') {
|
|
Swal.fire({
|
|
title: 'Great!',
|
|
text: 'Your data is successfully submitted!',
|
|
icon: 'success'
|
|
})
|
|
window.location.reload();
|
|
//$('#report-form').trigger("reset");
|
|
} else {
|
|
Swal.fire({
|
|
icon: 'error',
|
|
title: 'Data not submitted',
|
|
text: 'Something went wrong, please try again after some time!'
|
|
})
|
|
}
|
|
},
|
|
});
|
|
});
|
|
|
|
var today = new Date();
|
|
var dd = String(today.getDate()).padStart(2, '0');
|
|
var mm = String(today.getMonth() + 1).padStart(2, '0');
|
|
var yyyy = today.getFullYear();
|
|
today = yyyy + '-' + mm + '-' + dd;
|
|
|
|
var recordDateField = document.getElementById('field-plan_date');
|
|
//recordDateField.setAttribute('min', today);
|
|
|
|
var executionDateField = document.getElementById('execution-plan_date');
|
|
//executionDateField.setAttribute('min', today);
|
|
|
|
// $('.edit-btn').click(function() {
|
|
// var executionexeField = document.getElementById('execution-record_date');
|
|
// executionexeField.setAttribute('min', executionDateField.value);
|
|
// });
|
|
|
|
/*$('.edit-btn').click(function() {
|
|
var executionexeField = document.getElementById('execution-execution_date');
|
|
executionexeField.setAttribute('min', executionDateField.value);
|
|
});*/
|
|
|
|
|
|
|
|
executionDateField.addEventListener('change', function() {
|
|
console.log('gg');
|
|
var executionexeField = document.getElementById('execution-record_date');
|
|
executionexeField.setAttribute('min', executionDateField.value);
|
|
});
|
|
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html> |