Skip to content

Commit

Permalink
fix(row-environment-variable): service name for Job
Browse files Browse the repository at this point in the history
  • Loading branch information
RemiBonnet committed Dec 30, 2022
1 parent 7b4dbba commit 2d00906
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
@@ -1,4 +1,4 @@
import { APIVariableScopeEnum } from 'qovery-typescript-axios'
import { LinkedServiceTypeEnum } from 'qovery-typescript-axios'
import { useParams } from 'react-router-dom'
import { NavLink } from 'react-router-dom'
import { IconEnum } from '@qovery/shared/enums'
Expand All @@ -7,7 +7,7 @@ import {
EnvironmentVariableSecretOrPublic,
SecretEnvironmentVariableEntity,
} from '@qovery/shared/interfaces'
import { APPLICATION_URL } from '@qovery/shared/router'
import { APPLICATION_GENERAL_URL, APPLICATION_URL, DATABASE_GENERAL_URL, DATABASE_URL } from '@qovery/shared/router'
import {
ButtonIconAction,
ButtonIconActionElementProps,
Expand Down Expand Up @@ -116,12 +116,19 @@ export function TableRowEnvironmentVariable(props: TableRowEnvironmentVariablePr
</Skeleton>
</div>
<div className="text-text-600 text-ssm font-medium px-4">
{variable.scope === APIVariableScopeEnum.BUILT_IN && variable.service_type ? (
{variable.service_name && variable.service_type && variable.service_id ? (
<NavLink
className="flex gap-2 items-center"
to={APPLICATION_URL(organizationId, projectId, environmentId, variable.service_id) + '/general'}
to={
variable.service_type !== LinkedServiceTypeEnum.DATABASE
? APPLICATION_URL(organizationId, projectId, environmentId, variable.service_id) +
APPLICATION_GENERAL_URL
: DATABASE_URL(organizationId, projectId, environmentId, variable.service_id) + DATABASE_GENERAL_URL
}
>
<Icon name={variable.service_type?.toString() || ''} className="w-4" />
{variable.service_type !== LinkedServiceTypeEnum.JOB && (
<Icon name={variable.service_type?.toString() || ''} className="w-4" />
)}
{variable.service_name}
</NavLink>
) : (
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -54,7 +54,7 @@
"msw": "^0.42.1",
"postcss": "8.4.16",
"posthog-js": "^1.24.0",
"qovery-typescript-axios": "^1.1.60",
"qovery-typescript-axios": "^1.1.65",
"react": "18.2.0",
"react-beautiful-dnd": "^13.1.0",
"react-dom": "18.2.0",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Expand Up @@ -16673,10 +16673,10 @@ q@^1.5.1:
resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
integrity sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==

qovery-typescript-axios@^1.1.60:
version "1.1.60"
resolved "https://registry.yarnpkg.com/qovery-typescript-axios/-/qovery-typescript-axios-1.1.60.tgz#139324ef5f7f1cf9216248c37042dc40e39ca50f"
integrity sha512-axHUVAb3PVwoz9r4Nk/DXitgREmxnvDP0dmhNJ5jFmzZOWFM+bUQoaIGdc/+KMP5+iMZThQcE9/xPsnh7zW6oA==
qovery-typescript-axios@^1.1.65:
version "1.1.65"
resolved "https://registry.yarnpkg.com/qovery-typescript-axios/-/qovery-typescript-axios-1.1.65.tgz#6824f50b81ac9966086f11f0634a3d2263db1791"
integrity sha512-c0d2RTn1V9hFk78nql4jSAnzy09YcHUANVLQyUK1A8e3RmGf0lSZCLS1+8vnYYrYb3VuOc5O2yR8HNg1EN02ow==
dependencies:
axios "^0.21.4"

Expand Down

0 comments on commit 2d00906

Please sign in to comment.