@goat-bravos/intern-hub-layout 1.0.5 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/.editorconfig +17 -0
  2. package/.vscode/extensions.json +4 -0
  3. package/.vscode/launch.json +20 -0
  4. package/.vscode/mcp.json +9 -0
  5. package/.vscode/tasks.json +42 -0
  6. package/README.md +629 -254
  7. package/angular.json +40 -0
  8. package/ng-package.json +11 -0
  9. package/package.json +24 -16
  10. package/src/libs/layouts/header/header.component.html +58 -0
  11. package/src/libs/layouts/header/header.component.scss +108 -0
  12. package/src/libs/layouts/header/header.component.ts +70 -0
  13. package/src/libs/layouts/sidebar/sidebar.component.html +28 -0
  14. package/src/libs/layouts/sidebar/sidebar.component.scss +44 -0
  15. package/src/libs/layouts/sidebar/sidebar.component.ts +55 -0
  16. package/src/libs/shared/components/approval/approval-list/approval-list.component.html +19 -0
  17. package/src/libs/shared/components/approval/approval-list/approval-list.component.scss +24 -0
  18. package/src/libs/shared/components/approval/approval-list/approval-list.component.ts +19 -0
  19. package/src/libs/shared/components/approval/approval-list-item/approval-list-item.component.html +21 -0
  20. package/src/libs/shared/components/approval/approval-list-item/approval-list-item.component.scss +28 -0
  21. package/src/libs/shared/components/approval/approval-list-item/approval-list-item.component.ts +20 -0
  22. package/src/libs/shared/components/approval/approval-list-item/approval-list-item.model.ts +8 -0
  23. package/src/libs/shared/components/button/button-container/button-container.component.html +20 -0
  24. package/src/libs/shared/components/button/button-container/button-container.component.scss +49 -0
  25. package/src/libs/shared/components/button/button-container/button-container.component.ts +34 -0
  26. package/src/libs/shared/components/button/button-container/button-container.model.ts +58 -0
  27. package/src/libs/shared/components/button/label-button/label-button.component.html +11 -0
  28. package/src/libs/shared/components/button/label-button/label-button.component.scss +13 -0
  29. package/src/libs/shared/components/button/label-button/label-button.component.ts +18 -0
  30. package/src/libs/shared/components/functional-label/functional-label.component.html +36 -0
  31. package/src/libs/shared/components/functional-label/functional-label.component.scss +56 -0
  32. package/src/libs/shared/components/functional-label/functional-label.component.ts +141 -0
  33. package/src/libs/shared/components/icon/icon.component.html +12 -0
  34. package/src/libs/shared/components/icon/icon.component.scss +11 -0
  35. package/src/libs/shared/components/icon/icon.component.ts +61 -0
  36. package/src/libs/shared/components/input/input-calendar/input-calendar.component.html +52 -0
  37. package/src/libs/shared/components/input/input-calendar/input-calendar.component.scss +98 -0
  38. package/src/libs/shared/components/input/input-calendar/input-calendar.component.ts +126 -0
  39. package/src/libs/shared/components/input/input-label/input-label.component.html +0 -0
  40. package/src/libs/shared/components/input/input-label/input-label.component.scss +0 -0
  41. package/src/libs/shared/components/input/input-label/input-label.component.ts +0 -0
  42. package/src/libs/shared/components/input/input-stepper/input-stepper.component.html +62 -0
  43. package/src/libs/shared/components/input/input-stepper/input-stepper.component.scss +211 -0
  44. package/src/libs/shared/components/input/input-stepper/input-stepper.component.ts +73 -0
  45. package/src/libs/shared/components/input/input-text/input-text.component.html +40 -0
  46. package/src/libs/shared/components/input/input-text/input-text.component.scss +143 -0
  47. package/src/libs/shared/components/input/input-text/input-text.component.ts +63 -0
  48. package/src/libs/shared/components/pop-up/pop-up-confirm/pop-up-confirm.component.html +15 -0
  49. package/src/libs/shared/components/pop-up/pop-up-confirm/pop-up-confirm.component.scss +70 -0
  50. package/src/libs/shared/components/pop-up/pop-up-confirm/pop-up-confirm.component.ts +29 -0
  51. package/src/libs/shared/components/table/table-body/table-body.component.html +18 -0
  52. package/src/libs/shared/components/table/table-body/table-body.component.scss +6 -0
  53. package/src/libs/shared/components/table/table-body/table-body.component.ts +17 -0
  54. package/src/libs/shared/components/table/table-header/table-header.component.html +27 -0
  55. package/src/libs/shared/components/table/table-header/table-header.component.scss +91 -0
  56. package/src/libs/shared/components/table/table-header/table-header.component.ts +25 -0
  57. package/src/public-api.ts +34 -0
  58. package/tsconfig.json +38 -0
  59. package/tsconfig.lib.json +17 -0
  60. package/tsconfig.lib.prod.json +11 -0
  61. package/tsconfig.spec.json +15 -0
  62. package/fesm2022/goat-bravos-intern-hub-layout.mjs +0 -561
  63. package/fesm2022/goat-bravos-intern-hub-layout.mjs.map +0 -1
  64. package/types/goat-bravos-intern-hub-layout.d.ts +0 -189
