Skip to content

Commit

Permalink
Добавил поиск на панель пользователя
Browse files Browse the repository at this point in the history
  • Loading branch information
danilpavlov committed Dec 11, 2024
1 parent e9f5498 commit 3c4d8bc
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions frontend/src/views/UserPanelView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<button @click="openCreateTask">Create Task</button>
<button @click="openEditProfile">Edit Profile</button>
<button @click="openBillingForm">Billing</button>
<button @click="searchTasks">Search for Tasks</button>
<button @click="openSearchPanel">Search for Tasks</button>
</div>

<table>
Expand Down Expand Up @@ -53,6 +53,14 @@
</div>
</div>

<!-- Search Panel Modal -->
<div v-if="showSearchPanel" class="modal-overlay">
<div class="modal">
<SearchPanel />
<button class="close-button" @click="closeSearchPanel">Close</button>
</div>
</div>

</div>
</template>

Expand All @@ -62,9 +70,10 @@ import EditProfileForm from '../components/EditProfileForm.vue';
import TaskDetailForm from '../components/TaskDetailForm.vue';
import CreateTaskForm from '../components/CreateTaskForm.vue';
import BillingForm from '../components/BillingForm.vue';
import SearchPanel from '../components/SearchPanel.vue';
export default {
components: { EditProfileForm, TaskDetailForm, CreateTaskForm, BillingForm },
components: { EditProfileForm, TaskDetailForm, CreateTaskForm, BillingForm, SearchPanel },
setup() {
// Sample tasks data
const tasks = ref([
Expand Down Expand Up @@ -128,6 +137,17 @@ export default {
const closeBillingForm = () => (showBillingForm.value = false);
const showSearchPanel = ref(false);
const openSearchPanel = () => {
showSearchPanel.value = true;
};
const closeSearchPanel = () => {
showSearchPanel.value = false;
};
// Button click handlers
const createTask = () => {
alert('Create Task button clicked');
Expand Down Expand Up @@ -168,6 +188,10 @@ export default {
openBillingForm,
closeBillingForm,
showSearchPanel,
openSearchPanel,
closeSearchPanel,
selectTask,
closeTaskDetail,
createTask,
Expand Down

0 comments on commit 3c4d8bc

Please sign in to comment.