mirror of
https://github.com/hargata/lubelog.git
synced 2025-12-10 00:46:08 -06:00
Compare commits
3 Commits
2ab822af8f
...
83f1a25057
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
83f1a25057 | ||
|
|
7f671c1802 | ||
|
|
3f05f06824 |
@ -935,6 +935,14 @@ namespace CarCareTracker.Controllers
|
||||
result = _planRecordDataAccess.SavePlanRecordToVehicle(existingRecord);
|
||||
}
|
||||
break;
|
||||
case ImportMode.InspectionRecord:
|
||||
{
|
||||
var existingRecord = _inspectionRecordTemplateDataAccess.GetInspectionRecordTemplateById(recordId);
|
||||
existingRecord.Id = default;
|
||||
existingRecord.ReminderRecordId = new List<int>();
|
||||
result = _inspectionRecordTemplateDataAccess.SaveInspectionReportTemplateToVehicle(existingRecord);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (result)
|
||||
|
||||
@ -63,6 +63,7 @@
|
||||
<span class="visually-hidden">Toggle Dropdown</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" href="#" onclick="duplicateInspectionRecordTemplate()">@translator.Translate(userLanguage, "Duplicate")</a></li>
|
||||
<li><a class="dropdown-item" href="#" onclick="duplicateInspectionRecordTemplateToVehicle()">@translator.Translate(userLanguage, "Duplicate To Vehicle")</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -448,4 +448,9 @@ function duplicateInspectionRecordTemplateToVehicle() {
|
||||
let inspectionRecordsIds = [];
|
||||
inspectionRecordsIds.push(getInspectionRecordModelData().id);
|
||||
duplicateRecordsToOtherVehicles(inspectionRecordsIds, 'InspectionRecord');
|
||||
}
|
||||
function duplicateInspectionRecordTemplate() {
|
||||
let inspectionRecordsIds = [];
|
||||
inspectionRecordsIds.push(getInspectionRecordModelData().id);
|
||||
duplicateRecords(inspectionRecordsIds, 'InspectionRecord');
|
||||
}
|
||||
@ -991,6 +991,9 @@ function duplicateRecords(ids, source) {
|
||||
friendlySource = "Plan";
|
||||
refreshDataCallBack = getVehiclePlanRecords;
|
||||
break;
|
||||
case "InspectionRecord":
|
||||
friendlySource = "Inspection Record";
|
||||
refreshDataCallBack = hideInspectionRecordTemplateModal;
|
||||
}
|
||||
|
||||
Swal.fire({
|
||||
@ -1065,8 +1068,8 @@ function duplicateRecordsToOtherVehicles(ids, source) {
|
||||
refreshDataCallBack = getVehiclePlanRecords;
|
||||
break;
|
||||
case "InspectionRecord":
|
||||
friendlySource = "Inspection Records";
|
||||
refreshDataCallBack = getVehicleInspectionRecords;
|
||||
friendlySource = "Inspection Record";
|
||||
refreshDataCallBack = hideInspectionRecordTemplateModal;
|
||||
}
|
||||
|
||||
$.get(`/Home/GetVehicleSelector?vehicleId=${GetVehicleId().vehicleId}`, function (data) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user