mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
AAE-37713 Amount locale display v.2 (#11319)
* [AAE-37713] amount widget formats value based on locale * [AAE-37713] added unit test with currency icon * [AAE-37713] provided amount widget config as observable * [AAE-37713] applied pr comments * [AAE-37713] subscribed amount widget to changes from form rules * [AAE-37713] applied pr comments * [AAE-37713] moved getLocale to service * [AAE-37713] moved getLocale to translation service
This commit is contained in:
@@ -15,8 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Inject, Injectable, InjectionToken, Optional } from '@angular/core';
|
||||
import { FormValues, FormModel, FormFieldOption, FormFieldValidator } from '@alfresco/adf-core';
|
||||
import { inject, Inject, Injectable, InjectionToken, Optional } from '@angular/core';
|
||||
import { FormValues, FormModel, FormFieldOption, FormFieldValidator, FormService } from '@alfresco/adf-core';
|
||||
import { Observable, from, EMPTY } from 'rxjs';
|
||||
import { expand, map, reduce, switchMap } from 'rxjs/operators';
|
||||
import { TaskDetailsCloudModel } from '../../task/models/task-details-cloud.model';
|
||||
@@ -35,6 +35,7 @@ export const FORM_CLOUD_SERVICE_FIELD_VALIDATORS_TOKEN = new InjectionToken<Form
|
||||
export class FormCloudService extends BaseCloudService implements FormCloudServiceInterface {
|
||||
private _uploadApi: UploadApi;
|
||||
private fieldValidators: FormFieldValidator[];
|
||||
private formService = inject(FormService);
|
||||
get uploadApi(): UploadApi {
|
||||
this._uploadApi = this._uploadApi ?? new UploadApi(this.apiService.getInstance());
|
||||
return this._uploadApi;
|
||||
@@ -226,7 +227,7 @@ export class FormCloudService extends BaseCloudService implements FormCloudServi
|
||||
formValues[variable.name] = variable.value;
|
||||
});
|
||||
|
||||
return new FormModel(flattenForm, formValues, readOnly, undefined, undefined, this.fieldValidators);
|
||||
return new FormModel(flattenForm, formValues, readOnly, this.formService, undefined, this.fieldValidators);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user