Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uses colors to visually differentiate between used and unused filters in search filter table #3423

Merged
merged 1 commit into from
May 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"rules": {
"indent": ["error", "tab"],
"prettier/prettier": [2, { "useTabs": false }]
}
4 changes: 3 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"endOfLine": "auto",
"printWidth": 100,
"semi": false,
"singleQuote": false,
"endOfLine": "auto"
"tabWidth": 2,
"useTabs": false
}
28 changes: 24 additions & 4 deletions src/dispatch/static/dispatch/src/search/Table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,36 @@
>
<!-- TODO(mvilanova): Allow to view the list of individuals, teams, services, and notifications upon clicking on the chip -->
<template #[`item.individuals`]="{ item }">
<v-chip small color="info" text-color="white">{{ item.individuals.length }}</v-chip>
<v-chip v-if="item.individuals.length == 0" small color="green" text-color="white">
{{ item.individuals.length }}
</v-chip>
<v-chip v-if="item.individuals.length > 0" small color="red" text-color="white">
{{ item.individuals.length }}
</v-chip>
</template>
<template #[`item.teams`]="{ item }">
<v-chip small color="info" text-color="white">{{ item.teams.length }}</v-chip>
<v-chip v-if="item.teams.length == 0" small color="green" text-color="white">
{{ item.teams.length }}
</v-chip>
<v-chip v-if="item.teams.length > 0" small color="red" text-color="white">
{{ item.teams.length }}
</v-chip>
</template>
<template #[`item.services`]="{ item }">
<v-chip small color="info" text-color="white">{{ item.services.length }}</v-chip>
<v-chip v-if="item.services.length == 0" small color="green" text-color="white">
{{ item.services.length }}
</v-chip>
<v-chip v-if="item.services.length > 0" small color="red" text-color="white">
{{ item.services.length }}
</v-chip>
</template>
<template #[`item.notifications`]="{ item }">
<v-chip small color="info" text-color="white">{{ item.notifications.length }}</v-chip>
<v-chip v-if="item.notifications.length == 0" small color="green" text-color="white">
{{ item.notifications.length }}
</v-chip>
<v-chip v-if="item.notifications.length > 0" small color="red" text-color="white">
{{ item.notifications.length }}
</v-chip>
</template>
<template #[`item.enabled`]="{ item }">
<v-simple-checkbox v-model="item.enabled" disabled />
Expand Down