refactor(project): Renamed all instances of dafa to msfa or mina-sidor-fa. (TV-379)

Squashed commit of the following:

commit d3f52ff6876f6e246c7d3c188e56cc2370289341
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date:   Tue Aug 17 14:10:38 2021 +0200

    Renamed all dafa instances to msfa
This commit is contained in:
Erik Tiekstra
2021-08-18 07:10:28 +02:00
parent 6d29baa533
commit 03a2c7a42f
349 changed files with 720 additions and 734 deletions

View File

@@ -1,5 +1,5 @@
{ {
"repositoryUrl": "ssh://git@bitbucket.arbetsformedlingen.se:7999/tea/dafa-web-monorepo.git", "repositoryUrl": "ssh://git@bitbucket.arbetsformedlingen.se:7999/tea/mina-sidor-fa-monorepo.git",
"plugins": [ "plugins": [
[ [
"@semantic-release/commit-analyzer", "@semantic-release/commit-analyzer",

View File

@@ -1,9 +1,8 @@
## [1.1.0](https://bitbucket.arbetsformedlingen.se/projects/tea/repos/dafa-web-monorepo/compare/diff?targetBranch=refs%2Ftags%2Fv1.0.0&sourceBranch=refs%2Ftags%2Fv1.1.0) (2021-05-18) ## [1.1.0](https://bitbucket.arbetsformedlingen.se/projects/tea/repos/mina-sidor-fa-web-monorepo/compare/diff?targetBranch=refs%2Ftags%2Fv1.0.0&sourceBranch=refs%2Ftags%2Fv1.1.0) (2021-05-18)
### Features ### Features
* **releases-page:** Added releases page with information located inside current changelog ([9dd04ca](https://bitbucket.arbetsformedlingen.se/projects/tea/repos/dafa-web-monorepo/commits/9dd04ca565f4cee42fed716b56d6699ce39b8f88)) - **releases-page:** Added releases page with information located inside current changelog ([9dd04ca](https://bitbucket.arbetsformedlingen.se/projects/tea/repos/mina-sidor-fa-web-monorepo/commits/9dd04ca565f4cee42fed716b56d6699ce39b8f88))
## 1.0.0 (2021-05-18) ## 1.0.0 (2021-05-18)

View File

@@ -22,7 +22,7 @@ Run `npm run new-app my-app` to generate an application. When using Nx, you can
### Generate a library ### Generate a library
Run `npm run new-lib my-lib` to generate a library. Libraries are shareable across libraries and applications. They can be imported from `@dafa-web-monorepo/mylib`. Run `npm run new-lib my-lib` to generate a library. Libraries are shareable across libraries and applications. They can be imported from `@mina-sidor-fa/mylib`.
### Code scaffolding ### Code scaffolding
@@ -69,7 +69,7 @@ Run `npm run nx dep-graph` to see a diagram of the dependencies of your projects
```md ```md
### Features ### Features
- **startpage:** Added headings and description to the startpage ([TV-1234](https://jira.arbetsformedlingen.se/browse/TV-1234)) ([commit-hash](https://bitbucket.arbetsformedlingen.se/projects/tea/repos/dafa-web-monorepo/commits/commit-hash)) - **startpage:** Added headings and description to the startpage ([TV-1234](https://jira.arbetsformedlingen.se/browse/TV-1234)) ([commit-hash](https://bitbucket.arbetsformedlingen.se/projects/tea/repos/mina-sidor-fa-web-monorepo/commits/commit-hash))
``` ```
- Upon merge, Open Shift will deploy the application to [AUTO](http://mina-sidor-fa-auto.tocp.arbetsformedlingen.se) and [TEST](http://mina-sidor-fa-test.tocp.arbetsformedlingen.se). - Upon merge, Open Shift will deploy the application to [AUTO](http://mina-sidor-fa-auto.tocp.arbetsformedlingen.se) and [TEST](http://mina-sidor-fa-test.tocp.arbetsformedlingen.se).

View File

@@ -3,7 +3,7 @@
"cli": { "cli": {
"defaultCollection": "@nrwl/angular" "defaultCollection": "@nrwl/angular"
}, },
"defaultProject": "dafa-web", "defaultProject": "mina-sidor-fa",
"schematics": { "schematics": {
"@nrwl/angular": { "@nrwl/angular": {
"application": { "application": {
@@ -33,25 +33,25 @@
} }
}, },
"projects": { "projects": {
"dafa-web": { "mina-sidor-fa": {
"projectType": "application", "projectType": "application",
"root": "apps/dafa-web", "root": "apps/mina-sidor-fa",
"sourceRoot": "apps/dafa-web/src", "sourceRoot": "apps/mina-sidor-fa/src",
"prefix": "dafa", "prefix": "msfa",
"architect": { "architect": {
"build": { "build": {
"builder": "@angular-devkit/build-angular:browser", "builder": "@angular-devkit/build-angular:browser",
"options": { "options": {
"outputPath": "dist/apps/dafa-web", "outputPath": "dist/apps/mina-sidor-fa",
"index": "apps/dafa-web/src/index.html", "index": "apps/mina-sidor-fa/src/index.html",
"main": "apps/dafa-web/src/main.ts", "main": "apps/mina-sidor-fa/src/main.ts",
"polyfills": "apps/dafa-web/src/polyfills.ts", "polyfills": "apps/mina-sidor-fa/src/polyfills.ts",
"tsConfig": "apps/dafa-web/tsconfig.app.json", "tsConfig": "apps/mina-sidor-fa/tsconfig.app.json",
"aot": true, "aot": true,
"assets": ["apps/dafa-web/src/assets"], "assets": ["apps/mina-sidor-fa/src/assets"],
"styles": ["apps/dafa-web/src/styles/styles.scss"], "styles": ["apps/mina-sidor-fa/src/styles/styles.scss"],
"stylePreprocessorOptions": { "stylePreprocessorOptions": {
"includePaths": ["apps/dafa-web/src/styles"] "includePaths": ["apps/mina-sidor-fa/src/styles"]
}, },
"scripts": ["node_modules/marked/lib/marked.js"] "scripts": ["node_modules/marked/lib/marked.js"]
}, },
@@ -59,8 +59,8 @@
"production": { "production": {
"fileReplacements": [ "fileReplacements": [
{ {
"replace": "apps/dafa-web/src/environments/environment.ts", "replace": "apps/mina-sidor-fa/src/environments/environment.ts",
"with": "apps/dafa-web/src/environments/environment.prod.ts" "with": "apps/mina-sidor-fa/src/environments/environment.prod.ts"
} }
], ],
"optimization": true, "optimization": true,
@@ -86,8 +86,8 @@
"api": { "api": {
"fileReplacements": [ "fileReplacements": [
{ {
"replace": "apps/dafa-web/src/environments/environment.ts", "replace": "apps/mina-sidor-fa/src/environments/environment.ts",
"with": "apps/dafa-web/src/environments/environment.api.ts" "with": "apps/mina-sidor-fa/src/environments/environment.api.ts"
} }
] ]
} }
@@ -96,15 +96,15 @@
"serve": { "serve": {
"builder": "@angular-devkit/build-angular:dev-server", "builder": "@angular-devkit/build-angular:dev-server",
"options": { "options": {
"browserTarget": "dafa-web:build", "browserTarget": "mina-sidor-fa:build",
"proxyConfig": "./config/proxy.conf.json" "proxyConfig": "./config/proxy.conf.json"
}, },
"configurations": { "configurations": {
"production": { "production": {
"browserTarget": "dafa-web:build:production" "browserTarget": "mina-sidor-fa:build:production"
}, },
"api": { "api": {
"browserTarget": "dafa-web:build:api", "browserTarget": "mina-sidor-fa:build:api",
"proxyConfig": "./config/proxy.conf.api.json" "proxyConfig": "./config/proxy.conf.api.json"
} }
} }
@@ -112,47 +112,47 @@
"extract-i18n": { "extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n", "builder": "@angular-devkit/build-angular:extract-i18n",
"options": { "options": {
"browserTarget": "dafa-web:build" "browserTarget": "mina-sidor-fa:build"
} }
}, },
"lint": { "lint": {
"builder": "@nrwl/linter:eslint", "builder": "@nrwl/linter:eslint",
"options": { "options": {
"lintFilePatterns": ["apps/dafa-web/src/**/*.ts", "apps/dafa-web/src/**/*.html"] "lintFilePatterns": ["apps/mina-sidor-fa/src/**/*.ts", "apps/mina-sidor-fa/src/**/*.html"]
} }
}, },
"test": { "test": {
"builder": "@nrwl/jest:jest", "builder": "@nrwl/jest:jest",
"outputs": ["coverage/apps/dafa-web"], "outputs": ["coverage/apps/mina-sidor-fa"],
"options": { "options": {
"jestConfig": "apps/dafa-web/jest.config.js", "jestConfig": "apps/mina-sidor-fa/jest.config.js",
"passWithNoTests": true "passWithNoTests": true
} }
} }
} }
}, },
"dafa-web-e2e": { "mina-sidor-fa-e2e": {
"root": "apps/dafa-web-e2e", "root": "apps/mina-sidor-fa-e2e",
"sourceRoot": "apps/dafa-web-e2e/src", "sourceRoot": "apps/mina-sidor-fa-e2e/src",
"projectType": "application", "projectType": "application",
"architect": { "architect": {
"e2e": { "e2e": {
"builder": "@nrwl/cypress:cypress", "builder": "@nrwl/cypress:cypress",
"options": { "options": {
"cypressConfig": "apps/dafa-web-e2e/cypress.json", "cypressConfig": "apps/mina-sidor-fa-e2e/cypress.json",
"tsConfig": "apps/dafa-web-e2e/tsconfig.e2e.json", "tsConfig": "apps/mina-sidor-fa-e2e/tsconfig.e2e.json",
"devServerTarget": "dafa-web:serve" "devServerTarget": "mina-sidor-fa:serve"
}, },
"configurations": { "configurations": {
"production": { "production": {
"devServerTarget": "dafa-web:serve:production" "devServerTarget": "mina-sidor-fa:serve:production"
} }
} }
}, },
"lint": { "lint": {
"builder": "@nrwl/linter:eslint", "builder": "@nrwl/linter:eslint",
"options": { "options": {
"lintFilePatterns": ["apps/dafa-web-e2e/**/*.{js,ts}"] "lintFilePatterns": ["apps/mina-sidor-fa-e2e/**/*.{js,ts}"]
} }
} }
} }

View File

@@ -1,3 +0,0 @@
<router-outlet></router-outlet>
<dafa-toast-list></dafa-toast-list>

View File

@@ -1,14 +0,0 @@
<div [ngClass]="className">
<div class="toast__icon-wrapper">
<dafa-icon [icon]="iconType.INFO" size="l" *ngIf="error.severity === errorSeverity.HIGH"></dafa-icon>
<dafa-icon [icon]="iconType.WARNING" size="l" *ngIf="error.severity === errorSeverity.MEDIUM"></dafa-icon>
<dafa-icon [icon]="iconType.APPROVED" size="l" *ngIf="error.severity === errorSeverity.LOW"></dafa-icon>
</div>
<div class="toast__content">
<button class="toast__close-button" aria-label="Stäng meddelandet" (click)="emitCloseEvent()">
<dafa-icon [icon]="iconType.X" size="l"></dafa-icon>
</button>
<h3 class="toast__heading">{{ error.name }}</h3>
<p class="toast__message">{{ error.message }}</p>
</div>
</div>

View File

@@ -1,54 +0,0 @@
<div style="display: flex">
<ng-container *ngIf="selectableTjanster$ | async; let selectableTjanster; else loadingRef">
<dafa-temporary-filter [filterLabel]="'Tjänster'"
[filterOptions]="selectableTjanster"
[selectedOptions]="selectedTjanster$ | async"
(selectedOptionsChange)="updateSelectedTjanster($event)"></dafa-temporary-filter>
</ng-container>
<ng-container *ngIf="selectableUtforandeVerksamheter$ | async; let selectableUtforandeVerksamheter; else loadingRef">
<dafa-temporary-filter [filterLabel]="'Utförande verksamheter'"
[filterOptions]="selectableUtforandeVerksamheter"
[selectedOptions]="selectedUtforandeVerksamheter$ | async"
(selectedOptionsChange)="updateSelectedUtforandeVerksamheter($event)"></dafa-temporary-filter>
</ng-container>
<ng-container *ngIf="selectableKommuner$ | async; let selectableKommuner; else loadingRef">
<dafa-temporary-filter [filterLabel]="'Kommuner'" [filterOptions]="selectableKommuner"
[selectedOptions]="selectedKommuner$ | async"
(selectedOptionsChange)="updateSelectedKommuner($event)"></dafa-temporary-filter>
</ng-container>
</div>
<br><br>
<div class="avrop-filters__tags">
<div class="avrop-filters__tag" *ngFor="let kommun of selectedKommuner$ | async">
<digi-tag
[afText]="kommun.label"
(click)="removeKommun(kommun)"
af-no-icon="false"
af-size="s"
></digi-tag>
</div>
<div class="avrop-filters__tag" *ngFor="let kommun of selectedUtforandeVerksamheter$ | async">
<digi-tag
[afText]="kommun.label"
(click)="removeUtforandeVerksamhet(kommun)"
af-no-icon="false"
af-size="s"
></digi-tag>
</div>
<div class="avrop-filters__tag" *ngFor="let kommun of selectedTjanster$ | async">
<digi-tag
[afText]="kommun.label"
(click)="removeTjanst(kommun)"
af-no-icon="false"
af-size="s"
></digi-tag>
</div>
</div>
<ng-template #loadingRef>
<div class="avrop-filters__loading-spinner">
<digi-icon-spinner af-title="Laddar innehåll"></digi-icon-spinner>
</div>
</ng-template>

View File

@@ -1,23 +0,0 @@
@import 'mixins/icon';
:host {
display: inline-flex;
}
.icon {
&--s {
@include dafa__digi-ng-icon(0.875em);
}
&--m {
@include dafa__digi-ng-icon(1em);
}
&--l {
@include dafa__digi-ng-icon(1.25em);
}
&--xl {
@include dafa__digi-ng-icon(1.5em);
}
&--xxl {
@include dafa__digi-ng-icon(2em);
}
}

View File

@@ -1,19 +0,0 @@
<div class="dafa" *ngIf="isLoggedIn$ | async">
<dafa-skip-to-content mainContentId="dafa-main-content"></dafa-skip-to-content>
<header class="dafa__header">
<dafa-navigation [user]="user$ | async"></dafa-navigation>
</header>
<dafa-sidebar class="dafa__sidebar"></dafa-sidebar>
<main id="dafa-main-content" class="dafa__content">
<digi-ng-navigation-breadcrumbs
class="dafa__breadcrumbs"
[afItems]="breadcrumbsItems"
></digi-ng-navigation-breadcrumbs>
<ng-content></ng-content>
</main>
<dafa-footer class="dafa__footer"></dafa-footer>
</div>

View File

@@ -1,12 +0,0 @@
## [1.1.0](https://bitbucket.arbetsformedlingen.se/projects/tea/repos/dafa-web-monorepo/compare/diff?targetBranch=refs%2Ftags%2Fv1.0.0&sourceBranch=refs%2Ftags%2Fv1.1.0) (2021-05-18)
### Features
* **releases-page:** Added releases page with information located inside current changelog ([9dd04ca](https://bitbucket.arbetsformedlingen.se/projects/tea/repos/dafa-web-monorepo/commits/9dd04ca565f4cee42fed716b56d6699ce39b8f88))
## 1.0.0 (2021-05-18)
### ⚠ BREAKING CHANGES
- Application created

View File

@@ -1,31 +0,0 @@
@import './variables/colors';
//Button properties
$dafa-button--padding: var(--digi-button--padding);
$dafa-button--margin: 0.5rem;
$dafa-button--border-radius: var(--digi-button--border-radius);
$dafa-button--transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
$dafa-button--border: var(--digi-button--border);
$dafa-button--text-decoration: none;
$dafa-button--font-weight: var(--digi-button--font-weight);
$dafa-button--font-font-size: var(--digi-button--font-size);
//A basic link button
@mixin dafa_buttontemplate($backgroundcolor, $textcolor, $hovercolor) {
background: $backgroundcolor;
padding: $dafa-button--padding;
margin: $dafa-button--margin;
border-radius: $dafa-button--border-radius;
transition: $dafa-button--transition;
border: $dafa-button--border;
text-decoration: none;
font-weight: $dafa-button--font-weight;
font-size: $dafa-button--font-font-size;
color: $textcolor;
&:hover {
background: $hovercolor;
}
}

View File

@@ -1,15 +0,0 @@
@import '~@digi/styles/src/ui/variables/ui__variables';
@import '~@digi/core/dist/collection/components/_button/button/button.css';
// AF DIGI Variables
$digi--ui--color--primary-light: lighten($digi--ui--color--primary, 10%);
$digi--ui--color--primary: $digi--ui--color--stratos;
// Local variables
$dafa-button--background--primary: var(--digi-button--background);
$dafa-button--text--primary: var(--digi--typography--color--text--light);
$dafa-button--hover--primary: var(--digi-button--background--hover);
$dafa-button--background--secondary: var(--digi-button--background--secondary);
$dafa-button--text--secondary: var(--digi--ui--color--primary);
$dafa-button--hover--secondary: var(--digi-button--background--secondary--hover);

View File

@@ -1,2 +0,0 @@
$dafa__navigation-height: 2.5rem;
$dafa__navigation-height-large: 4rem;

View File

@@ -1 +0,0 @@
$dafa__shadow: 0 0.2rem 0.6rem 0 var(--digi--ui--color--shadow);

View File

@@ -5,7 +5,7 @@
{ {
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"parserOptions": { "parserOptions": {
"project": "apps/dafa-web-e2e/tsconfig.*?.json" "project": "apps/mina-sidor-fa-e2e/tsconfig.*?.json"
}, },
"rules": {} "rules": {}
}, },

View File

@@ -6,7 +6,7 @@
"pluginsFile": "./src/plugins/index", "pluginsFile": "./src/plugins/index",
"supportFile": "./src/support/index.ts", "supportFile": "./src/support/index.ts",
"video": true, "video": true,
"videosFolder": "../../dist/cypress/apps/dafa-web-e2e/videos", "videosFolder": "../../dist/cypress/apps/mina-sidor-fa-e2e/videos",
"screenshotsFolder": "../../dist/cypress/apps/dafa-web-e2e/screenshots", "screenshotsFolder": "../../dist/cypress/apps/mina-sidor-fa-e2e/screenshots",
"chromeWebSecurity": false "chromeWebSecurity": false
} }

View File

@@ -1,6 +1,6 @@
import { getGreeting } from '../support/app.po'; import { getGreeting } from '../support/app.po';
describe('dafa-web', () => { describe('mina-sidor-fa', () => {
beforeEach(() => cy.visit('/')); beforeEach(() => cy.visit('/'));
it('should display welcome message', () => { it('should display welcome message', () => {
@@ -8,6 +8,6 @@ describe('dafa-web', () => {
cy.login('my-email@something.com', 'myPassword'); cy.login('my-email@something.com', 'myPassword');
// Function helper example, see `../support/app.po.ts` file // Function helper example, see `../support/app.po.ts` file
getGreeting().contains('Welcome to dafa-web!'); getGreeting().contains('Welcome to Mina sidor för fristående aktörer!');
}); });
}); });

View File

@@ -12,13 +12,13 @@
"plugin:@typescript-eslint/recommended-requiring-type-checking", "plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:@angular-eslint/template/process-inline-templates" "plugin:@angular-eslint/template/process-inline-templates"
], ],
"parserOptions": { "project": ["apps/dafa-web/tsconfig.*?.json"] }, "parserOptions": { "project": ["apps/mina-sidor-fa/tsconfig.*?.json"] },
"rules": { "rules": {
"@angular-eslint/directive-selector": [ "@angular-eslint/directive-selector": [
"error", "error",
{ {
"type": "attribute", "type": "attribute",
"prefix": "dafa", "prefix": "msfa",
"style": "camelCase" "style": "camelCase"
} }
], ],
@@ -26,7 +26,7 @@
"error", "error",
{ {
"type": "element", "type": "element",
"prefix": "dafa", "prefix": "msfa",
"style": "kebab-case" "style": "kebab-case"
} }
] ]

View File

@@ -1,5 +1,5 @@
module.exports = { module.exports = {
displayName: 'dafa-web', displayName: 'mina-sidor-fa',
preset: '../../jest.preset.js', preset: '../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: { globals: {
@@ -14,7 +14,7 @@ module.exports = {
}, },
}, },
}, },
coverageDirectory: '../../coverage/apps/dafa-web', coverageDirectory: '../../coverage/apps/mina-sidor-fa',
snapshotSerializers: [ snapshotSerializers: [
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js', 'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
'jest-preset-angular/build/AngularSnapshotSerializer.js', 'jest-preset-angular/build/AngularSnapshotSerializer.js',

View File

@@ -1,7 +1,7 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { ExtraOptions, RouterModule, Routes } from '@angular/router'; import { ExtraOptions, RouterModule, Routes } from '@angular/router';
import { environment } from '@dafa-environment'; import { environment } from '@msfa-environment';
import { AuthGuard } from '@dafa-guards/auth.guard'; import { AuthGuard } from '@msfa-guards/auth.guard';
const routes: Routes = [ const routes: Routes = [
{ {

View File

@@ -0,0 +1,3 @@
<router-outlet></router-outlet>
<msfa-toast-list></msfa-toast-list>

View File

@@ -1,7 +1,7 @@
import { ChangeDetectionStrategy, Component } from '@angular/core'; import { ChangeDetectionStrategy, Component } from '@angular/core';
@Component({ @Component({
selector: 'dafa-root', selector: 'msfa-root',
templateUrl: './app.component.html', templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'], styleUrls: ['./app.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,

View File

@@ -1,9 +1,9 @@
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http'; import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { ErrorHandler, NgModule } from '@angular/core'; import { ErrorHandler, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser'; import { BrowserModule } from '@angular/platform-browser';
import { AuthGuard } from '@dafa-guards/auth.guard'; import { AuthGuard } from '@msfa-guards/auth.guard';
import { CustomErrorHandler } from '@dafa-interceptors/custom-error-handler.module'; import { CustomErrorHandler } from '@msfa-interceptors/custom-error-handler.module';
import { AuthInterceptor } from '@dafa-services/api/auth.interceptor'; import { AuthInterceptor } from '@msfa-services/api/auth.interceptor';
import { AppRoutingModule } from './app-routing.module'; import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
import { ToastListModule } from './components/toast-list/toast-list.module'; import { ToastListModule } from './components/toast-list/toast-list.module';

View File

@@ -1,10 +1,10 @@
<section [ngClass]="className" *ngIf="errors$ | async as errors"> <section [ngClass]="className" *ngIf="errors$ | async as errors">
<ul class="toast-list__list" *ngIf="errors.length"> <ul class="toast-list__list" *ngIf="errors.length">
<li class="toast-list__item" *ngFor="let error of errors"> <li class="toast-list__item" *ngFor="let error of errors">
<dafa-toast [error]="error" (closeToast)="removeError($event)"></dafa-toast> <msfa-toast [error]="error" (closeToast)="removeError($event)"></msfa-toast>
</li> </li>
</ul> </ul>
<div class="dafa__a11y-sr-only" [attr.aria-live]="ariaLivePoliteness" [attr.aria-atomic]="ariaAtomic"> <div class="msfa__a11y-sr-only" [attr.aria-live]="ariaLivePoliteness" [attr.aria-atomic]="ariaAtomic">
<ng-container *ngIf="errors.length"> <ng-container *ngIf="errors.length">
<h3>{{ errors.length }} fel har uppstått!</h3> <h3>{{ errors.length }} fel har uppstått!</h3>
<ul> <ul>

View File

@@ -46,7 +46,7 @@
} }
&__list { &__list {
@include dafa__reset-list; @include msfa__reset-list;
} }
&__item:not(:first-child) { &__item:not(:first-child) {

View File

@@ -1,12 +1,12 @@
import { AriaLivePoliteness } from '@angular/cdk/a11y'; import { AriaLivePoliteness } from '@angular/cdk/a11y';
import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { ToastPosition } from '@dafa-enums/toast-position.enum'; import { ToastPosition } from '@msfa-enums/toast-position.enum';
import { CustomError } from '@dafa-models/error/custom-error'; import { CustomError } from '@msfa-models/error/custom-error';
import { ErrorService } from '@dafa-services/error.service'; import { ErrorService } from '@msfa-services/error.service';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
@Component({ @Component({
selector: 'dafa-toast-list', selector: 'msfa-toast-list',
templateUrl: './toast-list.component.html', templateUrl: './toast-list.component.html',
styleUrls: ['./toast-list.component.scss'], styleUrls: ['./toast-list.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,

View File

@@ -0,0 +1,14 @@
<div [ngClass]="className">
<div class="toast__icon-wrapper">
<msfa-icon [icon]="iconType.INFO" size="l" *ngIf="error.severity === errorSeverity.HIGH"></msfa-icon>
<msfa-icon [icon]="iconType.WARNING" size="l" *ngIf="error.severity === errorSeverity.MEDIUM"></msfa-icon>
<msfa-icon [icon]="iconType.APPROVED" size="l" *ngIf="error.severity === errorSeverity.LOW"></msfa-icon>
</div>
<div class="toast__content">
<button class="toast__close-button" aria-label="Stäng meddelandet" (click)="emitCloseEvent()">
<msfa-icon [icon]="iconType.X" size="l"></msfa-icon>
</button>
<h3 class="toast__heading">{{ error.name }}</h3>
<p class="toast__message">{{ error.message }}</p>
</div>
</div>

View File

@@ -6,7 +6,7 @@
align-items: stretch; align-items: stretch;
background-color: var(--digi--ui--color--informative); background-color: var(--digi--ui--color--informative);
border: 2px solid var(--digi--ui--color--informative); border: 2px solid var(--digi--ui--color--informative);
box-shadow: $dafa__shadow; box-shadow: $msfa__shadow;
pointer-events: auto; pointer-events: auto;
color: var(--digi--typography--color--text); color: var(--digi--typography--color--text);
font-size: 1rem; font-size: 1rem;

View File

@@ -1,7 +1,7 @@
/* tslint:disable:no-unused-variable */ /* tslint:disable:no-unused-variable */
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { CustomError } from '@dafa-models/error/custom-error'; import { CustomError } from '@msfa-models/error/custom-error';
import { ToastComponent } from './toast.component'; import { ToastComponent } from './toast.component';
describe('ToastComponent', () => { describe('ToastComponent', () => {

View File

@@ -1,10 +1,10 @@
import { AfterViewInit, ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core'; import { AfterViewInit, ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
import { ErrorSeverity } from '@dafa-enums/error-severity.enum'; import { ErrorSeverity } from '@msfa-enums/error-severity.enum';
import { IconType } from '@dafa-enums/icon-type.enum'; import { IconType } from '@msfa-enums/icon-type.enum';
import { CustomError } from '@dafa-models/error/custom-error'; import { CustomError } from '@msfa-models/error/custom-error';
@Component({ @Component({
selector: 'dafa-toast', selector: 'msfa-toast',
templateUrl: './toast.component.html', templateUrl: './toast.component.html',
styleUrls: ['./toast.component.scss'], styleUrls: ['./toast.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,

View File

@@ -4,7 +4,7 @@ import { DigiNgIconInfoCircleRegModule } from '@af/digi-ng/_icon/icon-info-circl
import { DigiNgIconXModule } from '@af/digi-ng/_icon/icon-x'; import { DigiNgIconXModule } from '@af/digi-ng/_icon/icon-x';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { IconModule } from '@dafa-shared/components/icon/icon.module'; import { IconModule } from '@msfa-shared/components/icon/icon.module';
import { ToastComponent } from './toast.component'; import { ToastComponent } from './toast.component';
@NgModule({ @NgModule({

View File

@@ -1,7 +1,7 @@
import { ChangeDetectionStrategy, Component } from '@angular/core'; import { ChangeDetectionStrategy, Component } from '@angular/core';
@Component({ @Component({
selector: 'dafa-administration', selector: 'msfa-administration',
templateUrl: './administration.component.html', templateUrl: './administration.component.html',
styleUrls: ['./administration.component.scss'], styleUrls: ['./administration.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,

View File

@@ -1,4 +1,4 @@
<dafa-layout> <msfa-layout>
<section class="employee-card"> <section class="employee-card">
<digi-typography *ngIf="detailedEmployeeData$ | async as detailedEmployeeData; else loadingRef"> <digi-typography *ngIf="detailedEmployeeData$ | async as detailedEmployeeData; else loadingRef">
<div class="employee-card__editcontainer"> <div class="employee-card__editcontainer">
@@ -23,11 +23,11 @@
<dd *ngIf="detailedEmployeeData.fullName; else emptyDD">{{ detailedEmployeeData.fullName }}</dd> <dd *ngIf="detailedEmployeeData.fullName; else emptyDD">{{ detailedEmployeeData.fullName }}</dd>
<dt>Personnummer</dt> <dt>Personnummer</dt>
<dd *ngIf="detailedEmployeeData.ssn; else emptyDD"> <dd *ngIf="detailedEmployeeData.ssn; else emptyDD">
<dafa-hide-text <msfa-hide-text
symbols="********-****" symbols="********-****"
[changingText]="detailedEmployeeData.ssn" [changingText]="detailedEmployeeData.ssn"
ariaLabelType="personnummer" ariaLabelType="personnummer"
></dafa-hide-text> ></msfa-hide-text>
</dd> </dd>
</dl> </dl>
</div> </div>
@@ -50,8 +50,8 @@
{{ organization.name }} {{ organization.name }}
<ul> <ul>
<li class="employee-card__listitem--indent"> <li class="employee-card__listitem--indent">
{{ organization.address.street }} {{ organization.address.postalCode }} {{ organization.address.street }} {{ organization.address.postalCode }} {{
{{ organization.address.houseNumber }} {{ organization.address.city }} organization.address.houseNumber }} {{ organization.address.city }}
</li> </li>
</ul> </ul>
</li> </li>
@@ -87,7 +87,7 @@
<ng-template #emptyDD class="employee-card__list"> <ng-template #emptyDD class="employee-card__list">
<dd> <dd>
<span aria-hidden="true">-</span> <span aria-hidden="true">-</span>
<span class="dafa__a11y-sr-only">Info saknas</span> <span class="msfa__a11y-sr-only">Info saknas</span>
</dd> </dd>
</ng-template> </ng-template>
</dafa-layout> </msfa-layout>

View File

@@ -38,11 +38,11 @@
//LISTS //LISTS
&__list { &__list {
@include dafa__reset-list; @include msfa__reset-list;
} }
&__listitem--indent { &__listitem--indent {
@include dafa__reset-list; @include msfa__reset-list;
margin-left: 1rem; margin-left: 1rem;
} }
@@ -61,30 +61,30 @@
&__primarybutton { &__primarybutton {
a { a {
@include dafa_buttontemplate( @include msfa_buttontemplate(
$dafa-button--background--primary, $msfa-button--background--primary,
$dafa-button--text--primary, $msfa-button--text--primary,
$dafa-button--hover--primary $msfa-button--hover--primary
); );
} }
} }
&__secondarybutton { &__secondarybutton {
a { a {
@include dafa_buttontemplate( @include msfa_buttontemplate(
$dafa-button--background--secondary, $msfa-button--background--secondary,
$dafa-button--text--secondary, $msfa-button--text--secondary,
$dafa-button--hover--secondary $msfa-button--hover--secondary
); );
} }
} }
&__editbutton { &__editbutton {
a { a {
@include dafa_buttontemplate( @include msfa_buttontemplate(
$dafa-button--background--secondary, $msfa-button--background--secondary,
$dafa-button--text--secondary, $msfa-button--text--secondary,
$dafa-button--hover--secondary $msfa-button--hover--secondary
); );
width: var(--digi-button--width); width: var(--digi-button--width);
} }

View File

@@ -1,13 +1,13 @@
import { ChangeDetectionStrategy, Component } from '@angular/core'; import { ChangeDetectionStrategy, Component } from '@angular/core';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
import { Employee } from '@dafa-models/employee.model'; import { Employee } from '@msfa-models/employee.model';
import { Participant } from '@dafa-models/participant.model'; import { Participant } from '@msfa-models/participant.model';
import { EmployeeService } from '@dafa-services/api/employee.service'; import { EmployeeService } from '@msfa-services/api/employee.service';
import { BehaviorSubject, Observable } from 'rxjs'; import { BehaviorSubject, Observable } from 'rxjs';
import { map, switchMap } from 'rxjs/operators'; import { map, switchMap } from 'rxjs/operators';
@Component({ @Component({
selector: 'dafa-employee-card', selector: 'msfa-employee-card',
templateUrl: './employee-card.component.html', templateUrl: './employee-card.component.html',
styleUrls: ['./employee-card.component.scss'], styleUrls: ['./employee-card.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,
@@ -28,7 +28,6 @@ export class EmployeeCardComponent {
return this._pendingSelectedParticipants$.getValue(); return this._pendingSelectedParticipants$.getValue();
} }
handleChangeEmployee(): void { handleChangeEmployee(): void {
console.log('change employee: ', this.pendingSelectedParticipants); console.log('change employee: ', this.pendingSelectedParticipants);
} }

View File

@@ -3,9 +3,9 @@ import { DigiNgSkeletonBaseModule } from '@af/digi-ng/_skeleton/skeleton-base';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { HideTextModule } from '@dafa-shared/components/hide-text/hide-text.module'; import { HideTextModule } from '@msfa-shared/components/hide-text/hide-text.module';
import { LayoutModule } from '@dafa-shared/components/layout/layout.module'; import { LayoutModule } from '@msfa-shared/components/layout/layout.module';
import { LocalDatePipeModule } from '@dafa-shared/pipes/local-date/local-date.module'; import { LocalDatePipeModule } from '@msfa-shared/pipes/local-date/local-date.module';
import { EmployeeCardComponent } from './employee-card.component'; import { EmployeeCardComponent } from './employee-card.component';
@NgModule({ @NgModule({

View File

@@ -1,4 +1,4 @@
<dafa-layout> <msfa-layout>
<section class="employee-form"> <section class="employee-form">
<digi-typography> <digi-typography>
<h1>Skapa nytt konto</h1> <h1>Skapa nytt konto</h1>
@@ -14,9 +14,9 @@
*ngIf="formGroup.invalid && submitted && formErrors.length" *ngIf="formGroup.invalid && submitted && formErrors.length"
af-heading="Felmeddelanden" af-heading="Felmeddelanden"
> >
<a *ngFor="let error of formErrors" [routerLink]="" [fragment]="'employee-form-' + error.id">{{ <a *ngFor="let error of formErrors" [routerLink]="" [fragment]="'employee-form-' + error.id"
error.message >{{ error.message }}</a
}}</a> >
</digi-form-error-list> </digi-form-error-list>
<div class="employee-form__block"> <div class="employee-form__block">
@@ -161,4 +161,4 @@
</digi-ng-dialog> </digi-ng-dialog>
</form> </form>
</section> </section>
</dafa-layout> </msfa-layout>

View File

@@ -34,17 +34,16 @@
&__services, &__services,
&__authorizations { &__authorizations {
@include dafa__reset-list; @include msfa__reset-list;
margin-bottom: var(--digi--layout--gutter); margin-bottom: var(--digi--layout--gutter);
} }
&__authorization-item { &__authorization-item {
display: grid; display: grid;
grid-template-columns: 1fr; grid-template-columns: 1fr;
grid-template-areas:"auth-checkbox read-more"; grid-template-areas: 'auth-checkbox read-more';
} }
&__service-item { &__service-item {
display: flex; display: flex;
align-items: center; align-items: center;

View File

@@ -2,18 +2,18 @@ import { FormSelectBaseItem } from '@af/digi-ng/_form/form-select-base';
import { ChangeDetectionStrategy, Component } from '@angular/core'; import { ChangeDetectionStrategy, Component } from '@angular/core';
import { AbstractControl, FormBuilder, FormGroup } from '@angular/forms'; import { AbstractControl, FormBuilder, FormGroup } from '@angular/forms';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { Authorization } from '@dafa-models/authorization.model'; import { Authorization } from '@msfa-models/authorization.model';
import { Service } from '@dafa-models/service.model'; import { Service } from '@msfa-models/service.model';
import { AuthorizationService } from '@dafa-services/api/authorizations.service'; import { AuthorizationService } from '@msfa-services/api/authorizations.service';
import { EmployeeService } from '@dafa-services/api/employee.service'; import { EmployeeService } from '@msfa-services/api/employee.service';
import { ServiceService } from '@dafa-services/api/service.service'; import { ServiceService } from '@msfa-services/api/service.service';
import { SocialSecurityNumberValidator } from '@dafa-utils/validators/social-security-number.validator'; import { SocialSecurityNumberValidator } from '@msfa-utils/validators/social-security-number.validator';
import { RequiredValidator } from '@dafa-validators/required.validator'; import { RequiredValidator } from '@msfa-validators/required.validator';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
@Component({ @Component({
selector: 'dafa-employee-form', selector: 'msfa-employee-form',
templateUrl: './employee-form.component.html', templateUrl: './employee-form.component.html',
styleUrls: ['./employee-form.component.scss'], styleUrls: ['./employee-form.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,

View File

@@ -9,8 +9,8 @@ import { CommonModule } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms'; import { ReactiveFormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { LayoutModule } from '@dafa-shared/components/layout/layout.module'; import { LayoutModule } from '@msfa-shared/components/layout/layout.module';
import { LocalDatePipeModule } from '@dafa-shared/pipes/local-date/local-date.module'; import { LocalDatePipeModule } from '@msfa-shared/pipes/local-date/local-date.module';
import { EmployeeFormComponent } from './employee-form.component'; import { EmployeeFormComponent } from './employee-form.component';
@NgModule({ @NgModule({

View File

@@ -1,4 +1,4 @@
<dafa-layout> <msfa-layout>
<section class="employee-invite"> <section class="employee-invite">
<digi-typography> <digi-typography>
<h1>Skapa nytt personalkonto</h1> <h1>Skapa nytt personalkonto</h1>
@@ -53,8 +53,8 @@
</digi-notification-alert> </digi-notification-alert>
<footer class="employee-invite__footer"> <footer class="employee-invite__footer">
<dafa-back-link [route]="['/administration/personal']">Tillbaka till personallistan</dafa-back-link> <msfa-back-link [route]="['/administration/personal']">Tillbaka till personallistan</msfa-back-link>
</footer> </footer>
</form> </form>
</section> </section>
</dafa-layout> </msfa-layout>

View File

@@ -1,15 +1,14 @@
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms'; import { FormControl, FormGroup, Validators } from '@angular/forms';
import { EmployeeService } from '@dafa-services/api/employee.service'; import { EmployeeService } from '@msfa-services/api/employee.service';
import { RequiredValidator } from '@dafa-utils/validators/required.validator'; import { RequiredValidator } from '@msfa-utils/validators/required.validator';
import { BehaviorSubject, Observable } from 'rxjs'; import { BehaviorSubject, Observable } from 'rxjs';
@Component({ @Component({
selector: 'dafa-employee-invite', selector: 'msfa-employee-invite',
templateUrl: './employee-invite.component.html', templateUrl: './employee-invite.component.html',
styleUrls: ['./employee-invite.component.scss'], styleUrls: ['./employee-invite.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush changeDetection: ChangeDetectionStrategy.OnPush,
}) })
export class EmployeeInviteComponent implements OnInit { export class EmployeeInviteComponent implements OnInit {
form: FormGroup; form: FormGroup;
@@ -22,8 +21,8 @@ export class EmployeeInviteComponent implements OnInit {
this.form = new FormGroup({ this.form = new FormGroup({
email: new FormControl('', [ email: new FormControl('', [
RequiredValidator('E-postadress'), RequiredValidator('E-postadress'),
Validators.pattern('^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,4}$') Validators.pattern('^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,4}$'),
]) ]),
}); });
} }
@@ -45,7 +44,7 @@ export class EmployeeInviteComponent implements OnInit {
}, },
complete: () => { complete: () => {
post.unsubscribe(); post.unsubscribe();
} },
}); });
} }
@@ -53,4 +52,3 @@ export class EmployeeInviteComponent implements OnInit {
this.latestSubmittedInvite_.next(''); this.latestSubmittedInvite_.next('');
} }
} }

View File

@@ -3,8 +3,8 @@ import { CommonModule } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms'; import { ReactiveFormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { BackLinkModule } from '@dafa-shared/components/back-link/back-link.module'; import { BackLinkModule } from '@msfa-shared/components/back-link/back-link.module';
import { LayoutModule } from '@dafa-shared/components/layout/layout.module'; import { LayoutModule } from '@msfa-shared/components/layout/layout.module';
import { EmployeeInviteComponent } from './employee-invite.component'; import { EmployeeInviteComponent } from './employee-invite.component';
@NgModule({ @NgModule({
@@ -16,7 +16,7 @@ import { EmployeeInviteComponent } from './employee-invite.component';
LayoutModule, LayoutModule,
BackLinkModule, BackLinkModule,
ReactiveFormsModule, ReactiveFormsModule,
DigiNgFormInputModule DigiNgFormInputModule,
] ],
}) })
export class EmployeeInviteModule {} export class EmployeeInviteModule {}

View File

@@ -1,11 +1,11 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { RouterTestingModule } from '@angular/router/testing'; import { RouterTestingModule } from '@angular/router/testing';
import { SortOrder } from '@msfa-enums/sort-order.enum';
import { Employee } from '@msfa-models/employee.model';
import { EmployeesListComponent } from './employees-list.component'; import { EmployeesListComponent } from './employees-list.component';
import { employeesMock } from './employees-list.mock'; import { employeesMock } from './employees-list.mock';
import { By } from '@angular/platform-browser';
import { Employee } from '@dafa-models/employee.model';
import { SortOrder } from '@dafa-enums/sort-order.enum';
describe('EmployeesListComponent', () => { describe('EmployeesListComponent', () => {
let component: EmployeesListComponent; let component: EmployeesListComponent;

View File

@@ -1,11 +1,11 @@
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core'; import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
import { SortOrder } from '@dafa-enums/sort-order.enum'; import { SortOrder } from '@msfa-enums/sort-order.enum';
import { Employee } from '@dafa-models/employee.model'; import { Employee } from '@msfa-models/employee.model';
import { PaginationMeta } from '@dafa-models/pagination-meta.model'; import { PaginationMeta } from '@msfa-models/pagination-meta.model';
import { Sort } from '@dafa-models/sort.model'; import { Sort } from '@msfa-models/sort.model';
@Component({ @Component({
selector: 'dafa-employees-list', selector: 'msfa-employees-list',
templateUrl: './employees-list.component.html', templateUrl: './employees-list.component.html',
styleUrls: ['./employees-list.component.scss'], styleUrls: ['./employees-list.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,

View File

@@ -1,8 +1,7 @@
import { Employee } from '@dafa-models/employee.model'; import { Service } from '@msfa-enums/service.enum';
import { Service } from '@dafa-enums/service.enum'; import { Employee } from '@msfa-models/employee.model';
export const employeesMock: Employee[] = [ export const employeesMock: Employee[] = [
{ {
id: 'b136f30a-3997-4fdd-8c02-2415ee9c6d83', id: 'b136f30a-3997-4fdd-8c02-2415ee9c6d83',
firstName: 'Jayson', firstName: 'Jayson',
@@ -18,18 +17,18 @@ export const employeesMock: Employee[] = [
houseNumber: 85, houseNumber: 85,
postalCode: '13202', postalCode: '13202',
city: 'Columbia', city: 'Columbia',
kommun: 'Halmstads kommun' kommun: 'Halmstads kommun',
} },
} },
], ],
services: [ services: [
{ {
id: 'a33515e7-045a-4da5-8646-9eed160b18d1', id: 'a33515e7-045a-4da5-8646-9eed160b18d1',
name: 'KROM' as Service name: 'KROM' as Service,
} },
], ],
authorizations: [], authorizations: [],
createdAt: 1623655628956 createdAt: 1623655628956,
}, },
{ {
id: 'c3359c5d-e0ff-4792-a3f3-7142fef932e5', id: 'c3359c5d-e0ff-4792-a3f3-7142fef932e5',
@@ -46,18 +45,18 @@ export const employeesMock: Employee[] = [
houseNumber: 33, houseNumber: 33,
postalCode: '98821', postalCode: '98821',
city: 'Hacienda Heights', city: 'Hacienda Heights',
kommun: 'Motala kommun' kommun: 'Motala kommun',
} },
} },
], ],
services: [ services: [
{ {
id: 'a33515e7-045a-4da5-8646-9eed160b18d1', id: 'a33515e7-045a-4da5-8646-9eed160b18d1',
name: 'KROM' as Service name: 'KROM' as Service,
} },
], ],
authorizations: [], authorizations: [],
createdAt: 1623655628956 createdAt: 1623655628956,
}, },
{ {
id: '28cc9679-bf5e-4066-900f-0866710ebdbc', id: '28cc9679-bf5e-4066-900f-0866710ebdbc',
@@ -74,18 +73,18 @@ export const employeesMock: Employee[] = [
houseNumber: 82, houseNumber: 82,
postalCode: '61048', postalCode: '61048',
city: 'Helsing Consuelo', city: 'Helsing Consuelo',
kommun: 'Finspångs kommun' kommun: 'Finspångs kommun',
} },
} },
], ],
services: [ services: [
{ {
id: 'a33515e7-045a-4da5-8646-9eed160b18d1', id: 'a33515e7-045a-4da5-8646-9eed160b18d1',
name: 'KROM' as Service name: 'KROM' as Service,
} },
], ],
authorizations: [], authorizations: [],
createdAt: 1623655628956 createdAt: 1623655628956,
}, },
{ {
id: '6fae0a53-fd04-4ca0-b099-933161c920b8', id: '6fae0a53-fd04-4ca0-b099-933161c920b8',
@@ -102,18 +101,18 @@ export const employeesMock: Employee[] = [
houseNumber: 26, houseNumber: 26,
postalCode: '26994', postalCode: '26994',
city: 'En Akeem', city: 'En Akeem',
kommun: 'Smedjebackens kommun' kommun: 'Smedjebackens kommun',
} },
} },
], ],
services: [ services: [
{ {
id: '20e09e98-c744-45b3-95ef-54ef51af32c0', id: '20e09e98-c744-45b3-95ef-54ef51af32c0',
name: 'KVL' as Service name: 'KVL' as Service,
} },
], ],
authorizations: [], authorizations: [],
createdAt: 1623655628957 createdAt: 1623655628957,
}, },
{ {
id: '6fd136ad-f51a-4a30-b6e9-dd1116cf90d6', id: '6fd136ad-f51a-4a30-b6e9-dd1116cf90d6',
@@ -130,18 +129,18 @@ export const employeesMock: Employee[] = [
houseNumber: 42, houseNumber: 42,
postalCode: '76986', postalCode: '76986',
city: 'Myrtisby', city: 'Myrtisby',
kommun: 'Olofströms kommun' kommun: 'Olofströms kommun',
} },
} },
], ],
services: [ services: [
{ {
id: 'a33515e7-045a-4da5-8646-9eed160b18d1', id: 'a33515e7-045a-4da5-8646-9eed160b18d1',
name: 'KROM' as Service name: 'KROM' as Service,
} },
], ],
authorizations: [], authorizations: [],
createdAt: 1623655628957 createdAt: 1623655628957,
}, },
{ {
id: '0f8445b0-9eb6-432d-9967-0541ea74d9c6', id: '0f8445b0-9eb6-432d-9967-0541ea74d9c6',
@@ -158,18 +157,18 @@ export const employeesMock: Employee[] = [
houseNumber: 92, houseNumber: 92,
postalCode: '65702', postalCode: '65702',
city: 'Lessieland', city: 'Lessieland',
kommun: 'Motala kommun' kommun: 'Motala kommun',
} },
} },
], ],
services: [ services: [
{ {
id: '20e09e98-c744-45b3-95ef-54ef51af32c0', id: '20e09e98-c744-45b3-95ef-54ef51af32c0',
name: 'KVL' as Service name: 'KVL' as Service,
} },
], ],
authorizations: [], authorizations: [],
createdAt: 1623655628957 createdAt: 1623655628957,
}, },
{ {
id: '29cfccc4-bf1d-4eaa-88d9-b86e22203bc7', id: '29cfccc4-bf1d-4eaa-88d9-b86e22203bc7',
@@ -186,18 +185,18 @@ export const employeesMock: Employee[] = [
houseNumber: 82, houseNumber: 82,
postalCode: '61048', postalCode: '61048',
city: 'Helsing Consuelo', city: 'Helsing Consuelo',
kommun: 'Finspångs kommun' kommun: 'Finspångs kommun',
} },
} },
], ],
services: [ services: [
{ {
id: '20e09e98-c744-45b3-95ef-54ef51af32c0', id: '20e09e98-c744-45b3-95ef-54ef51af32c0',
name: 'KVL' as Service name: 'KVL' as Service,
} },
], ],
authorizations: [], authorizations: [],
createdAt: 1623655628957 createdAt: 1623655628957,
}, },
{ {
id: '412a7141-82fa-4b98-812f-e092910663af', id: '412a7141-82fa-4b98-812f-e092910663af',
@@ -214,18 +213,18 @@ export const employeesMock: Employee[] = [
houseNumber: 77, houseNumber: 77,
postalCode: '52349', postalCode: '52349',
city: 'Katelynnmora', city: 'Katelynnmora',
kommun: 'Hofors kommun' kommun: 'Hofors kommun',
} },
} },
], ],
services: [ services: [
{ {
id: 'a33515e7-045a-4da5-8646-9eed160b18d1', id: 'a33515e7-045a-4da5-8646-9eed160b18d1',
name: 'KROM' as Service name: 'KROM' as Service,
} },
], ],
authorizations: [], authorizations: [],
createdAt: 1623655628957 createdAt: 1623655628957,
}, },
{ {
id: 'a4df2f97-fdaf-4b41-8793-dd84ea631502', id: 'a4df2f97-fdaf-4b41-8793-dd84ea631502',
@@ -242,18 +241,18 @@ export const employeesMock: Employee[] = [
houseNumber: 85, houseNumber: 85,
postalCode: '13202', postalCode: '13202',
city: 'Columbia', city: 'Columbia',
kommun: 'Halmstads kommun' kommun: 'Halmstads kommun',
} },
} },
], ],
services: [ services: [
{ {
id: 'a33515e7-045a-4da5-8646-9eed160b18d1', id: 'a33515e7-045a-4da5-8646-9eed160b18d1',
name: 'KROM' as Service name: 'KROM' as Service,
} },
], ],
authorizations: [], authorizations: [],
createdAt: 1623655628957 createdAt: 1623655628957,
}, },
{ {
id: '1a4cbf66-14f7-45c1-ad64-0df6ec3bdc2c', id: '1a4cbf66-14f7-45c1-ad64-0df6ec3bdc2c',
@@ -270,18 +269,18 @@ export const employeesMock: Employee[] = [
houseNumber: 33, houseNumber: 33,
postalCode: '98821', postalCode: '98821',
city: 'Hacienda Heights', city: 'Hacienda Heights',
kommun: 'Motala kommun' kommun: 'Motala kommun',
} },
} },
], ],
services: [ services: [
{ {
id: 'a33515e7-045a-4da5-8646-9eed160b18d1', id: 'a33515e7-045a-4da5-8646-9eed160b18d1',
name: 'KROM' as Service name: 'KROM' as Service,
} },
], ],
authorizations: [], authorizations: [],
createdAt: 1623655628958 createdAt: 1623655628958,
}, },
{ {
id: 'b3703a76-474d-4cb3-b74f-fa41ffe158b5', id: 'b3703a76-474d-4cb3-b74f-fa41ffe158b5',
@@ -298,18 +297,18 @@ export const employeesMock: Employee[] = [
houseNumber: 85, houseNumber: 85,
postalCode: '13202', postalCode: '13202',
city: 'Columbia', city: 'Columbia',
kommun: 'Halmstads kommun' kommun: 'Halmstads kommun',
} },
} },
], ],
services: [ services: [
{ {
id: 'a33515e7-045a-4da5-8646-9eed160b18d1', id: 'a33515e7-045a-4da5-8646-9eed160b18d1',
name: 'KROM' as Service name: 'KROM' as Service,
} },
], ],
authorizations: [], authorizations: [],
createdAt: 1623655628958 createdAt: 1623655628958,
}, },
{ {
id: 'd1523e59-b400-4b6d-8a4b-f393d70bf2d5', id: 'd1523e59-b400-4b6d-8a4b-f393d70bf2d5',
@@ -326,18 +325,18 @@ export const employeesMock: Employee[] = [
houseNumber: 82, houseNumber: 82,
postalCode: '61048', postalCode: '61048',
city: 'Helsing Consuelo', city: 'Helsing Consuelo',
kommun: 'Finspångs kommun' kommun: 'Finspångs kommun',
} },
} },
], ],
services: [ services: [
{ {
id: 'a33515e7-045a-4da5-8646-9eed160b18d1', id: 'a33515e7-045a-4da5-8646-9eed160b18d1',
name: 'KROM' as Service name: 'KROM' as Service,
} },
], ],
authorizations: [], authorizations: [],
createdAt: 1623655628958 createdAt: 1623655628958,
}, },
{ {
id: '1340f322-7e80-4f59-926a-bde9fc6621fc', id: '1340f322-7e80-4f59-926a-bde9fc6621fc',
@@ -354,18 +353,18 @@ export const employeesMock: Employee[] = [
houseNumber: 33, houseNumber: 33,
postalCode: '98821', postalCode: '98821',
city: 'Hacienda Heights', city: 'Hacienda Heights',
kommun: 'Motala kommun' kommun: 'Motala kommun',
} },
} },
], ],
services: [ services: [
{ {
id: 'a33515e7-045a-4da5-8646-9eed160b18d1', id: 'a33515e7-045a-4da5-8646-9eed160b18d1',
name: 'KROM' as Service name: 'KROM' as Service,
} },
], ],
authorizations: [], authorizations: [],
createdAt: 1623655628958 createdAt: 1623655628958,
}, },
{ {
id: 'bd207a4b-ab8a-41e9-8492-ddc580dc2cfd', id: 'bd207a4b-ab8a-41e9-8492-ddc580dc2cfd',
@@ -382,18 +381,18 @@ export const employeesMock: Employee[] = [
houseNumber: 92, houseNumber: 92,
postalCode: '65702', postalCode: '65702',
city: 'Lessieland', city: 'Lessieland',
kommun: 'Motala kommun' kommun: 'Motala kommun',
} },
} },
], ],
services: [ services: [
{ {
id: '20e09e98-c744-45b3-95ef-54ef51af32c0', id: '20e09e98-c744-45b3-95ef-54ef51af32c0',
name: 'KVL' as Service name: 'KVL' as Service,
} },
], ],
authorizations: [], authorizations: [],
createdAt: 1623655628958 createdAt: 1623655628958,
}, },
{ {
id: '5ab9ad0f-fabc-4916-9d9c-7559100866cd', id: '5ab9ad0f-fabc-4916-9d9c-7559100866cd',
@@ -410,18 +409,18 @@ export const employeesMock: Employee[] = [
houseNumber: 77, houseNumber: 77,
postalCode: '52349', postalCode: '52349',
city: 'Katelynnmora', city: 'Katelynnmora',
kommun: 'Hofors kommun' kommun: 'Hofors kommun',
} },
} },
], ],
services: [ services: [
{ {
id: 'a33515e7-045a-4da5-8646-9eed160b18d1', id: 'a33515e7-045a-4da5-8646-9eed160b18d1',
name: 'KROM' as Service name: 'KROM' as Service,
} },
], ],
authorizations: [], authorizations: [],
createdAt: 1623655628958 createdAt: 1623655628958,
}, },
{ {
id: '996c421e-4e93-4d04-961e-5d1268840a2e', id: '996c421e-4e93-4d04-961e-5d1268840a2e',
@@ -438,18 +437,18 @@ export const employeesMock: Employee[] = [
houseNumber: 26, houseNumber: 26,
postalCode: '26994', postalCode: '26994',
city: 'En Akeem', city: 'En Akeem',
kommun: 'Smedjebackens kommun' kommun: 'Smedjebackens kommun',
} },
} },
], ],
services: [ services: [
{ {
id: 'a33515e7-045a-4da5-8646-9eed160b18d1', id: 'a33515e7-045a-4da5-8646-9eed160b18d1',
name: 'KROM' as Service name: 'KROM' as Service,
} },
], ],
authorizations: [], authorizations: [],
createdAt: 1623655628959 createdAt: 1623655628959,
}, },
{ {
id: '24e28f54-8bdd-4ee5-b072-37e25feba220', id: '24e28f54-8bdd-4ee5-b072-37e25feba220',
@@ -466,18 +465,18 @@ export const employeesMock: Employee[] = [
houseNumber: 41, houseNumber: 41,
postalCode: '16444', postalCode: '16444',
city: 'Gustafssonberg', city: 'Gustafssonberg',
kommun: 'Hallsbergs kommun' kommun: 'Hallsbergs kommun',
} },
} },
], ],
services: [ services: [
{ {
id: '20e09e98-c744-45b3-95ef-54ef51af32c0', id: '20e09e98-c744-45b3-95ef-54ef51af32c0',
name: 'KVL' as Service name: 'KVL' as Service,
} },
], ],
authorizations: [], authorizations: [],
createdAt: 1623655628959 createdAt: 1623655628959,
}, },
{ {
id: '4de5abb8-bda6-40e2-9b26-6a834e61b543', id: '4de5abb8-bda6-40e2-9b26-6a834e61b543',
@@ -494,18 +493,18 @@ export const employeesMock: Employee[] = [
houseNumber: 42, houseNumber: 42,
postalCode: '76986', postalCode: '76986',
city: 'Myrtisby', city: 'Myrtisby',
kommun: 'Olofströms kommun' kommun: 'Olofströms kommun',
} },
} },
], ],
services: [ services: [
{ {
id: 'a33515e7-045a-4da5-8646-9eed160b18d1', id: 'a33515e7-045a-4da5-8646-9eed160b18d1',
name: 'KROM' as Service name: 'KROM' as Service,
} },
], ],
authorizations: [], authorizations: [],
createdAt: 1623655628959 createdAt: 1623655628959,
}, },
{ {
id: '61ff95f7-175c-48df-94d2-e5e368ba116c', id: '61ff95f7-175c-48df-94d2-e5e368ba116c',
@@ -522,18 +521,18 @@ export const employeesMock: Employee[] = [
houseNumber: 92, houseNumber: 92,
postalCode: '65702', postalCode: '65702',
city: 'Lessieland', city: 'Lessieland',
kommun: 'Motala kommun' kommun: 'Motala kommun',
} },
} },
], ],
services: [ services: [
{ {
id: '20e09e98-c744-45b3-95ef-54ef51af32c0', id: '20e09e98-c744-45b3-95ef-54ef51af32c0',
name: 'KVL' as Service name: 'KVL' as Service,
} },
], ],
authorizations: [], authorizations: [],
createdAt: 1623655628959 createdAt: 1623655628959,
}, },
{ {
id: '3909e35e-22be-4d95-b4f4-a6f34309c7b8', id: '3909e35e-22be-4d95-b4f4-a6f34309c7b8',
@@ -550,17 +549,17 @@ export const employeesMock: Employee[] = [
houseNumber: 92, houseNumber: 92,
postalCode: '53784', postalCode: '53784',
city: 'Alenaland', city: 'Alenaland',
kommun: 'Bromölla kommun' kommun: 'Bromölla kommun',
} },
} },
], ],
services: [ services: [
{ {
id: 'a33515e7-045a-4da5-8646-9eed160b18d1', id: 'a33515e7-045a-4da5-8646-9eed160b18d1',
name: 'KROM' as Service name: 'KROM' as Service,
} },
], ],
authorizations: [], authorizations: [],
createdAt: 1623655628959 createdAt: 1623655628959,
} },
]; ];

