Skip to content

Commit d0b03f5

Browse files
authored
Uses colors to visually diferenciate between used and unused filters in search filter table (Netflix#3423)
1 parent e2a7a89 commit d0b03f5

File tree

3 files changed

+31
-5
lines changed

3 files changed

+31
-5
lines changed

.eslintrc.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
"rules": {
2+
"indent": ["error", "tab"],
3+
"prettier/prettier": [2, { "useTabs": false }]
4+
}

.prettierrc

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
2+
"endOfLine": "auto",
23
"printWidth": 100,
34
"semi": false,
45
"singleQuote": false,
5-
"endOfLine": "auto"
6+
"tabWidth": 2,
7+
"useTabs": false
68
}

src/dispatch/static/dispatch/src/search/Table.vue

+24-4
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,36 @@
4444
>
4545
<!-- TODO(mvilanova): Allow to view the list of individuals, teams, services, and notifications upon clicking on the chip -->
4646
<template #[`item.individuals`]="{ item }">
47-
<v-chip small color="info" text-color="white">{{ item.individuals.length }}</v-chip>
47+
<v-chip v-if="item.individuals.length == 0" small color="green" text-color="white">
48+
{{ item.individuals.length }}
49+
</v-chip>
50+
<v-chip v-if="item.individuals.length > 0" small color="red" text-color="white">
51+
{{ item.individuals.length }}
52+
</v-chip>
4853
</template>
4954
<template #[`item.teams`]="{ item }">
50-
<v-chip small color="info" text-color="white">{{ item.teams.length }}</v-chip>
55+
<v-chip v-if="item.teams.length == 0" small color="green" text-color="white">
56+
{{ item.teams.length }}
57+
</v-chip>
58+
<v-chip v-if="item.teams.length > 0" small color="red" text-color="white">
59+
{{ item.teams.length }}
60+
</v-chip>
5161
</template>
5262
<template #[`item.services`]="{ item }">
53-
<v-chip small color="info" text-color="white">{{ item.services.length }}</v-chip>
63+
<v-chip v-if="item.services.length == 0" small color="green" text-color="white">
64+
{{ item.services.length }}
65+
</v-chip>
66+
<v-chip v-if="item.services.length > 0" small color="red" text-color="white">
67+
{{ item.services.length }}
68+
</v-chip>
5469
</template>
5570
<template #[`item.notifications`]="{ item }">
56-
<v-chip small color="info" text-color="white">{{ item.notifications.length }}</v-chip>
71+
<v-chip v-if="item.notifications.length == 0" small color="green" text-color="white">
72+
{{ item.notifications.length }}
73+
</v-chip>
74+
<v-chip v-if="item.notifications.length > 0" small color="red" text-color="white">
75+
{{ item.notifications.length }}
76+
</v-chip>
5777
</template>
5878
<template #[`item.enabled`]="{ item }">
5979
<v-simple-checkbox v-model="item.enabled" disabled />

0 commit comments

Comments
 (0)