feat: add settings page
This commit is contained in:
3
src/app/pages/settings/settings.html
Normal file
3
src/app/pages/settings/settings.html
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<app-simple-layout title="settings.title">
|
||||||
|
<app-icon-nav-list [items]="menuItems"/>
|
||||||
|
</app-simple-layout>
|
||||||
25
src/app/pages/settings/settings.spec.ts
Normal file
25
src/app/pages/settings/settings.spec.ts
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { Settings } from './settings';
|
||||||
|
import { provideTranslateService } from '@ngx-translate/core';
|
||||||
|
import { ActivatedRoute } from '@angular/router';
|
||||||
|
|
||||||
|
describe('Settings', () => {
|
||||||
|
let component: Settings;
|
||||||
|
let fixture: ComponentFixture<Settings>;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await TestBed.configureTestingModule({
|
||||||
|
imports: [Settings],
|
||||||
|
providers: [provideTranslateService({}), { provide: ActivatedRoute, useValue: {} }],
|
||||||
|
}).compileComponents();
|
||||||
|
|
||||||
|
fixture = TestBed.createComponent(Settings);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
await fixture.whenStable();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
19
src/app/pages/settings/settings.ts
Normal file
19
src/app/pages/settings/settings.ts
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
import { Component } from '@angular/core';
|
||||||
|
import { SimpleLayout } from '../../components/simple-layout/simple-layout';
|
||||||
|
import { IconNavListItem } from '../../components/icon-nav-list/IconNavListItem';
|
||||||
|
import { IconNavList } from "../../components/icon-nav-list/icon-nav-list";
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-settings',
|
||||||
|
imports: [ SimpleLayout, IconNavList],
|
||||||
|
templateUrl: './settings.html',
|
||||||
|
styles: ``,
|
||||||
|
})
|
||||||
|
export class Settings {
|
||||||
|
readonly menuItems = [
|
||||||
|
new IconNavListItem('translate', 'settings.nav.language', ['languages']),
|
||||||
|
new IconNavListItem('warehouse', 'settings.nav.manage_chains', ['chains']),
|
||||||
|
new IconNavListItem('store', 'settings.nav.manage_establishments', ['/']),
|
||||||
|
new IconNavListItem('shopping_bag', 'settings.nav.manage_products', ['/']),
|
||||||
|
];
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user