mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 01:18:23 +00:00
[appdef] fixes: cloning apps (#8012)
* fixes: cloning apps * fixes: slug status from share modal
This commit is contained in:
parent
bda6e886ce
commit
d26d6036e8
3 changed files with 8 additions and 4 deletions
|
|
@ -154,7 +154,7 @@ class ManageAppUsersComponent extends React.Component {
|
|||
isSlugVerificationInProgress: true,
|
||||
});
|
||||
appsService
|
||||
.setSlug(this.state.app.id, value)
|
||||
.setSlug(this.state.appId, value)
|
||||
.then(() => {
|
||||
this.setState({
|
||||
newSlug: {
|
||||
|
|
|
|||
|
|
@ -198,7 +198,8 @@ export class AppImportExportService {
|
|||
appParamsObj: any,
|
||||
appName: string,
|
||||
externalResourceMappings = {},
|
||||
tooljetVersion = ''
|
||||
tooljetVersion = '',
|
||||
cloning = false
|
||||
): Promise<App> {
|
||||
if (typeof appParamsObj !== 'object') {
|
||||
throw new BadRequestException('Invalid params for app import');
|
||||
|
|
@ -220,7 +221,9 @@ export class AppImportExportService {
|
|||
schemaUnifiedAppParams.name = appName;
|
||||
|
||||
const importedAppTooljetVersion = extractMajorVersion(tooljetVersion);
|
||||
const isNormalizedAppDefinitionSchema = isTooljetVersionWithNormalizedAppDefinitionSchem(importedAppTooljetVersion);
|
||||
const isNormalizedAppDefinitionSchema = cloning
|
||||
? true
|
||||
: isTooljetVersionWithNormalizedAppDefinitionSchem(importedAppTooljetVersion);
|
||||
|
||||
const importedApp = await this.createImportedAppForUser(this.entityManager, schemaUnifiedAppParams, user);
|
||||
await this.setupImportedAppAssociations(
|
||||
|
|
|
|||
|
|
@ -68,7 +68,8 @@ export class ImportExportResourcesService {
|
|||
{
|
||||
tooljet_database: tableNameMapping,
|
||||
},
|
||||
importResourcesDto.tooljet_version
|
||||
importResourcesDto.tooljet_version,
|
||||
cloning
|
||||
);
|
||||
imports.app.push({ id: createdApp.id, name: createdApp.name });
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue