Activities of "bunyamin"

Hello,

If you can download the source code, you can implement your fix until you upgrade your packages.

In organization-units.component.ts, after deleting a unit, you need to check if it is the selected unit.

Change

// ...
.subscribe((status: Confirmation.Status) => {
        if (status === Confirmation.Status.confirm) {
          this.service.delete(id).subscribe(() => this.get());

to

// ...
.subscribe((status: Confirmation.Status) => {
        if (status === Confirmation.Status.confirm) {
          this.service
            .delete(id)
            .pipe(
              tap(_ => {
                if (id === this.selectedUnit?.id) {
                  this.selectedUnit = null;
                }
              }),
            )
            .subscribe(() => this.get());
        }
      });

Hello @basavraj,

Is this issue resolved? Can we close this one?

Hello,

This was a known issue with version 5.1.2. It's fixed in 5.1.3. Could you please update your versions and try again?

Your credit is refunded.

Hello,

It is not broken. When we migrated to bootstrap5, we chose to follow its standards a bit more. With v4, we used to remove the underline from links but with v5, we stopped doing that. If you don't want your links to have an underline, you can override it with a simple CSS.

Hello,

Could you please share your code?

Hello,

This was fixed in v4.3. Could you upgrade and try again?

Hello,

Our templates come with built-in a footer component which you can replace.

Follow the instructions in this docs

And for the component key, use the following:

import { eThemeLeptonComponents } from '@volo/abp.ng.theme.lepton';

eThemeLeptonComponents.ApplicationLayoutFooter

Hello,

Thank you for reporting this. It is not quite a bug as you have mentioned but we'll fix this. Your credit is refunded.

Yeah, sorry I just added currentLang$ and it doesn't exist in your code. You need a stream of the "currentLang" because when the user switches between ar and en, the direction should be updated. Here is how you can do it with the existing APIs:

What you need is SessionStateService::getLanguage$() method.

import { getLocaleDirection, SessionStateService } from '@abp/ng.core';
import { LocaleDirection } from '@abp/ng.theme.shared';
import { Injectable, Injector } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
import { map } from 'rxjs/operators';

@Injectable()
export class MyDocumentDirHandlerService {
  private dir = new BehaviorSubject<LocaleDirection>('ltr');
  dir$ = this.dir.asObservable();
  constructor(protected injector: Injector) {
    this.listenToLanguageChanges();
  }

  private listenToLanguageChanges() {
    const sessionState = this.injector.get(SessionStateService);
    sessionState.getLanguage$().pipe(map(locale => getLocaleDirection(locale))).subscribe(dir => {
      this.dir.next(dir);
      this.setBodyDir(dir);
    });
  }

  private setBodyDir(dir: LocaleDirection) {
    document.body.dir = dir;
    document.dir = dir;
  }
}

For a temporary solution, you can follow these steps:

  • Create a service next to the app.module.ts. Let's call it my-document-dir.handler.ts
  • Copy and paste the code below.
  • Then, you need to replace the existing service with yours. To do that, import it in the providers array of app.module.ts
import { getLocaleDirection, LocalizationService } from '@abp/ng.core';
import { LocaleDirection } from '@abp/ng.theme.shared';
import { Injectable, Injector } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
import { map } from 'rxjs/operators';

@Injectable()
export class MyDocumentDirHandlerService {
  private dir = new BehaviorSubject<LocaleDirection>('ltr');
  dir$ = this.dir.asObservable();
  constructor(protected injector: Injector) {
    this.listenToLanguageChanges();
  }

  private listenToLanguageChanges() {
    const l10n = this.injector.get(LocalizationService);
    l10n.currentLang$.pipe(map(locale => getLocaleDirection(locale))).subscribe(dir => {
      this.dir.next(dir);
      this.setBodyDir(dir);
    });
  }

  private setBodyDir(dir: LocaleDirection) {
    document.body.dir = dir;
    document.dir = dir;
  }
}
// ...
import { DocumentDirHandlerService, ThemeSharedModule } from '@abp/ng.theme.shared';
import { MyDocumentDirHandlerService } from './my-document-dir.handler';

@NgModule({
  // ...
  imports: [
    ...
  ],
  providers: [
    // ...
    { provide: DocumentDirHandlerService, useClass: MyDocumentDirHandlerService },
  ],
  bootstrap: [AppComponent],
})
export class AppModule {}
Showing 1 to 10 of 149 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11