Merge pull request #12177 from ToolJet/fix/modularisation-appbuilder-bugs

Fix: appbuilder modularisation bugs
This commit is contained in:
Muhsin Shah C P 2025-03-11 17:45:39 +05:30 committed by GitHub
commit be57d0c4bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 3 deletions

View file

@ -7,7 +7,7 @@ import { getWorkspaceId, decodeEntities } from '@/_helpers/utils';
import { ButtonSolid } from '@/_ui/AppButton/AppButton'; import { ButtonSolid } from '@/_ui/AppButton/AppButton';
import { useDataSources, useGlobalDataSources, useSampleDataSource } from '@/_stores/dataSourcesStore'; import { useDataSources, useGlobalDataSources, useSampleDataSource } from '@/_stores/dataSourcesStore';
import { useDataQueriesActions } from '@/_stores/dataQueriesStore'; import { useDataQueriesActions } from '@/_stores/dataQueriesStore';
import { staticDataSources as staticDatasources } from '../constants'; import { defaultSources, staticDataSources as staticDatasources } from '../constants';
import { useQueryPanelActions } from '@/_stores/queryPanelStore'; import { useQueryPanelActions } from '@/_stores/queryPanelStore';
import Search from '@/_ui/Icon/solidIcons/Search'; import Search from '@/_ui/Icon/solidIcons/Search';
import { Tooltip } from 'react-tooltip'; import { Tooltip } from 'react-tooltip';
@ -135,7 +135,7 @@ function DataSourceSelect({ isDisabled, selectRef, closePopup, workflowDataSourc
<div> <div>
<DataSourceIcon source={source} height={16} />{' '} <DataSourceIcon source={source} height={16} />{' '}
<span data-cy={`ds-${source.name.toLowerCase()}`} className="ms-1 small" style={{ fontSize: '13px' }}> <span data-cy={`ds-${source.name.toLowerCase()}`} className="ms-1 small" style={{ fontSize: '13px' }}>
{source.name} {defaultSources[cleanWord(source.name)].name}
</span> </span>
</div> </div>
), ),
@ -178,6 +178,10 @@ function DataSourceSelect({ isDisabled, selectRef, closePopup, workflowDataSourc
} }
}; };
function cleanWord(word) {
return word.replace(/default/g, '');
}
return ( return (
<div> <div>
<Select <Select

View file

@ -42,7 +42,7 @@ export class VersionUtilService implements IVersionUtilService {
async updateVersion(appVersion: AppVersion, appVersionUpdateDto: AppVersionUpdateDto) { async updateVersion(appVersion: AppVersion, appVersionUpdateDto: AppVersionUpdateDto) {
const editableParams = {}; const editableParams = {};
const { globalSettings, homePageId, pageSettings } = appVersion; const { globalSettings, homePageId, pageSettings, name } = appVersion;
if (appVersionUpdateDto?.homePageId && homePageId !== appVersionUpdateDto.homePageId) { if (appVersionUpdateDto?.homePageId && homePageId !== appVersionUpdateDto.homePageId) {
editableParams['homePageId'] = appVersionUpdateDto.homePageId; editableParams['homePageId'] = appVersionUpdateDto.homePageId;
@ -65,6 +65,10 @@ export class VersionUtilService implements IVersionUtilService {
editableParams['showViewerNavigation'] = appVersionUpdateDto.showViewerNavigation; editableParams['showViewerNavigation'] = appVersionUpdateDto.showViewerNavigation;
} }
if (appVersionUpdateDto?.name && name !== appVersionUpdateDto.name) {
editableParams['name'] = appVersionUpdateDto.name;
}
await this.versionRepository.update(appVersion.id, editableParams); await this.versionRepository.update(appVersion.id, editableParams);
return; return;
} }