feat: add status filter

This commit is contained in:
Methapon Metanipat 2024-10-25 17:07:52 +07:00
parent 5ac8707f38
commit d4afc09614
2 changed files with 9 additions and 0 deletions

View file

@ -3,6 +3,7 @@ import { defineStore } from 'pinia';
import { api } from 'src/boot/axios';
import { PaginationResult } from 'src/types';
import { WorkflowTemplate, WorkflowTemplatePayload } from './types';
import { Status } from '../types';
export const useWorkflowTemplate = defineStore('workflow-store', () => {
const data = ref<WorkflowTemplate[]>([]);
@ -22,6 +23,7 @@ export const useWorkflowTemplate = defineStore('workflow-store', () => {
page?: number;
pageSize?: number;
query?: string;
status?: Status;
}) {
const res = await api.get<PaginationResult<WorkflowTemplate>>(
'/workflow-template',