From 4d81de755eda8cbf5eae44c8a3dff28c6afaae9d Mon Sep 17 00:00:00 2001 From: MahanCh Date: Tue, 20 May 2025 20:38:05 +0330 Subject: [PATCH] add camera modal for task --- .../Company/Task/CreateScheduleModal.cshtml | 9 +- .../AdminNew/Pages/Company/Task/Index.cshtml | 5 + .../_Partials/CreateAttachmentsModal.cshtml | 103 ++++++++++++++++++ .../css/_Partials/CreateAttachmentsModal.css | 55 ++++++++++ .../Tasks/css/createScheduleModal.css | 2 +- .../AssetsAdminNew/Tasks/images/camera.svg | 5 + .../AssetsAdminNew/Tasks/images/folder.svg | 4 + .../Tasks/js/CreateScheduleModal.js | 42 +++++-- 8 files changed, 215 insertions(+), 10 deletions(-) create mode 100644 ServiceHost/Areas/AdminNew/Pages/Company/Task/_Partials/CreateAttachmentsModal.cshtml create mode 100644 ServiceHost/wwwroot/AssetsAdminNew/Tasks/css/_Partials/CreateAttachmentsModal.css create mode 100644 ServiceHost/wwwroot/AssetsAdminNew/Tasks/images/camera.svg create mode 100644 ServiceHost/wwwroot/AssetsAdminNew/Tasks/images/folder.svg diff --git a/ServiceHost/Areas/AdminNew/Pages/Company/Task/CreateScheduleModal.cshtml b/ServiceHost/Areas/AdminNew/Pages/Company/Task/CreateScheduleModal.cshtml index 3dcb1ed5..a533528f 100644 --- a/ServiceHost/Areas/AdminNew/Pages/Company/Task/CreateScheduleModal.cshtml +++ b/ServiceHost/Areas/AdminNew/Pages/Company/Task/CreateScheduleModal.cshtml @@ -314,7 +314,14 @@ پیام صوتی - + +
انتخاب
+ +
+
+
+
+ + +
+
+
+
+ +
+
+
+ +
+
+ +
+
+
+ + \ No newline at end of file diff --git a/ServiceHost/wwwroot/AssetsAdminNew/Tasks/css/_Partials/CreateAttachmentsModal.css b/ServiceHost/wwwroot/AssetsAdminNew/Tasks/css/_Partials/CreateAttachmentsModal.css new file mode 100644 index 00000000..a4de84a9 --- /dev/null +++ b/ServiceHost/wwwroot/AssetsAdminNew/Tasks/css/_Partials/CreateAttachmentsModal.css @@ -0,0 +1,55 @@ +.offcanvas-backdrop { + z-index: 999999999; +} + +#offcanvasBottom { + z-index: 99999999999999; + border-radius: 22px 20px 0 0; + height: auto; +} + +.alert-msg { + z-index: 99999999940; +} + +.validTime { + color: #4d7c0f !important; +} + +.invalidTime { + color: #b91c1c !important; +} + +.form-check, .form-switch { + overflow: hidden; + padding-right: 0; + border-radius: 10px; +} + +.tilte-label { + text-align: center; + font-size: 12px; + font-weight: 700; + color: #292929; +} + +.offcanvas-title { + font-size: 18px; + font-weight: 600; + color: #292929; +} + +.offcanvas-header .btn-close { + margin: 0 0 0 15px; + border: 2px solid #33363F; + border-radius: 50%; + right: 13px; + padding: 5px; + background-size: 10px; + z-index: 25; + width: 15px; + height: 15px; +} + +@media (max-width: 768px) { +} \ No newline at end of file diff --git a/ServiceHost/wwwroot/AssetsAdminNew/Tasks/css/createScheduleModal.css b/ServiceHost/wwwroot/AssetsAdminNew/Tasks/css/createScheduleModal.css index e678c7d0..dbd1b24c 100644 --- a/ServiceHost/wwwroot/AssetsAdminNew/Tasks/css/createScheduleModal.css +++ b/ServiceHost/wwwroot/AssetsAdminNew/Tasks/css/createScheduleModal.css @@ -6,7 +6,7 @@ border-radius: 7px; } .modal-content { - height: 720px; + /*height: 720px;*/ } .modal-body { diff --git a/ServiceHost/wwwroot/AssetsAdminNew/Tasks/images/camera.svg b/ServiceHost/wwwroot/AssetsAdminNew/Tasks/images/camera.svg new file mode 100644 index 00000000..fc2f634a --- /dev/null +++ b/ServiceHost/wwwroot/AssetsAdminNew/Tasks/images/camera.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/ServiceHost/wwwroot/AssetsAdminNew/Tasks/images/folder.svg b/ServiceHost/wwwroot/AssetsAdminNew/Tasks/images/folder.svg new file mode 100644 index 00000000..fab408b6 --- /dev/null +++ b/ServiceHost/wwwroot/AssetsAdminNew/Tasks/images/folder.svg @@ -0,0 +1,4 @@ + + + + diff --git a/ServiceHost/wwwroot/AssetsAdminNew/Tasks/js/CreateScheduleModal.js b/ServiceHost/wwwroot/AssetsAdminNew/Tasks/js/CreateScheduleModal.js index 10d16a7c..9a74779c 100644 --- a/ServiceHost/wwwroot/AssetsAdminNew/Tasks/js/CreateScheduleModal.js +++ b/ServiceHost/wwwroot/AssetsAdminNew/Tasks/js/CreateScheduleModal.js @@ -823,7 +823,7 @@ $('#EndTaskTime').on("keyup", $(document).ready(function () { - $(document).on('click', '#upload-doc', function (event) { + $(document).on('click', '#upload-doc, #upload-doc1', function (event) { event.preventDefault(); let files = [ @@ -859,6 +859,11 @@ function attachFileChangeHandler(fileInput, id, boxClass) { if (fileInputFile) { uploadFile(fileInputFile, id, boxClass); } + + const offcanvas = bootstrap.Offcanvas.getInstance(document.querySelector('.offcanvas')); + if (offcanvas) { + offcanvas.hide(); + } }); } @@ -1632,13 +1637,34 @@ $(document).on('click', '.TaskTitleSearch', function () { function searchSubjectTask() { - var input, filter, tbody, tr, i, td, containerResult; - input = document.getElementById("Command_Title"); - filter = input.value.toUpperCase(); + /* var taskTitleValue = document.getElementById("taskTitle").value; + containerResult = document.getElementById("TaskTitle"); tbody = document.getElementById("searchTitleResult"); - tr = tbody.getElementsByClassName("li-subject"); + tr = tbody.getElementsByClassName("li-subject");*/ + // Get the input value + const input = document.getElementById('taskTitle'); + const filter = input.value.toLowerCase(); // Convert to lowercase for case insensitive matching + list = document.getElementById('searchTitleResult'); + const items = list.getElementsByClassName('li-subject'); // Get all li elements in the list - var hasVisibleResults = false; + // Loop through all list items and display those that match the filter + Array.from(items).forEach(item => { + const itemText = item.textContent.toLowerCase(); // Get the text of the item + if (itemText.includes(filter) && filter !== '') { + item.style.display = ''; // Show item + } else { + item.style.display = 'none'; // Hide item + } + }); + + /* var input, filter, tbody, tr, i, td, containerResult; + input = document.getElementById("Command_Title"); + filter = input.value.toUpperCase();*/ + + + + +/* var hasVisibleResults = false; for (i = 0; i < tr.length; i++) { td = tr[i]; @@ -1650,12 +1676,12 @@ function searchSubjectTask() { } } - containerResult = document.getElementById("TaskTitle"); + if (hasVisibleResults) { containerResult.style.display = "block"; } else { containerResult.style.display = "none"; - } + }*/ }