mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
update
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
@if (processDefinitionLoaded) {
|
@if (processDefinitionLoaded || isFormCloudLoading) {
|
||||||
<mat-card appearance="outlined" class="adf-start-process">
|
<mat-card appearance="outlined" class="adf-start-process">
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
@if (showTitle) {
|
@if (showTitle) {
|
||||||
|
|||||||
+8
-8
@@ -210,7 +210,7 @@ export class StartProcessCloudComponent implements OnChanges, OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get disableStartButton(): boolean {
|
get disableStartButton(): boolean {
|
||||||
return !this.appName || !this.processDefinition.valid || this.isProcessStarting || this.processDefinitionLoaded === false;
|
return !this.appName || !this.processDefinition.valid || this.isProcessStarting || !this.processDefinitionLoaded || this.isFormCloudLoading;
|
||||||
}
|
}
|
||||||
|
|
||||||
get isProcessDefinitionsEmpty(): boolean {
|
get isProcessDefinitionsEmpty(): boolean {
|
||||||
@@ -415,16 +415,16 @@ export class StartProcessCloudComponent implements OnChanges, OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.processDefinition.setValue(this.processDefinitionName);
|
this.processDefinition.setValue(this.processDefinitionName);
|
||||||
const processDefinition = this.processDefinitionList.find((process) => process.name === this.processDefinitionName);
|
const selectedProcessDefinition = this.processDefinitionList.find((process) => process.name === this.processDefinitionName);
|
||||||
|
|
||||||
if (!processDefinition) {
|
if (!selectedProcessDefinition) {
|
||||||
return EMPTY;
|
return EMPTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.filteredProcesses = this.getProcessDefinitionListByNameOrKey(processDefinition.name);
|
this.filteredProcesses = this.getProcessDefinitionListByNameOrKey(selectedProcessDefinition.name);
|
||||||
this.processDefinitionSelectionChanged(processDefinition);
|
this.processDefinitionSelectionChanged(selectedProcessDefinition);
|
||||||
|
|
||||||
return this.fetchStaticVariablesAndConstants(processDefinition.name);
|
return this.fetchStaticVariablesAndConstants(selectedProcessDefinition.name);
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
.subscribe({
|
.subscribe({
|
||||||
@@ -432,10 +432,10 @@ export class StartProcessCloudComponent implements OnChanges, OnInit {
|
|||||||
if (staticMappings && constants) {
|
if (staticMappings && constants) {
|
||||||
this.onFetchStaticVariablesAndConstants([staticMappings, constants]);
|
this.onFetchStaticVariablesAndConstants([staticMappings, constants]);
|
||||||
}
|
}
|
||||||
|
this.processDefinitionLoaded = true;
|
||||||
},
|
},
|
||||||
error: () => {
|
error: () => {
|
||||||
this.errorMessageId = 'ADF_CLOUD_PROCESS_LIST.ADF_CLOUD_START_PROCESS.ERROR.LOAD_PROCESS_DEFS';
|
this.errorMessageId = 'ADF_CLOUD_PROCESS_LIST.ADF_CLOUD_START_PROCESS.ERROR.LOAD_PROCESS_DEFS';
|
||||||
this.processDefinitionLoaded = true;
|
|
||||||
},
|
},
|
||||||
complete: () => {
|
complete: () => {
|
||||||
this.processDefinitionLoaded = true;
|
this.processDefinitionLoaded = true;
|
||||||
@@ -587,7 +587,7 @@ export class StartProcessCloudComponent implements OnChanges, OnInit {
|
|||||||
this.formContentClicked.emit(content);
|
this.formContentClicked.emit(content);
|
||||||
}
|
}
|
||||||
|
|
||||||
processDefinitionSelectionChanged(processDefinition: ProcessDefinitionCloud) {
|
processDefinitionSelectionChanged(processDefinition?: ProcessDefinitionCloud): void {
|
||||||
if (processDefinition) {
|
if (processDefinition) {
|
||||||
this.setDefaultProcessName(processDefinition.name);
|
this.setDefaultProcessName(processDefinition.name);
|
||||||
this.processDefinitionSelection.emit(processDefinition);
|
this.processDefinitionSelection.emit(processDefinition);
|
||||||
|
|||||||
Reference in New Issue
Block a user