edit form add task

This commit is contained in:
2026-06-03 14:22:58 +03:30
parent 41d1036300
commit 28bf82cde9
3 changed files with 47 additions and 12 deletions
+27 -5
View File
@@ -709,11 +709,7 @@
backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
-webkit-backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%);
color: var(--text-primary); color: var(--text-primary);
overflow: hidden; overflow: visible;
}
.ui-card-body {
padding: 1.25rem 1.5rem;
} }
.ui-card-header { .ui-card-header {
@@ -722,6 +718,13 @@
text-align: center; text-align: center;
padding: 0.55rem 0.75rem; padding: 0.55rem 0.75rem;
font-weight: 800; font-weight: 800;
border-radius: var(--radius-xl) var(--radius-xl) 0 0;
overflow: hidden;
}
.ui-card-body {
padding: 1.25rem 1.5rem;
overflow: visible;
} }
.ui-form-stack { .ui-form-stack {
@@ -735,6 +738,25 @@
flex-direction: column; flex-direction: column;
gap: 0.4rem; gap: 0.4rem;
width: 100%; width: 100%;
position: relative;
z-index: 1;
}
.ui-form-field--dropdown.is-open {
z-index: 40;
}
.ui-form-dropdown-panel {
width: 100%;
margin-top: 0.35rem;
border-radius: 0.875rem;
border: 1px solid var(--border-input);
background: var(--surface-card);
box-shadow: var(--row-shadow);
}
.ui-form-dropdown-panel .user-item:hover {
background: var(--surface-card-hover);
} }
.ui-form-field label { .ui-form-field label {
+16 -7
View File
@@ -84,11 +84,11 @@ if (isset($task)) {
</select> </select>
</div> </div>
<div class="ui-form-field"> <div class="ui-form-field ui-form-field--dropdown">
<label for="dropdown-btn">انتصاب کاربران</label> <label for="dropdown-btn">انتصاب کاربران</label>
<div class="relative" id="dropdown-container"> <div id="dropdown-container">
<button type="button" id="dropdown-btn" <button type="button" id="dropdown-btn"
class="ui-input text-right flex justify-between items-center"> class="ui-input text-right flex justify-between items-center w-full">
<span id="selected-count">انتخاب کاربران</span> <span id="selected-count">انتخاب کاربران</span>
<svg class="w-4 h-4 transition-transform" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg class="w-4 h-4 transition-transform" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
@@ -97,7 +97,7 @@ if (isset($task)) {
</button> </button>
<div id="dropdown-list" <div id="dropdown-list"
class="hidden absolute z-20 w-full ui-panel border border-gray-300 rounded-lg shadow-lg mt-1"> class="hidden ui-form-dropdown-panel">
<div class="p-2 border-b"> <div class="p-2 border-b">
<input type="text" id="search-input" <input type="text" id="search-input"
@@ -151,21 +151,30 @@ if (isset($task)) {
<script> <script>
const dropdownBtn = document.getElementById('dropdown-btn'); const dropdownBtn = document.getElementById('dropdown-btn');
const dropdownList = document.getElementById('dropdown-list'); const dropdownList = document.getElementById('dropdown-list');
const dropdownField = document.querySelector('.ui-form-field--dropdown');
const searchInput = document.getElementById('search-input'); const searchInput = document.getElementById('search-input');
const usersList = document.getElementById('users-list'); const usersList = document.getElementById('users-list');
const selectedCountSpan = document.getElementById('selected-count'); const selectedCountSpan = document.getElementById('selected-count');
function setAssigneeDropdownOpen(open) {
dropdownList.classList.toggle('hidden', !open);
if (dropdownField) {
dropdownField.classList.toggle('is-open', open);
}
}
dropdownBtn.addEventListener('click', (e) => { dropdownBtn.addEventListener('click', (e) => {
e.stopPropagation(); e.stopPropagation();
dropdownList.classList.toggle('hidden'); const willOpen = dropdownList.classList.contains('hidden');
if (!dropdownList.classList.contains('hidden')) { setAssigneeDropdownOpen(willOpen);
if (willOpen) {
searchInput.focus(); searchInput.focus();
} }
}); });
document.addEventListener('click', (e) => { document.addEventListener('click', (e) => {
if (!dropdownBtn.contains(e.target) && !dropdownList.contains(e.target)) { if (!dropdownBtn.contains(e.target) && !dropdownList.contains(e.target)) {
dropdownList.classList.add('hidden'); setAssigneeDropdownOpen(false);
} }
}); });
+4
View File
@@ -1661,6 +1661,8 @@ $state = [
const datePickerOptions = { const datePickerOptions = {
format: 'YYYY/MM/DD', format: 'YYYY/MM/DD',
autoClose: true, autoClose: true,
initialValue: false,
initialValueType: 'gregorian',
toolbox: { toolbox: {
calendarSwitch: {enabled: false}, calendarSwitch: {enabled: false},
todayButton: {enabled: true, text: {fa: 'امروز'}} todayButton: {enabled: true, text: {fa: 'امروز'}}
@@ -1684,6 +1686,8 @@ $state = [
applyTaskFilters(); applyTaskFilters();
} }
}); });
clearTaskDateFilter();
}); });
</script> </script>