Hi guys,
Regardings Audit Logging screen, I want to display login/logout history activities, such as when is login sucessul or failed, when is log out. Can we do it? I refered to https://docs.abp.io/en/commercial/latest/modules/audit-logging and https://docs.abp.io/en/abp/latest/Audit-Logging But the document is not point out yet how to enable the tracking of login and logout of all users on Audit Logging screen. Could you share me how to do it?
Hi guys,
I read the closed old question: https://support.abp.io/QA/Questions/76/How-to-add-custom-authentication-token-providers-as--IUserTwoFactorTokenProviderAppUser and https://docs.abp.io/en/commercial/master/how-to/implementing-passwordless-authentication But this is related to MVC only. Could you guys guide steps how to implement Passwordless Authentication as Google Authorization in Angular UI? Many thanks
@liangshiwei Thank you! It works well.
Hi @liangshiwei, I have the same problem about AccountResource.
I added Volo.Abp.Account.Application.Contracts" Version="2.9.0" to XXX.Domain project. and add this code into xxxDomainModule.cs
options.Resources.Get<Volo.Abp.Account.Localization.AccountResource>().AddVirtualJson("/Localization/Account");
But Identity Server Seperated cannot start. Could you give me how to fix it?
---> Volo.Abp.AbpException: Can not find a resource with given type: Volo.Abp.Account.Localization.AccountResource, Volo.Abp.Account.Application.Contracts, Version=2.9.0.0, Culture=neutral, PublicKeyToken=null
at Volo.Abp.Localization.LocalizationResourceDictionary.Get[TResource]()
Hi @alper: The issue has not solved yet. Can you kindly check it?
Hi guys,
I tried to handle the input validation message. I want to prevent the validator from displaying errors before the user has a chance to edit the form. But when I tried to display a abp-modal popup above a abp-modal popup else, It always show the red required message as the attached image.
I refer to https://angular.io/guide/form-validation. It recommended as below:
To prevent the validator from displaying errors before the user has a chance to edit the form, you should check for either the dirty or touched states in a control. When the user changes the value in the watched field, the control is marked as "dirty". When the user blurs the form control element, the control is marked as "touched".
Q1. But abp-modal seems not add check yet for either the dirty or touched states in a control. Could you guys how to prevent it?
Q2: How to change the text of the red required message of abp in order to show message based on each specific pattern.
Eg: input field workspace
added Validator pattern: ^[A-Za-z0-9]*$
. The message should be displayed as below:
The workplace only accepts alphabets, not special characters.
instead of Invalid pattern. Please review your input.
Q3: How to translate abp validation message for localization languages, such as vietnamese?
Eg:
en: This field is required.
-->vi: Trường này là bắt buộc.
en: Invalid pattern. Please review your input.
--> vi: Không hợp lệ. Vui lòng nhập lại
component.html
<abp-modal [(visible)]="isModalVisible" [busy]="modalBusy" (disappear)="form = null">
<ng-template #abpHeader>
<h3>{{ (selected?.id ? 'AbpUi::Edit' : 'HR::NewEmployeeExperience') | abpLocalization }}</h3>
</ng-template>
<ng-template #abpBody>
<form [formGroup]="form" validateOnSubmit>
<div class="mt-2 fade-in-top">
<div class="form-group">
<label for="employeeExperience-workplace">
{{ 'HR::Workplace' | abpLocalization }}
</label>
<span class="req-mark"> * </span>
<input
type="text"
id="employeeExperience-workplace"
class="form-control"
formControlName="workplace"
/>
</div>
<div class="form-group">
<label for="employeeExperience-seniority">
{{ 'HR::Seniority' | abpLocalization }}
</label>
<span class="req-mark"> * </span>
<input
type="number"
id="employeeExperience-seniority"
class="form-control"
formControlName="seniority"
/>
</div>
<div class="form-group">
<label for="employeeExperience-position">
{{ 'HR::Position' | abpLocalization }}
</label>
<span class="req-mark"> * </span>
<input
type="text"
id="employeeExperience-position"
class="form-control"
formControlName="position"
/>
</div>
</div>
</form>
</ng-template>
<ng-template #abpFooter>
<button type="button" class="btn btn-secondary" #abpClose>
{{ 'AbpUi::Cancel' | abpLocalization }}
</button>
<abp-button iconClass="fa fa-save" (click)="save()" [disabled]="form?.invalid">
{{ 'AbpUi::Save' | abpLocalization }}
</abp-button>
</ng-template>
</abp-modal>
component.ts
buildForm() {
this.form = this.fb.group({
employeeCode: [this.employeeCode || '', [Validators.required, Validators.pattern('')]],
workplace: [this.selected.workplace || '', [Validators.required, Validators.pattern('^[A-Za-z0-9]*$')]],
seniority: [
this.selected.seniority || '',
[Validators.required, Validators.pattern('^[0-9]*$')],
],
position: [this.selected.position || '', [Validators.required, Validators.pattern('')]],
});
}