Skip to content

Commit

Permalink
Merge pull request #11852 from qmonmert/arrowfct2
Browse files Browse the repository at this point in the history
Refacto: implicit return
  • Loading branch information
murdos authored Feb 3, 2025
2 parents 09dd8c1 + f3c4e6d commit a9478be
Showing 1 changed file with 8 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,7 @@ export default defineComponent({
),
});

const isFeature = (element: LandscapeElement): boolean => {
return element instanceof LandscapeFeature;
};
const isFeature = (element: LandscapeElement): boolean => element instanceof LandscapeFeature;

const landscapeClass = (): string => {
const hasEmphasizedModule = emphasizedModule.value !== undefined;
Expand Down Expand Up @@ -384,9 +382,7 @@ export default defineComponent({
return '';
};

const flavorClass = (): string => {
return ' ' + modeClass();
};
const flavorClass = (): string => ' ' + modeClass();

const searchHighlightClass = (module: LandscapeElementId): string => {
return highlightedModule.value
Expand Down Expand Up @@ -449,17 +445,11 @@ export default defineComponent({
}
};

const isSelectable = (module: ModuleSlug): boolean => {
return landscapeValue().isSelectable(module);
};
const isSelectable = (module: ModuleSlug): boolean => landscapeValue().isSelectable(module);

const disabledNewApplication = (): boolean => {
return disabledApplication() || landscapeValue().noNotAppliedSelectedModule();
};
const disabledNewApplication = (): boolean => disabledApplication() || landscapeValue().noNotAppliedSelectedModule();

const disabledAllApplication = (): boolean => {
return disabledApplication();
};
const disabledAllApplication = (): boolean => disabledApplication();

const disabledApplication = (): boolean => {
if (operationInProgress.value) {
Expand All @@ -477,23 +467,17 @@ export default defineComponent({
return missingMandatoryProperty();
};

const selectedNewModulesCount = (): number => {
return landscapeValue().notAppliedSelectedModulesCount();
};
const selectedNewModulesCount = (): number => landscapeValue().notAppliedSelectedModulesCount();

const selectedModulesCount = (): number => {
return landscapeValue().selectedModulesCount();
};
const selectedModulesCount = (): number => landscapeValue().selectedModulesCount();

const missingMandatoryProperty = () => {
return selectedModulesProperties().some(
property => property.mandatory && empty(moduleParametersValues.value.get(property.key)) && empty(property.defaultValue),
);
};

const selectedModulesProperties = (): ModulePropertyDefinition[] => {
return landscapeValue().selectedModulesProperties();
};
const selectedModulesProperties = (): ModulePropertyDefinition[] => landscapeValue().selectedModulesProperties();

const updateModuleCommit = (commit: boolean) => {
commitModule = commit;
Expand Down

0 comments on commit a9478be

Please sign in to comment.