Skip to content

Commit

Permalink
Fix application buy (#110)
Browse files Browse the repository at this point in the history
Co-authored-by: AceDataCloud <[email protected]>
  • Loading branch information
Germey and AceDataCloud authored Aug 16, 2024
1 parent 709a866 commit 49ab74e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix application list apply",
"packageName": "@acedatacloud/nexior",
"email": "[email protected]",
"dependentChangeType": "patch"
}
17 changes: 13 additions & 4 deletions src/pages/console/application/List.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,13 @@
<el-table-column fixed="right" width="120px">
<template #default="scope">
<div class="float-right">
<el-button type="primary" round size="small" @click="onBuyMore(scope?.row)">
<el-button
v-if="scope?.row?.type === 'Period' || scope?.row?.type === 'Usage'"
type="primary"
round
size="small"
@click="onBuyMore(scope?.row)"
>
{{ $t('application.button.buyMore') }}
</el-button>
</div>
Expand All @@ -94,7 +100,7 @@ import { applicationOperator } from '@/operators';
import Pagination from '@/components/common/Pagination.vue';
import CopyToClipboard from '@/components/common/CopyToClipboard.vue';
import { ElTable, ElRow, ElCol, ElTableColumn, ElCard, ElButton, ElTag } from 'element-plus';
import { ROUTE_CONSOLE_APPLICATION_EXTRA } from '@/router/constants';
import { ROUTE_CONSOLE_APPLICATION_EXTRA, ROUTE_CONSOLE_APPLICATION_SUBSCRIBE } from '@/router/constants';
import { IApplication, IApplicationListResponse, IApplicationType, ICredentialType, IService } from '@/models';
interface IData {
Expand Down Expand Up @@ -175,9 +181,12 @@ export default defineComponent({
id: application.id
}
});
} else {
} else if (application.type === IApplicationType.PERIOD) {
this.$router.push({
name: ROUTE_CONSOLE_SUBSCRIPTION_BUY
name: ROUTE_CONSOLE_APPLICATION_SUBSCRIBE,
params: {
id: application.id
}
});
}
},
Expand Down

0 comments on commit 49ab74e

Please sign in to comment.