Käyttäjän "mmarjeh" toiminnot

Kysymys

Hi, is it possible to have a shared model, database, Identity for multiple applications?

I had two applications one for hour staff and the other for our clients, both of these applications shared the same model, database, Identity.

The main difference is in the logic layer and validations, and we need to move these applications to ABP could you please advise the best scenario to start migration process?

  • ABP Framework version: v7.0.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Hi,

I'm trying to implement the following scenario: I had a department entity which contains head department property, so I need to show all departments except the current in lookup control (In edit mode) but I could not find the way to pass department id to service function.

<abp-lookup-select cid="department-parent-department-id" formControlName="parentDepartmentId" [getFn]="service.getParentDepartmentLookup" ></abp-lookup-select>

  • ABP Framework version: v7.0.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Hi All,

I had an old asp.net MVC application and now try to move it to ABP Framework, in our application we create a user account without password once admin add new employee, then send reset password link via email to recent created account.

Could you please advise how to implement the same scenario using ABP Framework?

  • ABP Framework version: v7.0.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

Hi,

Yes, you can. but I don't know what's blocking you, can you explain it in detail? thanks.

Hi,

How to get reset password URL form the client app? should we use settings file or ABP has predefined feature for that?

Hi,

Yes, we have an HTTP API you can use to send the reset password code email.

You can also send it manually:

 
// inject IdentityUserManager and IAccountEmailer service. 
protected IdentityUserManager UserManager { get; } 
protected IAccountEmailer AccountEmailer { get; } 
 
//Find a user 
var resetToken = await UserManager.GeneratePasswordResetTokenAsync(user); 
await AccountEmailer.SendPasswordResetLinkAsync(user, resetToken, input.AppName, input.ReturnUrl, input.ReturnUrlHash); 

Thanks for your kind support !

Hi,

I got bellow issue when post model that contains date value from angular frontend to API backend.

I tried to use custom converter, but it didn't reach read and write methods:

context.Services.Configure<JsonOptions>(options =>
{
            options.JsonSerializerOptions.Converters.Add(new CustomDateTimeConverter());
});

public class CustomDateTimeConverter : JsonConverter<DateTime>
{
    public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
    {

        var formats = "dd/MM/yyyy;dd-MM-yyyy;dd.MM.yyyy;dd/MM/yyyy hh:mm:ss;dd-MM-yyyy hh:mm:ss;dd.MM.yyyy hh:mm:ss;dd/MM/yyyy HH:mm:ss;dd-MM-yyyy HH:mm:ss;dd.MM.yyyy HH:mm:ss".Split(";");

        var input = reader.GetString();

        var value = DateTime.ParseExact(input, formats, null);

        return value;
    }

    public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options)
    {
        writer.WriteStringValue(value);
    }
}

Also I tried below settings:

var formats = "dd/MM/yyyy;dd-MM-yyyy;dd.MM.yyyy;dd/MM/yyyy hh:mm:ss;dd-MM-yyyy hh:mm:ss;dd.MM.yyyy hh:mm:ss;dd/MM/yyyy HH:mm:ss;dd-MM-yyyy HH:mm:ss;dd.MM.yyyy HH:mm:ss".Split(";");

context.Services.Configure<AbpJsonOptions>(options =>
{
    options.InputDateTimeFormats.AddRange(formats);

});

I got another issue:

Could you please help and advise.

  • ABP Framework version: v7.0.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Hi,

Please find below requested details:

date control

<div class="input-group" validationTarget>
    <input readonly id="expense-date" formControlName="date" class="form-control" ngbDatepicker #dateInput
      #dateDatepicker="ngbDatepicker" (click)="dateDatepicker.open()"
      (keyup.space)="dateDatepicker.open()"  />
    <div *ngIf="dateInput.value" class="input-group-append">
      <button class="btn btn-link px-2" type="button" [title]="'AbpUi::Clear' | abpLocalization" (click)="
          dateDatepicker.writeValue(null); dateDatepicker.manualDateChange(null, true)
        ">
        <i class="fa fa-times" aria-hidden="true"></i>
      </button>
    </div>
  </div>
</div>


{
  "notes": "Mohammed Bany El Marjeh",
  "totalExpenses": 250000,
  "cashAdvancedTaken": 4500,
  "netAmount": 245500,
  "beneficiary": "Mohammed Bany El Marjeh",
  "date": {
    "year": 2023,
    "month": 5,
    "day": 28
  },
  "priority": 0,
  "paymentMethodId": 1,
  "mainCurrencyId": 1,
  "treasurerId": 3015,
  "categoryId": "969dbede-c4a1-3985-c9ae-3a0aa894b317",
  "departmentId": 5,
  "expenseDetails": [
    {
      "date": {
        "year": 2023,
        "month": 5,
        "day": 31
      },
      "invoiceNO": "00001",
      "description": "Internet",
      "amountFC": 250000,
      "amount": 250000,
      "stationId": 1,
      "financialAccountId": 1,
      "fcCurrencyId": 1
    }
  ]
}

Hi,

I did but I still got below error

I created a new project, but the angular app didn't work. I got the following error:

Error: node_modules/@volo/abp.ng.lepton-x.core/lib/directives/if-replaceable-template-exists.directive.d.ts:12:125 - error TS2344: Type '{ abpIfReplaceableTemplateExists: { alias: "abpIfReplaceableTemplateExists"; required: false; }; }' does not satisfy the constraint '{ [key: string]: string; }'. Property '"abpIfReplaceableTemplateExists"' is incompatible with index signature. Type '{ alias: "abpIfReplaceableTemplateExists"; required: false; }' is not assignable to type 'string'.

12 static ɵdir: i0.ɵɵDirectiveDeclaration<IfReplaceableTemplateExistsDirective, "[abpIfReplaceableTemplateExists]", never, { "abpIfReplaceableTemplateExists": { "alias": "abpIfReplaceableTemplateExists"; "required": false; }; }, {}, never, never, false, never>;

  • ABP Framework version: v7.3.2
  • UI Type: Angular
  • Database System: EF Core (SQL Server)

Thanks for your advice.

But the problem still exists.

Näytetään 1 - 10/13 tietueesta
Made with ❤️ on ABP v8.2.0-preview Updated on maaliskuuta 25, 2024, 15.11