View File

@@ -1,4 +1,4 @@
<dafa-layout> <msfa-layout>
<section class="employees"> <section class="employees">
<digi-typography> <digi-typography>
<h1>Personal</h1> <h1>Personal</h1>
@@ -27,7 +27,7 @@
></digi-form-checkbox> ></digi-form-checkbox>
</form> </form>
<dafa-employees-list <msfa-employees-list
*ngIf="employeesData$ | async as employeesData; else loadingRef" *ngIf="employeesData$ | async as employeesData; else loadingRef"
[employees]="employeesData.data" [employees]="employeesData.data"
[paginationMeta]="employeesData.meta" [paginationMeta]="employeesData.meta"
@@ -35,11 +35,11 @@
[order]="order$ | async" [order]="order$ | async"
(sorted)="handleEmployeesSort($event)" (sorted)="handleEmployeesSort($event)"
(paginated)="setNewPage($event)" (paginated)="setNewPage($event)"
></dafa-employees-list> ></msfa-employees-list>
</digi-typography> </digi-typography>
<ng-template #loadingRef> <ng-template #loadingRef>
<digi-ng-skeleton-base [afCount]="3" afText="Laddar personal"></digi-ng-skeleton-base> <digi-ng-skeleton-base [afCount]="3" afText="Laddar personal"></digi-ng-skeleton-base>
</ng-template> </ng-template>
</section> </section>
</dafa-layout> </msfa-layout>

