mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Minor code and style fixes (#5398)
* type fixes * import fixes * fix typos * fix warning for private props that init in ctor only * typing fixes * typing fixes * style cleanup * fix test template
This commit is contained in:
@@ -34,7 +34,8 @@ import {
|
||||
FormFieldValidator,
|
||||
FormValues,
|
||||
FormModel,
|
||||
AppConfigService
|
||||
AppConfigService,
|
||||
ContentLinkModel
|
||||
} from '@alfresco/adf-core';
|
||||
import { FormCloudService } from '../services/form-cloud.service';
|
||||
import { TaskVariableCloud } from '../models/task-variable-cloud.model';
|
||||
@@ -101,7 +102,7 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges,
|
||||
|
||||
/** Emitted when form content is clicked. */
|
||||
@Output()
|
||||
formContentClicked = new EventEmitter<string>();
|
||||
formContentClicked = new EventEmitter<ContentLinkModel>();
|
||||
|
||||
protected subscriptions: Subscription[] = [];
|
||||
nodeId: string;
|
||||
@@ -119,7 +120,7 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges,
|
||||
|
||||
this.formService.formContentClicked
|
||||
.pipe(takeUntil(this.onDestroy$))
|
||||
.subscribe((content: any) => {
|
||||
.subscribe((content) => {
|
||||
this.formContentClicked.emit(content);
|
||||
});
|
||||
this.formRenderingService.setComponentTypeResolver('upload', () => AttachFileCloudWidgetComponent, true);
|
||||
|
@@ -88,7 +88,7 @@ export class AttachFileCloudWidgetComponent extends UploadCloudWidgetComponent
|
||||
this.onFileChanged(event);
|
||||
}
|
||||
|
||||
onRemoveAttachFile(file: File | RelatedContentRepresentation) {
|
||||
onRemoveAttachFile(file: File | RelatedContentRepresentation | Node) {
|
||||
this.removeFile(file);
|
||||
}
|
||||
|
||||
|
@@ -28,7 +28,7 @@
|
||||
}
|
||||
|
||||
&-menu-list {
|
||||
padding-top: 0px!important;
|
||||
padding-top: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -25,6 +25,7 @@ import { fakeGlobalTask, fakeCustomSchema } from '../mock/fakeTaskResponseMock';
|
||||
import { of } from 'rxjs';
|
||||
import { ProcessServiceCloudTestingModule } from '../../../testing/process-service-cloud.testing.module';
|
||||
import { TaskListCloudModule } from '../task-list-cloud.module';
|
||||
import { Person } from '@alfresco/js-api';
|
||||
|
||||
@Component({
|
||||
template: `
|
||||
@@ -34,7 +35,7 @@ import { TaskListCloudModule } from '../task-list-cloud.module';
|
||||
<data-column key="created" title="ADF_CLOUD_TASK_LIST.PROPERTIES.CREATED" class="adf-hidden"></data-column>
|
||||
<data-column key="startedBy" title="ADF_CLOUD_TASK_LIST.PROPERTIES.CREATED" class="adf-desktop-only dw-dt-col-3 adf-ellipsis-cell">
|
||||
<ng-template let-entry="$implicit">
|
||||
<div>{{getFullName(entry.row.obj.startedBy)}}</div>
|
||||
<div>{{getFullName(entry.row?.obj?.startedBy)}}</div>
|
||||
</ng-template>
|
||||
</data-column>
|
||||
</data-columns>
|
||||
@@ -43,7 +44,11 @@ import { TaskListCloudModule } from '../task-list-cloud.module';
|
||||
class CustomTaskListComponent {
|
||||
@ViewChild(TaskListCloudComponent)
|
||||
taskList: TaskListCloudComponent;
|
||||
}
|
||||
|
||||
getFullName(person: Person): string {
|
||||
return `${person.firstName} ${person.lastName}`;
|
||||
}
|
||||
}
|
||||
@Component({
|
||||
template: `
|
||||
<adf-tasklist>
|
||||
|
Reference in New Issue
Block a user