package/angular.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3
+ "version": 1,
4
+ "cli": {
5
+ "packageManager": "npm",
6
+ "analytics": false
7
+ },
8
+ "newProjectRoot": "projects",
9
+ "projects": {
10
+ "intern-hub-layout": {
11
+ "projectType": "library",
12
+ "root": "",
13
+ "sourceRoot": "src",
14
+ "prefix": "lib",
15
+ "architect": {
16
+ "build": {
17
+ "builder": "@angular/build:ng-packagr",
18
+ "options": {
19
+ "project": "ng-package.json"
20
+ },
21
+ "configurations": {
22
+ "production": {
23
+ "tsConfig": "tsconfig.lib.prod.json"
24
+ },
25
+ "development": {
26
+ "tsConfig": "tsconfig.lib.json"
27
+ }
28
+ },
29
+ "defaultConfiguration": "production"
30
+ },
31
+ "test": {
32
+ "builder": "@angular/build:unit-test",
33
+ "options": {
34
+ "tsConfig": "tsconfig.spec.json"
35
+ }
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "./node_modules/ng-packagr/ng-package.schema.json",
3
+ "dest": "dist/intern-hub-layout",
4
+ "lib": {
5
+ "entryFile": "src/public-api.ts"
6
+ },
7
+ "allowedNonPeerDependencies": [
8
+ "dynamic-ds",
9
+ "tslib"
10
+ ]
11
+ }
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@goat-bravos/intern-hub-layout",
3
- "version": "1.0.5",
3
+ "version": "1.2.0",
4
4
  "description": "Angular library for intern hub layout components",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^21.0.0",
7
7
  "@angular/core": "^21.0.0",
8
+ "@angular/forms": "^21.0.0",
8
9
  "@angular/router": "^21.0.0",
9
10
  "dynamic-ds": "^1.0.0"
10
11
  },
@@ -13,6 +14,12 @@
13
14
  "optional": true
14
15
  }
15
16
  },
17
+ "scripts": {
18
+ "build": "ng build --configuration production",
19
+ "publish:lib": "npm run build && cd dist/intern-hub-layout && npm publish",
20
+ "publish:lib:dry": "npm run build && cd dist/intern-hub-layout && npm publish --dry-run",
21
+ "pack:lib": "npm version patch --ignore-scripts --no-git-tag-version && npm run build && cd dist/intern-hub-layout && npm pack"
22
+ },
16
23
  "keywords": [
17
24
  "angular",
18
25
  "library",
@@ -25,19 +32,20 @@
25
32
  "type": "git",
26
33
  "url": "https://github.com/FPT-IS-Intern/Intern-Hub-FE-Layout"
27
34
  },
