Skip to content

Commit

Permalink
N21-1679 review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mrikallab committed May 6, 2024
1 parent 8c5fa70 commit 8ce9c2b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
17 changes: 8 additions & 9 deletions src/components/rooms/RoomExternalToolCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,24 @@
>
<template #under-title>
<div class="d-flex g-1">
<warning-chip
<WarningChip
v-if="isToolDeactivated"
data-testId="tool-card-status-deactivated"
>
{{ $t("pages.rooms.tools.deactivated") }}
</warning-chip>
<info-chip
</WarningChip>
<InfoChip
v-if="isToolIncompleteOperational"
:isInfo="isToolIncompleteOperational"
data-testId="tool-card-status-incompleteOperational"
>{{ $t(toolChipTitle) }}
</info-chip>
</InfoChip>

<warning-chip
<WarningChip
v-if="isToolOutdated || isToolIncomplete"
data-testId="tool-card-status"
>
{{ $t(toolChipTitle) }}
</warning-chip>
</WarningChip>
</div>
</template>
<template #right>
Expand All @@ -52,7 +51,7 @@ import { RoomDotMenu } from "@ui-room-details";
import { computed, ComputedRef, defineComponent, PropType, watch } from "vue";
import { useI18n } from "vue-i18n";
import RoomBaseCard from "./RoomBaseCard.vue";
import { InfoChip, WarningChip } from "../../modules/ui/chip";
import { InfoChip, WarningChip } from "@ui-chip";
export default defineComponent({
name: "RoomExternalToolCard",
Expand Down Expand Up @@ -144,7 +143,7 @@ export default defineComponent({
);
});
const toolChipTitle: ComputedRef<string | undefined> = computed(() => {
const toolChipTitle: ComputedRef<string> = computed(() => {
return determineChipStatusTitle(props.tool.status);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const useContextExternalToolConfigurationStatus = () => {

const determineChipStatusTitle = (
toolConfigStatus: ContextExternalToolConfigurationStatus
): string | undefined => {
): string => {
const userRoles = authModule.getUserRoles;
if (
toolConfigStatus.isOutdatedOnScopeContext ||
Expand All @@ -22,6 +22,8 @@ export const useContextExternalToolConfigurationStatus = () => {
) {
return "pages.rooms.tools.outdated";
}

return "";
};

const determineToolStatusTranslationKey = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export default defineComponent({
if (
!isToolOutdated.value &&
!displayData.value?.status?.isIncompleteOperationalOnScopeContext &&
!displayData.value?.status?.isIncompleteOnScopeContext &&
modelValue.value.contextExternalToolId
) {
await fetchLaunchRequest(modelValue.value.contextExternalToolId);
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"@feature-media-shelf": ["src/modules/feature/media-shelf"],
"@ui-alert": ["src/modules/ui/alert"],
"@ui-board": ["src/modules/ui/board"],
"@ui-chip": ["src/modules/ui/chip"],
"@ui-confirmation-dialog": ["src/modules/ui/confirmation-dialog"],
"@ui-date-time-picker": ["src/modules/ui/date-time-picker"],
"@ui-layout": ["src/modules/ui/layout"],
Expand Down
1 change: 1 addition & 0 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ module.exports = defineConfig({
"@feature-media-shelf": getDir("src/modules/feature/media-shelf"),
"@ui-alert": getDir("src/modules/ui/alert"),
"@ui-board": getDir("src/modules/ui/board"),
"@ui-chip": getDir("src/modules/ui/chip"),
"@ui-confirmation-dialog": getDir("src/modules/ui/confirmation-dialog"),
"@ui-date-time-picker": getDir("src/modules/ui/date-time-picker"),
"@ui-layout": getDir("src/modules/ui/layout"),
Expand Down

0 comments on commit 8ce9c2b

Please sign in to comment.