Skip to content

Commit

Permalink
[ACS-7429] cleanup APS1 task-list before refactorings (#9650)
Browse files Browse the repository at this point in the history
  • Loading branch information
DenysVuika authored May 7, 2024
1 parent e749473 commit 20ee286
Show file tree
Hide file tree
Showing 42 changed files with 267 additions and 993 deletions.
9 changes: 3 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,11 @@ Note: If you need more information about how to sync your fork, see [this page](
## Code style
The code style for ADF follows the [Angular style guide](https://angular.io/guide/styleguide) plus some internal rules.
You don’t have to worry too much about those rules because they are automatically checked by tslint/codelyzer/adf-rules.
If your code is not compliant with one of these rules you will see an error when you build the project along with some help on how to fix it.
The ADF-Rules are as follows:
The codebase is also checked with:
* File name component/directive cannot start with Alfresco/Activiti/adf - this rule is to help developers find files easily
* Class names cannot start with Alfresco/Activiti/adf for the same reason as above
* scss is mandatory. All the classes need to have the `adf-` prefix
- ESLint tool
- Stylelint tool
## Test guide
Expand Down
Binary file removed assets/alfresco-app-dev-framework-architecture.png
Binary file not shown.
Binary file removed assets/alfresco.png
Binary file not shown.
2 changes: 0 additions & 2 deletions demo-shell/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ import { CloudViewerComponent } from './components/cloud/cloud-viewer.component'
import { ProcessDetailsCloudDemoComponent } from './components/cloud/process-details-cloud-demo.component';
import { StartTaskCloudDemoComponent } from './components/cloud/start-task-cloud-demo.component';
import { StartProcessCloudDemoComponent } from './components/cloud/start-process-cloud-demo.component';
import { CloudBreadcrumbsComponent } from './components/cloud/cloud-breadcrumb-component';
import { CloudFiltersDemoComponent } from './components/cloud/cloud-filters-demo.component';
import { FormCloudDemoComponent } from './components/app-layout/cloud/form-demo/cloud-form-demo.component';
import { environment } from '../environments/environment';
Expand Down Expand Up @@ -119,7 +118,6 @@ import { FolderDirectiveModule } from './folder-directive';
ProcessDetailsCloudDemoComponent,
StartTaskCloudDemoComponent,
StartProcessCloudDemoComponent,
CloudBreadcrumbsComponent,
CloudFiltersDemoComponent,
FormCloudDemoComponent,
CustomEditorComponent,
Expand Down

This file was deleted.

This file was deleted.

43 changes: 0 additions & 43 deletions demo-shell/src/app/components/cloud/cloud-breadcrumb-component.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
<adf-sidenav-layout [sidenavMin]="70" [sidenavMax]="270" [stepOver]="780">
<adf-sidenav-layout-header>
<ng-template>
<app-cloud-breadcrumbs></app-cloud-breadcrumbs>
<div class="app-cloud-layout-toolbar">
<span>{{appName}}</span>
<span *ngIf="filterName">{{ ' > ' + (filterName | translate)}}</span>
</div>
</ng-template>
</adf-sidenav-layout-header>
<adf-sidenav-layout-navigation>
Expand Down
12 changes: 8 additions & 4 deletions demo-shell/src/app/components/cloud/cloud-layout.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
overflow: auto;
}

.app-cloud-layout-tab-body .mat-tab-body-wrapper {
height: 100%;
}

app-cloud-layout {
.app-cloud-layout-tab-body {
height: 100%;
Expand All @@ -18,5 +14,13 @@ app-cloud-layout {
box-sizing: border-box;
display: flex;
}

& > div {
height: 100%;
}
}

.app-cloud-layout-toolbar {
display: flex;
}
}
12 changes: 6 additions & 6 deletions demo-shell/src/app/components/cloud/cloud-layout.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,10 @@ import { CloudLayoutService } from './services/cloud-layout.service';
encapsulation: ViewEncapsulation.None
})
export class CloudLayoutComponent implements OnInit {
displayMenu = true;
appName: string;
filterName: string;

constructor(
private router: Router,
private route: ActivatedRoute,
private cloudLayoutService: CloudLayoutService
) { }
constructor(private router: Router, private route: ActivatedRoute, private cloudLayoutService: CloudLayoutService) {}

ngOnInit() {
let root: string = '';
Expand All @@ -53,6 +49,10 @@ export class CloudLayoutComponent implements OnInit {
if (root === 'processes' && params.id) {
this.cloudLayoutService.setCurrentProcessFilterParam({ id: params.id });
}

if (params.filterName) {
this.filterName = params.filterName;
}
});
}

