fix: order => taskStatusCount function to filter by responsible user ID
This commit is contained in:
parent
35285f81b9
commit
cce1eccf8c
1 changed files with 15 additions and 8 deletions
|
|
@ -576,9 +576,11 @@ function openFailedDialog(
|
|||
pageState.failedDialog = true;
|
||||
}
|
||||
|
||||
function taskStatusCount(index: number, id: string) {
|
||||
function taskStatusCount(index: number, id: string, responsibleUserId: string) {
|
||||
const task = fullTaskOrder.value?.taskList.filter(
|
||||
(t) => t.requestWorkStep.requestWork.productService.productId === id,
|
||||
(t) =>
|
||||
t.requestWorkStep.requestWork.productService.productId === id &&
|
||||
t.requestWorkStep.responsibleUserId === responsibleUserId,
|
||||
);
|
||||
if (index === 1) {
|
||||
return task?.filter(
|
||||
|
|
@ -920,14 +922,14 @@ watch([currentFormData.value.taskStatus], () => {
|
|||
</span>
|
||||
<span class="q-ml-auto row items-center q-gutter-x-sm">
|
||||
<div
|
||||
v-for="v in 3"
|
||||
:key="v"
|
||||
v-for="taskStatus in 3"
|
||||
:key="taskStatus"
|
||||
class="rounded q-px-sm row items-center"
|
||||
style="background: hsl(var(--text-mute) / 0.1)"
|
||||
:style="`color: hsl(var(--${
|
||||
v === 1
|
||||
taskStatus === 1
|
||||
? 'warning'
|
||||
: v === 2
|
||||
: taskStatus === 2
|
||||
? 'positive'
|
||||
: 'negative'
|
||||
}-bg))`"
|
||||
|
|
@ -937,8 +939,13 @@ watch([currentFormData.value.taskStatus], () => {
|
|||
size="xs"
|
||||
class="q-pr-sm"
|
||||
/>
|
||||
|
||||
{{ taskStatusCount(v, product.id) }}
|
||||
{{
|
||||
taskStatusCount(
|
||||
taskStatus,
|
||||
product.id,
|
||||
v.responsibleUser.id,
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</span>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue