Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export abstract class AbstractUserDefaultFieldComponent extends AbstractBaseData
}

public deleteUser() {
this.dataField.value = undefined;
this.dataField.value = null;
}

public getCutProperty(i18nLabel): string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('FieldConvertorService', () => {

const date = moment();
dataField.type = FieldTypeResource.DATE;
expect(service.formatValueForBackend(service.toClass(dataField), null)).toEqual(undefined);
expect(service.formatValueForBackend(service.toClass(dataField), null)).toEqual(null);
expect(service.formatValueForBackend(service.toClass(dataField), date))
.toEqual(date.format('YYYY-MM-DD'));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,10 @@ export class FieldConverterService {
if (this.resolveType(field) === FieldTypeResource.TEXT && field.component && field.component.name === 'password') {
return encodeBase64(value);
}
if (value === undefined || value === null) {
if (value === null) {
return null;
}
if (value === undefined) {
return;
}
if (this.resolveType(field) === FieldTypeResource.DATE) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ export class TaskDataService extends TaskHandlingService implements OnDestroy {
}

protected isAutocompleteEnumException(field: DataField<unknown>): boolean{
return (field instanceof EnumerationField) && (field.getComponentType() === 'autocomplete') && !field.valid;
return (field instanceof EnumerationField) && (field.getComponentType() === 'autocomplete') && !(field.valid || field.value === null);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
'clip-path': getCutProperty(fileLabel)
}">
<button mat-icon-button matPrefix
class="file-button-size"
[disabled]="formControlRef.disabled"
color="primary"
(click)="chooseFile()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,8 @@
padding-bottom: 13px;
position: relative;
}

.file-button-size {
height: 38px;
width: 38px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
.i18n-hint-error {
padding: 0 1em;
font-size: 75%;
width: auto !important;
}

.language-svg-wrapper {
Expand Down