28
- "module": "fesm2022/goat-bravos-intern-hub-layout.mjs",
29
- "typings": "types/goat-bravos-intern-hub-layout.d.ts",
30
- "exports": {
31
- "./package.json": {
32
- "default": "./package.json"
33
- },
34
- ".": {
35
- "types": "./types/goat-bravos-intern-hub-layout.d.ts",
36
- "default": "./fesm2022/goat-bravos-intern-hub-layout.mjs"
37
- }
35
+ "devDependencies": {
36
+ "@angular/build": "^21.1.1",
37
+ "@angular/cli": "^21.1.1",
38
+ "@angular/common": "^21.1.0",
39
+ "@angular/compiler": "^21.1.0",
40
+ "@angular/compiler-cli": "^21.1.0",
41
+ "@angular/core": "^21.1.0",
42
+ "@angular/platform-browser": "^21.1.0",
43
+ "@angular/router": "^21.1.0",
44
+ "dynamic-ds": "^1.0.2",
45
+ "ng-packagr": "^21.0.0",
46
+ "rxjs": "~7.8.0",
47
+ "tslib": "^2.3.0",
48
+ "typescript": "~5.9.2"
38
49
  },
39
- "sideEffects": false,
40
- "dependencies": {
41
- "tslib": "^2.3.0"
42
- }
43
- }
50
+ "dependencies": {}
51
+ }
@@ -0,0 +1,58 @@
1
+ <header class="app-header">
2
+ <div class="header-left">
3
+ <img
4
+ class="logo"
5
+ [src]="data.logo || 'assets/FPT-IS-Logo.png'"
6
+ alt="Logo"
7
+ />
8
+ </div>
9
+
10
+ <div class="header-right">
11
+ @for (item of data.headerItems; track $index) {
12
+ <button
13
+ class="header-btn"
14
+ [attr.aria-label]="item.content"
15
+ (click)="handleActionClick(item, $event)"
16
+ >
17
+ <app-icon
18
+ [iconData]="
19
+ getIconData(
20
+ item.icon,
21
+ item.colorIcon,
22
+ item.width || '16px',
23
+ item.height || '16px'
24
+ )
25
+ "
26
+ ></app-icon>
27
+ @if (item.badge) {
28
+ <span class="badge">{{ item.badge }}</span>
29
+ }
30
+ </button>
31
+ }
32
+
33
+ <div class="header-user">
34
+ <button class="user-btn">
35
+ @if (data.userIcon) {
36
+ <app-icon
37
+ [iconData]="
38
+ getIconData(data.userIcon, data.userIconColor, '16px', '16px')
39
+ "
40
+ ></app-icon>
41
+ }
42
+ <span class="user-name">{{ data.userName }}</span>
43
+ @if (data.dropdownIcon) {
44
+ <app-icon
45
+ [iconData]="
46
+ getIconData(
47
+ data.dropdownIcon,
48
+ data.dropdownIconColor,
49
+ '16px',
50
+ '16px'
51
+ )
52
+ "
53
+ ></app-icon>
54
+ }
55
+ </button>
56
+ </div>
57
+ </div>
58
+ </header>
@@ -0,0 +1,108 @@
1
+ // Header Component - Optimized for Intern-Hub Shell
2
+ :host {
3
+ width: 100%;
4
+ display: flex;
5
+ justify-content: center;
6
+ }
7
+
8
+ $padding-header: 16px 8px;
9
+
10
+ .app-header {
11
+ height: 70px;
12
+ width: 1370px;
13
+ display: flex;
14
+ align-items: center;
15
+ justify-content: space-between;
16
+ padding: $padding-header;
17
+ background-color: transparent;
18
+ box-sizing: border-box;
19
+ }
20
+
21
+ .header-left {
22
+ display: flex;
23
+ align-items: center;
24
+
25
+ .logo {
26
+ height: 40px;
27
+ width: auto;
28
+ object-fit: contain;
29
+ cursor: pointer;
30
+ }
31
+ }
32
+
33
+ .header-right {
34
+ display: flex;
35
+ align-items: center;
36
+ gap: 12px;
37
+ }
38
+
39
+ .header-btn {
40
+ position: relative;
41
+ width: 28px;
42
+ height: 28px;
43
+ display: flex;
44
+ align-items: center;
45
+ justify-content: center;
46
+ background: transparent;
47
+ border-radius: var(--radius-full);
48
+ border: none;
49
+ cursor: pointer;
50
+ color: var(--brand-600);
51
+ transition: all 0.2s ease-in-out;
52
+
53
+ &:hover {
54
+ background-color: var(--neutral-color-100);
55
+ color: var(--primary-color);
56
+ }
57
+
58
+ .badge {
59
+ position: absolute;
60
+ top: -4px;
61
+ right: -4px;
62
+ min-width: 16px;
63
+ height: 16px;
64
+ padding: $padding-header;
65
+ display: flex;
66
+ align-items: center;
67
+ justify-content: center;
68
+ background-color: var(-utility-500);
69
+ color: var(--neutral-color-100);
70
+ border-radius: 8px;
71
+ font-size: 10px;
72
+ font-weight: 600;
73
+ line-height: 1;
74
+ }
75
+ }
76
+
77
+ // User Section
78
+ .header-user {
79
+ margin-left: 4px;
80
+ padding-left: $padding-header;
81
+ }
82
+
83
+ .user-btn {
84
+ display: flex;
85
+ align-items: center;
86
+ justify-content: space-between;
87
+ gap: 10px;
88
+ padding: $padding-header;
89
+ background: transparent;
90
+ border: none;
91
+ border-radius: 8px;
92
+ cursor: pointer;
93
+ transition: background-color 0.2s ease;
94
+
95
+ &:hover {
96
+ background-color: var(--neutral-color-100);
97
+ }
98
+
99
+ .user-name {
100
+ font-size: 14px;
101
+ font-weight: 700;
102
+ color: var(--brand-600);
103
+ white-space: nowrap;
104
+ max-width: 150px;
105
+ overflow: hidden;
106
+ text-overflow: ellipsis;
107
+ }
108
+ }
@@ -0,0 +1,70 @@
1
+ import { Component, Input } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import {
4
+ IconComponent,
5
+ IconData,
6
+ } from '../../shared/components/icon/icon.component';
7
+
8
+ export interface HeaderAction {
9
+ icon: IconData | string;
10
+ content: string;
11
+ method?: () => void;
12
+ badge?: string;
13
+ colorIcon?: string;
14
+ width?: string;
15
+ height?: string;
16
+ }
17
+
18
+ export interface HeaderData {
19
+ headerItems: HeaderAction[];
20
+ userName: string;
21
+ userIcon?: IconData | string;
22
+ userIconColor?: string;
23
+ dropdownIcon?: IconData | string;
24
+ dropdownIconColor?: string;
25
+ logo?: string;
26
+ }
27
+
28
+ @Component({
29
+ selector: 'app-header-component',
30
+ standalone: true,
31
+ imports: [CommonModule, IconComponent],
32
+ templateUrl: './header.component.html',
33
+ styleUrls: ['./header.component.scss'],
34
+ })
35
+ export class HeaderComponent {
36
+ @Input() data: HeaderData = {
37
+ headerItems: [],
38
+ userName: 'Guest',
39
+ userIcon: 'dsi-user-01-line',
40
+ dropdownIcon: 'dsi-arrow-down-solid',
41
+ logo: 'assets/FPT-IS-Logo.png',
42
+ };
43
+
44
+ handleActionClick(item: HeaderAction, event: Event): void {
45
+ if (item.method) {
46
+ event.preventDefault();
47
+ item.method();
48
+ }
49
+ }
50
+
51
+ getIconData(
52
+ icon: IconData | string | undefined,
53
+ colorIcon?: string,
54
+ width?: string,
55
+ height?: string,
56
+ ): IconData | undefined {
57
+ if (!icon) return undefined;
58
+
59
+ if (typeof icon === 'string') {
60
+ return {
61
+ icon,
62
+ colorIcon,
63
+ width,
64
+ height,
65
+ };
66
+ }
67
+
68
+ return icon;
69
+ }
70
+ }
@@ -0,0 +1,28 @@
1
+ <div class="sidebar-wrapper">
2
+ <aside
3
+ class="sidebar"
4
+ [style.background-color]="!isSidebarExpanded ? data.backgroundColor : null"
5
+ >
6
+ @for (item of data.menuItems; track $index) {
7
+ <app-functional-label
8
+ class="sidebar-item"
9
+ [isSidebarExpanded]="isSidebarExpanded"
10
+ [iconLeft]="item.iconLeft"
11
+ [iconRight]="item.iconRight"
12
+ [content]="item.content"
13
+ [routerLink]="item.url"
14
+ [colorIconLeft]="item.colorIconLeft"
15
+ [colorIconRight]="item.colorIconRight"
16
+ [colorContent]="item.colorContent"
17
+ [backgroundColor]="item.backgroundColor"
18
+ [borderRadius]="item.borderRadius"
19
+ (clicked)="onMenuItemClick(item, $event)"
20
+ [colorIconLeftHover]="item.colorIconLeftHover"
21
+ [colorIconRightHover]="item.colorIconRightHover"
22
+ [backgroundColorHover]="item.backgroundColorHover"
23
+ [width]="item.width"
24
+ [height]="item.height"
25
+ ></app-functional-label>
26
+ }
27
+ </aside>
28
+ </div>
@@ -0,0 +1,44 @@
1
+ :host {
2
+ display: block;
3
+ height: 100vh;
4
+ }
5
+
6
+ .sidebar-wrapper {
7
+ width: 44px;
8
+ height: 100vh;
9
+ transition: width 0.3s ease;
10
+ background-color: transparent;
11
+ }
12
+
13
+ .sidebar {
14
+ display: flex;
15
+ flex-direction: column;
16
+ gap: 8px;
17
+
18
+ width: 44px;
19
+ height: 100%;
20
+ padding: 8px;
21
+ box-sizing: border-box;
22
+ border-radius: 16px;
23
+ overflow: hidden;
24
+
25
+ transition:
26
+ width 0.3s ease,
27
+ padding 0.3s ease,
28
+ background-color 0.3s ease;
29
+ }
30
+
31
+ .sidebar a {
32
+ text-decoration: none;
33
+ }
34
+
35
+ .sidebar-wrapper:hover {
36
+ width: 344px;
37
+
38
+ .sidebar {
39
+ width: 344px;
40
+ padding: 16px 8px;
41
+ border-radius: 16px;
42
+ background-color: var(--theme-neutral-light-100);
43
+ }
44
+ }
@@ -0,0 +1,55 @@
1
+ import { Component, HostListener, Input } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { FunctionalLabelComponent } from '../../shared/components/functional-label/functional-label.component';
4
+ import { IconData } from '../../shared/components/icon/icon.component';
5
+
6
+ export interface SidebarItem {
7
+ iconLeft?: IconData | string;
8
+ iconRight?: IconData | string;
9
+ content: string;
10
+ url?: string;
11
+ colorIconLeft?: string;
12
+ colorIconLeftHover?: string;
13
+ colorIconRight?: string;
14
+ colorIconRightHover?: string;
15
+ colorContent?: string;
16
+ colorContentHover?: string;
17
+ backgroundColor?: string;
18
+ backgroundColorHover?: string;
19
+ borderRadius?: string;
20
+ borderRadiusHover?: string;
21
+ width?: string;
22
+ height?: string;
23
+ }
24
+
25
+ export interface SidebarData {
26
+ menuItems: SidebarItem[];
27
+ backgroundColor?: string;
28
+ }
29
+
30
+ @Component({
31
+ selector: 'app-sidebar',
32
+ standalone: true,
33
+ imports: [CommonModule, FunctionalLabelComponent],
34
+ templateUrl: './sidebar.component.html',
35
+ styleUrls: ['./sidebar.component.scss'],
36
+ })
37
+ export class SidebarComponent {
38
+ @Input() data: SidebarData = { menuItems: [] };
39
+
40
+ isSidebarExpanded = false;
41
+
42
+ @HostListener('mouseenter')
43
+ onMouseEnter() {
44
+ this.isSidebarExpanded = true;
45
+ }
46
+
47
+ @HostListener('mouseleave')
48
+ onMouseLeave() {
49
+ this.isSidebarExpanded = false;
50
+ }
51
+
52
+ onMenuItemClick(item: SidebarItem, event: Event): void {
53
+ console.log('Menu item clicked:', item, event);
54
+ }
55
+ }
@@ -0,0 +1,19 @@
1
+ <div class="approval-list" [style.width]="width">
2
+ <div class="approval-list-header">
3
+ <span class="approval-list-header-left">{{ headerContentLeft }}</span>
4
+ <div>
5
+ <p>{{ headerContentRight }}</p>
6
+ </div>
7
+ </div>
8
+
9
+ <div class="approval-list-content" [style.width]="width">
10
+ <app-approval-list-item
11
+ *ngFor="let row of rows"
12
+ [name]="row.name"
13
+ [date]="row.date"
14
+ [rightTemplate]="row.rightTemplate"
15
+ [rightContext]="row.rightContext"
16
+ >
17
+ </app-approval-list-item>
18
+ </div>
19
+ </div>
@@ -0,0 +1,24 @@
1
+ .approval-list {
2
+ display: flex;
3
+ flex-direction: column;
4
+ background-color: var(--theme-neutral-light-100);
5
+ border-radius: 16px;
6
+ }
7
+
8
+ .approval-list-header {
9
+ display: flex;
10
+ justify-content: space-between;
11
+ align-items: center;
12
+ padding: 16px 8px;
13
+ height: fit-content;
14
+ }
15
+
16
+ .approval-list-header span {
17
+ font-size: 20px;
18
+ color: var(--brand-600);
19
+ font-weight: bold;
20
+ }
21
+
22
+ .approval-list-header p {
23
+ font-size: var(--font-sm);
24
+ }
@@ -0,0 +1,19 @@
1
+ import { Component, Input } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { ApprovalListItemInterface } from '../approval-list-item/approval-list-item.model';
4
+ import { ApprovalListItemComponent } from '../approval-list-item/approval-list-item.component';
5
+
6
+ @Component({
7
+ selector: 'app-approval-list',
8
+ standalone: true,
9
+ imports: [CommonModule, ApprovalListItemComponent],
10
+ templateUrl: './approval-list.component.html',
11
+ styleUrls: ['./approval-list.component.scss'],
12
+ })
13
+ export class ApprovalListComponent {
14
+ @Input() rows: ApprovalListItemInterface[] = [];
15
+
16
+ @Input() headerContentRight!: string;
17
+ @Input() headerContentLeft!: string;
18
+ @Input() width!: string;
19
+ }
@@ -0,0 +1,21 @@
1
+ <div class="approval-item">
2
+ <!-- LEFT -->
3
+ <div class="approval-item-left">
4
+ <span class="approval-item-left-name">{{ name }}</span>
5
+ <span class="approval-item-left-date">
6
+ <span class="approval-item-left-date-title">Ngày tạo đơn:</span>
7
+ {{ date | date: 'dd/MM/yyyy' }}
8
+ </span>
9
+ </div>
10
+
11
+ <div class="approval-item-right">
12
+ <ng-container *ngIf="rightTemplate; else defaultRight">
13
+ <ng-container *ngTemplateOutlet="rightTemplate; context: rightContext">
14
+ </ng-container>
15
+ </ng-container>
16
+
17
+ <ng-template #defaultRight>
18
+ <span class="text-gray-400">—</span>
19
+ </ng-template>
20
+ </div>
21
+ </div>
@@ -0,0 +1,28 @@
1
+ .approval-item {
2
+ display: flex;
3
+ justify-content: space-between;
4
+ min-width: 400px;
5
+ height: fit-content;
6
+ align-items: center;
7
+ padding: 16px 8px;
8
+ }
9
+
10
+ .approval-item-left-date-title {
11
+ color: var(--theme-neutral-500);
12
+ }
13
+
14
+ .approval-item-right p {
15
+ color: var(--secondary-800);
16
+ font-weight: 500;
17
+ }
18
+
19
+ .approval-item-left {
20
+ display: flex;
21
+ flex-direction: column;
22
+ gap: 8px;
23
+ }
24
+
25
+ span,
26
+ p {
27
+ font-size: var(--font-sm);
28
+ }
@@ -0,0 +1,20 @@
1
+ import { CommonModule } from '@angular/common';
2
+ import { Component, Input, TemplateRef } from '@angular/core';
3
+
4
+ @Component({
5
+ selector: 'app-approval-list-item',
6
+ templateUrl: './approval-list-item.component.html',
7
+ styleUrls: ['./approval-list-item.component.scss'],
8
+ imports: [CommonModule],
9
+ standalone: true
10
+ })
11
+ export class ApprovalListItemComponent {
12
+ @Input() name!: string;
13
+ @Input() date!: Date;
14
+ @Input() rightTemplate?: TemplateRef<any>;
15
+ @Input() rightContext: any = {};
16
+
17
+ get parsedDate(): Date {
18
+ return new Date(this.date);
19
+ }
20
+ }
@@ -0,0 +1,8 @@
1
+ import { TemplateRef } from '@angular/core';
2
+
3
+ export interface ApprovalListItemInterface {
4
+ name: string;
5
+ date: Date;
6
+ rightTemplate?: TemplateRef<any>;
7
+ rightContext?: any;
8
+ }
@@ -0,0 +1,20 @@
1
+ <button class="button-container" [style.minWidth]="sizeStyle.minWidth" [style.minHeight]="sizeStyle.minHeight" [style.color]="color"
2
+ [style.backgroundColor]="backgroundColor" [style.borderColor]="borderColor" (click)="handleClick()">
3
+
4
+ @if(leftIcon){
5
+ <i class="button-icon" [style.width]="sizeStyle.iconSize" [style.height]="sizeStyle.iconSize" [style.fontSize]="sizeStyle.iconSize">
6
+ {{leftIcon}}
7
+ </i>
8
+ }
9
+
10
+ <span class="button-content" [style.minWidth]="sizeStyle.contentWidth" [style.minHeight]="sizeStyle.contentHeight"
11
+ [style.fontSize]="fontSize || sizeStyle.fontSize" [style.color]="color">
12
+ {{ content }}
13
+ </span>
14
+
15
+ @if(rightIcon){
16
+ <i class="button-icon" [style.width]="sizeStyle.iconSize" [style.height]="sizeStyle.iconSize" [style.fontSize]="sizeStyle.iconSize" [style.color]="color">
17
+ {{rightIcon}}
18
+ </i>
19
+ }
20
+ </button>