Merge code : GWM

This commit is contained in:
Gowtham M 2025-04-10 17:21:18 +05:30
parent 4a8cfeace5
commit f887164f75

View File

@ -88,7 +88,7 @@
<div class="form-row"> <div class="form-row">
<div class="form-group col-md-6"> <div class="form-group col-md-6">
<label for="inputEmail4" class="col-form-label">Type<span class="text-danger">*</span></label> <label for="inputEmail4" class="col-form-label">Type<span class="text-danger">*</span></label>
<select class="form-control type-select SelExample" name="type" id="type" data-toggle="select2" required> <select class="form-control type-select " name="type" id="type" data-toggle="select2" required>
<option value="" <?= (isset($jobs['type']) && $jobs['type'] == '') ? 'selected' : '' ?>>Select Type</option> <option value="" <?= (isset($jobs['type']) && $jobs['type'] == '') ? 'selected' : '' ?>>Select Type</option>
<option value="General" <?= (isset($jobs['type']) && $jobs['type'] == "General") ?'selected' : '' ?>>General</option> <option value="General" <?= (isset($jobs['type']) && $jobs['type'] == "General") ?'selected' : '' ?>>General</option>
<option value="Complaints" <?= (isset($jobs['type']) && $jobs['type'] == "Complaints") ? 'selected' : '' ?>>Complaints</option> <option value="Complaints" <?= (isset($jobs['type']) && $jobs['type'] == "Complaints") ? 'selected' : '' ?>>Complaints</option>
@ -834,11 +834,14 @@ $(document).ready(function() {
console.log("Job Card ID:", jc_id); console.log("Job Card ID:", jc_id);
if (jc_id == 0) { if (jc_id == 0) {
$('.type-select').prop('disabled', false); $('.type-select').prop('readonly', false).off('mousedown'); // Enable
} else { } else {
$('.type-select').prop('disabled', true); $('.type-select').prop('readonly', true).on('mousedown', function (e) {
e.preventDefault(); // Prevent opening the dropdown
});
} }
$('.type-select').change(function() { $('.type-select').change(function() {
$('#productItemTable tbody').empty(); $('#productItemTable tbody').empty();
$('.vehicle-select').val('').select2(); $('.vehicle-select').val('').select2();