View File

@@ -1,12 +1,12 @@
import { ChangeDetectionStrategy, Component } from '@angular/core'; import { ChangeDetectionStrategy, Component } from '@angular/core';
import { IconType } from '@dafa-enums/icon-type.enum'; import { IconType } from '@msfa-enums/icon-type.enum';
import { Employee, EmployeesData } from '@dafa-models/employee.model'; import { Employee, EmployeesData } from '@msfa-models/employee.model';
import { Sort } from '@dafa-models/sort.model'; import { Sort } from '@msfa-models/sort.model';
import { EmployeeService } from '@dafa-services/api/employee.service'; import { EmployeeService } from '@msfa-services/api/employee.service';
import { BehaviorSubject, Observable } from 'rxjs'; import { BehaviorSubject, Observable } from 'rxjs';
@Component({ @Component({
selector: 'dafa-employees', selector: 'msfa-employees',
templateUrl: './employees.component.html', templateUrl: './employees.component.html',
styleUrls: ['./employees.component.scss'], styleUrls: ['./employees.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,

View File

@@ -5,7 +5,7 @@ import { CommonModule } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms'; import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { LayoutModule } from '@dafa-shared/components/layout/layout.module'; import { LayoutModule } from '@msfa-shared/components/layout/layout.module';
import { EmployeesListModule } from './components/employees-list/employees-list.module'; import { EmployeesListModule } from './components/employees-list/employees-list.module';
import { EmployeesComponent } from './employees.component'; import { EmployeesComponent } from './employees.component';

View File

@@ -1,41 +1,35 @@
<dafa-layout> <msfa-layout>
<section class="call-off" *ngIf="currentStep$ | async; let currentStep; else: loadingRef"> <section class="call-off" *ngIf="currentStep$ | async; let currentStep; else: loadingRef">
<digi-typography> <digi-typography>
<h2>Välj deltagare att tilldela</h2> <h2>Välj deltagare att tilldela</h2>
<p>Steg {{ currentStep }} av {{ steps }}:</p> <p>Steg {{ currentStep }} av {{ steps }}:</p>
</digi-typography> </digi-typography>
<digi-ng-progress-progressbar <digi-ng-progress-progressbar [afSteps]="steps" afAriaLabel="An aria label" [afActiveStep]="currentStep">
[afSteps]="steps"
afAriaLabel="An aria label"
[afActiveStep]="currentStep">
</digi-ng-progress-progressbar> </digi-ng-progress-progressbar>
<div> <div>
<ng-container *ngIf="currentStep == 4"> <ng-container *ngIf="currentStep == 4">
<h2>Avropet är sparat</h2> <h2>Avropet är sparat</h2>
<digi-button <digi-button af-size="m" class="employee-form__read-more" (afOnClick)="goToStep1()">
af-size="m"
class="employee-form__read-more"
(afOnClick)="goToStep1()">
Tillbaka till nya deltagare Tillbaka till nya deltagare
</digi-button> </digi-button>
</ng-container> </ng-container>
<ng-container *ngIf="currentStep == 1"> <ng-container *ngIf="currentStep == 1">
<dafa-avrop-filters></dafa-avrop-filters> <msfa-avrop-filters></msfa-avrop-filters>
</ng-container> </ng-container>
<ng-container *ngIf="currentStep == 3"> <ng-container *ngIf="currentStep == 3">
<h2>Vänligen bekräfta</h2> <h2>Vänligen bekräfta</h2>
</ng-container> </ng-container>
<ng-container *ngIf="currentStep < 4"> <ng-container *ngIf="currentStep < 4">
<dafa-avrop-table <msfa-avrop-table
[selectableDeltagareList]="selectableDeltagareList$ | async" [selectableDeltagareList]="selectableDeltagareList$ | async"
[selectedDeltagareListInput]="selectedDeltagareList$ | async" [selectedDeltagareListInput]="selectedDeltagareList$ | async"
[isLocked]="deltagareListIsLocked$ | async" [isLocked]="deltagareListIsLocked$ | async"
(changedSelectedDeltagareList)="updateSelectedDeltagareList($event)" (changedSelectedDeltagareList)="updateSelectedDeltagareList($event)"
[handledare]="selectedHandledare$ | async" [handledare]="selectedHandledare$ | async"
[handledareConfirmed]="handledareConfirmed$ | async" [handledareConfirmed]="handledareConfirmed$ | async"
></dafa-avrop-table> ></msfa-avrop-table>
</ng-container> </ng-container>
<ng-container *ngIf="currentStep == 1"> <ng-container *ngIf="currentStep == 1">
@@ -47,8 +41,10 @@
<ng-container *ngIf="currentStep == 2"> <ng-container *ngIf="currentStep == 2">
<h2>Välj handledare</h2> <h2>Välj handledare</h2>
<ng-container *ngIf="selectableHandledareList$ | async; let selectableHandledareList; else loadingRefSmall"> <ng-container *ngIf="selectableHandledareList$ | async; let selectableHandledareList; else loadingRefSmall">
<select [value]="(selectedHandledare$ | async)?.id ? (selectedHandledare$ | async)?.id : ''" <select
(change)="changeHandledare($event)"> [value]="(selectedHandledare$ | async)?.id ? (selectedHandledare$ | async)?.id : ''"
(change)="changeHandledare($event)"
>
<option disabled value="">Välj handledare</option> <option disabled value="">Välj handledare</option>
<option *ngFor="let selectableHandledare of selectableHandledareList" [value]="selectableHandledare?.id"> <option *ngFor="let selectableHandledare of selectableHandledareList" [value]="selectableHandledare?.id">
@@ -99,4 +95,4 @@
</ng-template> </ng-template>
<hr /> <hr />
</dafa-layout> </msfa-layout>

View File

@@ -1,12 +1,12 @@
import { ChangeDetectionStrategy, Component } from '@angular/core'; import { ChangeDetectionStrategy, Component } from '@angular/core';
import { AvropService } from './avrop.service'; import { Avrop } from '@msfa-models/avrop.model';
import { MultiselectFilterOption } from '@msfa-models/multiselect-filter-option';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { MultiselectFilterOption } from '@dafa-models/multiselect-filter-option'; import { AvropService } from './avrop.service';
import { HandledareAvrop } from './models/handledare-avrop'; import { HandledareAvrop } from './models/handledare-avrop';
import { Avrop } from '@dafa-models/avrop.model';
@Component({ @Component({
selector: 'dafa-avrop', selector: 'msfa-avrop',
templateUrl: './avrop.component.html', templateUrl: './avrop.component.html',
styleUrls: ['./avrop.component.scss'], styleUrls: ['./avrop.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,

View File

@@ -3,11 +3,11 @@ import { DigiNgSkeletonBaseModule } from '@af/digi-ng/_skeleton/skeleton-base';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { LayoutModule } from '@dafa-shared/components/layout/layout.module'; import { LayoutModule } from '@msfa-shared/components/layout/layout.module';
import { AvropComponent } from './avrop.component';
import { AvropFiltersComponent } from './components/avrop-filters/avrop-filters.component'; import { AvropFiltersComponent } from './components/avrop-filters/avrop-filters.component';
import { TemporaryFilterComponent } from './components/avrop-filters/temporary-filter/temporary-filter.component'; import { TemporaryFilterComponent } from './components/avrop-filters/temporary-filter/temporary-filter.component';
import { AvropTableRowComponent } from './components/avrop-table/avrop-table-row/avrop-table-row.component'; import { AvropTableRowComponent } from './components/avrop-table/avrop-table-row/avrop-table-row.component';
import { AvropComponent } from './avrop.component';
import { AvropTableComponent } from './components/avrop-table/avrop-table.component'; import { AvropTableComponent } from './components/avrop-table/avrop-table.component';
@NgModule({ @NgModule({

View File

@@ -1,10 +1,10 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Avrop } from '@msfa-models/avrop.model';
import { MultiselectFilterOption } from '@msfa-models/multiselect-filter-option';
import { AvropApiService } from '@msfa-services/api/avrop-api.service';
import { BehaviorSubject, combineLatest, Observable } from 'rxjs'; import { BehaviorSubject, combineLatest, Observable } from 'rxjs';
import { HandledareAvrop } from './models/handledare-avrop';
import { first, map, switchMap } from 'rxjs/operators'; import { first, map, switchMap } from 'rxjs/operators';
import { AvropApiService } from '@dafa-services/api/avrop-api.service'; import { HandledareAvrop } from './models/handledare-avrop';
import { MultiselectFilterOption } from '@dafa-models/multiselect-filter-option';
import { Avrop } from '@dafa-models/avrop.model';
type Step = 1 | 2 | 3 | 4; type Step = 1 | 2 | 3 | 4;

View File

@@ -0,0 +1,49 @@
<div style="display: flex">
<ng-container *ngIf="selectableTjanster$ | async; let selectableTjanster; else loadingRef">
<msfa-temporary-filter
[filterLabel]="'Tjänster'"
[filterOptions]="selectableTjanster"
[selectedOptions]="selectedTjanster$ | async"
(selectedOptionsChange)="updateSelectedTjanster($event)"
></msfa-temporary-filter>
</ng-container>
<ng-container *ngIf="selectableUtforandeVerksamheter$ | async; let selectableUtforandeVerksamheter; else loadingRef">
<msfa-temporary-filter
[filterLabel]="'Utförande verksamheter'"
[filterOptions]="selectableUtforandeVerksamheter"
[selectedOptions]="selectedUtforandeVerksamheter$ | async"
(selectedOptionsChange)="updateSelectedUtforandeVerksamheter($event)"
></msfa-temporary-filter>
</ng-container>
<ng-container *ngIf="selectableKommuner$ | async; let selectableKommuner; else loadingRef">
<msfa-temporary-filter
[filterLabel]="'Kommuner'"
[filterOptions]="selectableKommuner"
[selectedOptions]="selectedKommuner$ | async"
(selectedOptionsChange)="updateSelectedKommuner($event)"
></msfa-temporary-filter>
</ng-container>
</div>
<br /><br />
<div class="avrop-filters__tags">
<div class="avrop-filters__tag" *ngFor="let kommun of selectedKommuner$ | async">
<digi-tag [afText]="kommun.label" (click)="removeKommun(kommun)" af-no-icon="false" af-size="s"></digi-tag>
</div>
<div class="avrop-filters__tag" *ngFor="let kommun of selectedUtforandeVerksamheter$ | async">
<digi-tag
[afText]="kommun.label"
(click)="removeUtforandeVerksamhet(kommun)"
af-no-icon="false"
af-size="s"
></digi-tag>
</div>
<div class="avrop-filters__tag" *ngFor="let kommun of selectedTjanster$ | async">
<digi-tag [afText]="kommun.label" (click)="removeTjanst(kommun)" af-no-icon="false" af-size="s"></digi-tag>
</div>
</div>
<ng-template #loadingRef>
<div class="avrop-filters__loading-spinner">
<digi-icon-spinner af-title="Laddar innehåll"></digi-icon-spinner>
</div>
</ng-template>

View File

@@ -1,4 +1,4 @@
@import "apps/dafa-web/src/styles/variables/gutters"; @import 'variables/gutters';
.avrop-filters { .avrop-filters {
&__tags { &__tags {

View File

@@ -1,11 +1,10 @@
import { Component, ChangeDetectionStrategy } from '@angular/core'; import { ChangeDetectionStrategy, Component } from '@angular/core';
import { AvropService } from '../../avrop.service'; import { MultiselectFilterOption } from '@msfa-models/multiselect-filter-option';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { MultiselectFilterOption } from '@dafa-models/multiselect-filter-option'; import { AvropService } from '../../avrop.service';
import { first } from 'rxjs/operators';
@Component({ @Component({
selector: 'dafa-avrop-filters', selector: 'msfa-avrop-filters',
templateUrl: './avrop-filters.component.html', templateUrl: './avrop-filters.component.html',
styleUrls: ['./avrop-filters.component.scss'], styleUrls: ['./avrop-filters.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,

View File

@@ -1,10 +1,18 @@
import { Component, OnInit, ChangeDetectionStrategy, Input, Output, SimpleChanges, OnChanges } from '@angular/core'; import {
import { MultiselectFilterOption } from '@dafa-models/multiselect-filter-option'; ChangeDetectionStrategy,
Component,
EventEmitter,
Input,
OnChanges,
OnInit,
Output,
SimpleChanges,
} from '@angular/core';
import { MultiselectFilterOption } from '@msfa-models/multiselect-filter-option';
import { BehaviorSubject, Observable } from 'rxjs'; import { BehaviorSubject, Observable } from 'rxjs';
import { EventEmitter } from '@angular/core';
@Component({ @Component({
selector: 'dafa-temporary-filter', selector: 'msfa-temporary-filter',
templateUrl: './temporary-filter.component.html', templateUrl: './temporary-filter.component.html',
styleUrls: ['./temporary-filter.component.scss'], styleUrls: ['./temporary-filter.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,

View File

@@ -1,11 +1,10 @@
import { EventEmitter } from '@angular/core'; import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
import { Component, ChangeDetectionStrategy, Input, Output } from '@angular/core'; import { Avrop } from '@msfa-models/avrop.model';
import { Avrop } from '@dafa-models/avrop.model';
import { ButtonVariation } from '../../../enums/button-vatiation.enum'; import { ButtonVariation } from '../../../enums/button-vatiation.enum';
import { HandledareAvrop } from '../../../models/handledare-avrop'; import { HandledareAvrop } from '../../../models/handledare-avrop';
@Component({ @Component({
selector: 'dafa-avrop-table-row', selector: 'msfa-avrop-table-row',
templateUrl: './avrop-table-row.component.html', templateUrl: './avrop-table-row.component.html',
styleUrls: ['./avrop-table-row.component.scss'], styleUrls: ['./avrop-table-row.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,

View File

@@ -1,5 +1,5 @@
<div class="avrop-table"> <div class="avrop-table">
<dafa-avrop-table-row <msfa-avrop-table-row
*ngFor="let deltagare of deltagareRows" *ngFor="let deltagare of deltagareRows"
[deltagare]="deltagare" [deltagare]="deltagare"
[isSelected]="isSelected(deltagare)" [isSelected]="isSelected(deltagare)"
@@ -7,5 +7,5 @@
(isSelectedChange)="isSelectedChange(deltagare, $event)" (isSelectedChange)="isSelectedChange(deltagare, $event)"
[handledare]="handledare" [handledare]="handledare"
[handledareConfirmed]="handledareConfirmed" [handledareConfirmed]="handledareConfirmed"
></dafa-avrop-table-row> ></msfa-avrop-table-row>
</div> </div>

View File

@@ -1,11 +1,11 @@
import { Component, OnInit, ChangeDetectionStrategy, Input, Output, EventEmitter } from '@angular/core'; import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { Avrop } from '@dafa-models/avrop.model'; import { Avrop } from '@msfa-models/avrop.model';
import { BehaviorSubject, Observable } from 'rxjs'; import { BehaviorSubject, Observable } from 'rxjs';
import { filter } from 'rxjs/operators'; import { filter } from 'rxjs/operators';
import { HandledareAvrop } from '../../models/handledare-avrop'; import { HandledareAvrop } from '../../models/handledare-avrop';
@Component({ @Component({
selector: 'dafa-avrop-table', selector: 'msfa-avrop-table',
templateUrl: './avrop-table.component.html', templateUrl: './avrop-table.component.html',
styleUrls: ['./avrop-table.component.scss'], styleUrls: ['./avrop-table.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush, changeDetection: ChangeDetectionStrategy.OnPush,

Some files were not shown because too many files have changed in this diff Show More