Expand Down
2 changes: 0 additions & 2 deletions demo-shell/src/app/components/files/files.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,6 @@ <h5>Upload</h5>
</section>
<div *ngIf="!acceptedFilesTypeShow">
<adf-upload-button
#uploadButton
[disabled]="!enableUpload"
[rootFolderId]="documentList.currentFolderId"
[multipleFiles]="multipleFileUpload"
Expand All @@ -362,7 +361,6 @@ <h5>Upload</h5>
</div>
<div *ngIf="acceptedFilesTypeShow">
<adf-upload-button
#uploadButton
[disabled]="!enableUpload"
[rootFolderId]="documentList.currentFolderId"
[acceptedFilesType]="acceptedFilesType"
Expand Down
2 changes: 1 addition & 1 deletion demo-shell/src/app/components/form/form.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</adf-form>
</div>

<div class="app-console" #console>
<div class="app-console">
<h3>Error log:</h3>
<p *ngFor="let error of errorFields">Error {{ error.name }} {{error.validationSummary.message | translate}}</p>
</div>
Expand Down
35 changes: 19 additions & 16 deletions demo-shell/src/app/components/form/form.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,16 @@
* limitations under the License.
*/

import { Component, Inject, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
import { FormModel, FormFieldModel, FormService, FormOutcomeEvent, NotificationService, CoreAutomationService, FormRenderingService } from '@alfresco/adf-core';
import { Component, inject, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core';
import {
FormModel,
FormFieldModel,
FormService,
FormOutcomeEvent,
NotificationService,
CoreAutomationService,
FormRenderingService
} from '@alfresco/adf-core';
import { ProcessFormRenderingService } from '@alfresco/adf-process-services';
import { InMemoryFormService } from '../../services/in-memory-form.service';
import { Subject } from 'rxjs';
Expand All @@ -33,6 +41,10 @@ import { takeUntil } from 'rxjs/operators';
encapsulation: ViewEncapsulation.None
})
export class FormComponent implements OnInit, OnDestroy {
private formService = inject(FormService);
private notificationService = inject(NotificationService);
private automationService = inject(CoreAutomationService);

form: FormModel;
errorFields: FormFieldModel[] = [];
formConfig: string;
Expand All @@ -49,25 +61,16 @@ export class FormComponent implements OnInit, OnDestroy {

private onDestroy$ = new Subject<boolean>();

constructor(@Inject(FormService) private formService: InMemoryFormService,
private notificationService: NotificationService,
private automationService: CoreAutomationService) {
}

logErrors(errorFields: FormFieldModel[]) {
this.errorFields = errorFields;
}

ngOnInit() {
this.formService.executeOutcome
.pipe(takeUntil(this.onDestroy$))
.subscribe((formOutcomeEvent: FormOutcomeEvent) => {
formOutcomeEvent.preventDefault();
});

this.formConfig = JSON.stringify(
this.automationService.forms.getFormDefinition()
);
this.formService.executeOutcome.pipe(takeUntil(this.onDestroy$)).subscribe((formOutcomeEvent: FormOutcomeEvent) => {
formOutcomeEvent.preventDefault();
});

this.formConfig = JSON.stringify(this.automationService.forms.getFormDefinition());
this.parseForm();
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,16 @@
class="app-grid-item app-tasks-details"
*ngIf="!isStartTaskMode()"
data-automation-id="app-tasks-details">
<adf-task-details #activitiDetails
[debugMode]="true"
[taskId]="currentTaskId"
[showFormTitle]="true"
[fieldValidators]="fieldValidators"
[showHeaderContent]="true"
(formCompleted)="onFormCompleted()"
(formContentClicked)="onContentClick($event)"
(taskCreated)="onTaskCreated($event)"
(assignTask)="onAssignTask()"
(taskDeleted)="onTaskDeleted()">
<adf-task-details
[taskId]="currentTaskId"
[showFormTitle]="true"
[fieldValidators]="fieldValidators"
[showHeaderContent]="true"
(formCompleted)="onFormCompleted()"
(formContentClicked)="onContentClick($event)"
(taskCreated)="onTaskCreated($event)"
(assignTask)="onAssignTask()"
(taskDeleted)="onTaskDeleted()">
</adf-task-details>

<div *ngIf="currentTaskId">
Expand Down Expand Up @@ -129,14 +128,12 @@
<adf-pagination
*ngIf="processList"
[target]="processList"
(changePageSize)="onChangePageSize($event)"
#processListPagination>
(changePageSize)="onChangePageSize($event)">
</adf-pagination>
</div>

<div class="app-grid-item app-processes-details" *ngIf="!isStartProcessMode()">
<adf-process-instance-details
#activitiProcessDetails
[processInstanceId]="currentProcessInstanceId"
(processCancelled)="processCancelled()"
(showProcessDiagram)="onShowProcessDiagram($event)"
Expand Down
Loading

0 comments on commit 20ee286

Please sign in to comment.