Commit 41881135 by Ooh-Ao

dashboard

parent b67f5495
import { Component } from '@angular/core';
@Component({
selector: 'app-myhr-plus-create-category',
standalone: true,
template: `
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-header">
<h4 class="card-title">Create Category</h4>
</div>
<div class="card-body">
<p>ยินดีต้อนรับสู่หน้าสร้างหมวดหมู่</p>
<p>ระบบจัดการหมวดหมู่สำหรับ myHR-Plus</p>
</div>
</div>
</div>
</div>
</div>
`,
styles: [`
.card {
margin: 20px 0;
}
.card-header {
background-color: #f8f9fa;
border-bottom: 1px solid #dee2e6;
}
`]
})
export class MyhrPlusCreateCategoryComponent {
constructor() { }
}
import { Component, OnInit } from '@angular/core';
import { RouterOutlet } from '@angular/router';
@Component({
selector: 'app-myhr-plus',
templateUrl: './myhr-plus.component.html',
styleUrls: ['./myhr-plus.component.css']
standalone: true,
imports: [RouterOutlet],
template: `
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-header">
<h4 class="card-title">myHR-Plus</h4>
</div>
<div class="card-body">
<router-outlet></router-outlet>
</div>
</div>
</div>
</div>
</div>
`,
styles: [`
.card {
margin: 20px 0;
}
.card-header {
background-color: #f8f9fa;
border-bottom: 1px solid #dee2e6;
}
`]
})
export class MyhrPlusComponent implements OnInit {
......
import { Routes } from '@angular/router';
import { MyHrPermissionService } from './services/myhr-permission.service';
import { HrDashboardComponent } from './hr-dashboard.component';
import { MyhrPlusComponent } from './myhr-plus.component';
export const MYHR_PLUS_ROUTES: Routes = [
{
path: '',
component: MyhrPlusComponent,
// By providing the service here, a new instance is created when this route is loaded.
// It is available to this component and all its children, but not outside this module.
providers: [MyHrPermissionService],
......@@ -42,6 +44,14 @@ export const MYHR_PLUS_ROUTES: Routes = [
loadComponent: () => import('./org-chart/myhr-plus-org-chart.component').then(m => m.MyhrPlusOrgChartComponent)
},
{
path: 'create-category',
loadComponent: () => import('./category/myhr-plus-create-category.component').then(m => m.MyhrPlusCreateCategoryComponent)
},
{
path: 'excel-report',
loadComponent: () => import('./reports/myhr-plus-excel-report.component').then(m => m.MyhrPlusExcelReportComponent)
},
{
path: '',
redirectTo: 'dashboard',
pathMatch: 'full'
......
import { Component } from '@angular/core';
@Component({
selector: 'app-myhr-plus-excel-report',
standalone: true,
template: `
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-header">
<h4 class="card-title">Excel Report</h4>
</div>
<div class="card-body">
<p>ยินดีต้อนรับสู่หน้า Excel Report</p>
<p>ระบบสร้างรายงาน Excel สำหรับ myHR-Plus</p>
<div class="mt-3">
<button class="btn btn-primary me-2">สร้างรายงาน</button>
<button class="btn btn-secondary">ดาวน์โหลด Template</button>
</div>
</div>
</div>
</div>
</div>
</div>
`,
styles: [`
.card {
margin: 20px 0;
}
.card-header {
background-color: #f8f9fa;
border-bottom: 1px solid #dee2e6;
}
.btn {
padding: 8px 16px;
border: none;
border-radius: 4px;
cursor: pointer;
}
.btn-primary {
background-color: #007bff;
color: white;
}
.btn-secondary {
background-color: #6c757d;
color: white;
}
`]
})
export class MyhrPlusExcelReportComponent {
constructor() { }
}
......@@ -12,16 +12,6 @@ import { MenuPermissionManagementComponent } from './menu-permission-management/
export const portalManageRoutes: Routes = [
// Home/Dashboard Route
{
path: '',
component: HomeComponent,
pathMatch: 'full'
},
{
path: 'home',
component: HomeComponent
},
// === แอปพลิเคชันที่เข้าถึงได้ ===
// myHR-Plus Module
......
......@@ -103,29 +103,29 @@ export class NavService implements OnDestroy {
title: 'จัดเรียงแดชบอร์ด',
type: 'link'
},
{
path: `/portal-manage/${appName}/widget-warehouse`,
title: 'คลังวิดเจ็ต',
type: 'link'
},
{
path: `/portal-manage/${appName}/widget-linker`,
title: 'เชื่อมโยงวิดเจ็ตกับชุดข้อมูล',
icon: 'link',
type: 'link'
},
// {
// path: `/portal-manage/${appName}/widget-warehouse`,
// title: 'คลังวิดเจ็ต',
// type: 'link'
// },
// {
// path: `/portal-manage/${appName}/widget-linker`,
// title: 'เชื่อมโยงวิดเจ็ตกับชุดข้อมูล',
// icon: 'link',
// type: 'link'
// },
]
};
}
private createPortalMenu(appName: string): Menu[] {
return [{
icon: 'receipt',
path: `/${appName}/category-list`,
path: `/portal-manage/${appName}/category-list`,
title: 'รายการเอกสาร',
type: 'link',
}, {
icon: 'receipt',
path: `/${appName}/create-category`,
path: `/portal-manage/${appName}/create-category`,
title: 'รายการอัพโหลดเอกสาร',
type: 'link',
},
......@@ -135,8 +135,8 @@ export class NavService implements OnDestroy {
title: 'การจัดการ',
type: 'sub',
children: [
{ path: `/${appName}/category-list-approve`, title: 'รายการรอการอนุมัติ', type: 'link' },
{ path: `/${appName}/approved-list`, title: 'รายการผ่านการอนุมัติ', type: 'link' }
{ path: `/portal-manage/${appName}/category-list-approve`, title: 'รายการรอการอนุมัติ', type: 'link' },
{ path: `/portal-manage/${appName}/approved-list`, title: 'รายการผ่านการอนุมัติ', type: 'link' }
],
},
{
......@@ -145,19 +145,19 @@ export class NavService implements OnDestroy {
title: 'ตั้งรายงานเอ็กเซล',
type: 'sub',
children: [
{ path: `/${appName}/excel-list`, title: 'เพิ่มรายงาน Excel', type: 'link' },
{ path: `/portal-manage/${appName}/excel-list`, title: 'เพิ่มรายงาน Excel', type: 'link' },
{ path: `/${appName}/excel-report-toggle`, title: 'เปิด-ปิด การใช้รายงาน Excel', type: 'link' }
],
},
{
icon: 'data',
path: `/${appName}/datasource-table`,
path: `/portal-manage/${appName}/datasource-table`,
title: 'DataSource Table',
type: 'link',
},
{
icon: 'file',
path: `/${appName}/excel-report`,
path: `/portal-manage/${appName}/excel-report`,
title: 'รายงาน Excel',
type: 'link',
},]
......@@ -416,47 +416,13 @@ export class NavService implements OnDestroy {
return [
// myHR-Plus
{ headTitle: 'myHR-Plus' },
this.createDashboardMenu('myhr-plus'),
{
title: 'แดชบอร์ด',
icon: 'dashboard',
path: '/portal-manage/myhr-plus/dashboard',
type: 'link',
},
{
title: 'จัดการพนักงาน',
icon: 'users',
type: 'sub',
active: false,
children: [
{ path: '/portal-manage/myhr-plus/employee-management', title: 'จัดการข้อมูลพนักงาน', type: 'link' },
{ path: '/portal-manage/myhr-plus/attendance', title: 'ระบบลงเวลา', type: 'link' },
{ path: '/portal-manage/myhr-plus/leave-management', title: 'จัดการการลา', type: 'link' },
{ path: '/portal-manage/myhr-plus/payroll', title: 'ระบบเงินเดือน', type: 'link' },
],
},
{
title: 'จัดการองค์กร',
icon: 'building',
type: 'sub',
active: false,
children: [
{ path: '/portal-manage/myhr-plus/department', title: 'จัดการแผนก', type: 'link' },
{ path: '/portal-manage/myhr-plus/position', title: 'จัดการตำแหน่ง', type: 'link' },
{ path: '/portal-manage/myhr-plus/org-chart', title: 'แผนภูมิองค์กร', type: 'link' },
],
},
{
title: 'รายงาน',
icon: 'chart-bar',
type: 'sub',
active: false,
children: [
{ path: '/portal-manage/myhr-plus/hr-reports', title: 'รายงาน HR', type: 'link' },
{ path: '/portal-manage/myhr-plus/attendance-reports', title: 'รายงานการลงเวลา', type: 'link' },
{ path: '/portal-manage/myhr-plus/payroll-reports', title: 'รายงานเงินเดือน', type: 'link' },
],
},
this.createDashboardMenu('myhr-plus'),
...this.createPortalMenu('myhr-plus')
];
}
......
......@@ -3,7 +3,7 @@
// The list of file replacements can be found in `angular.json`.
export const environment = {
production: false,
apiUrl: 'http://localhost:3000/api', // Example API URL for development
apiUrl: 'https://portal.myhr.co.th/api/', // Example API URL for development
baseUrl: 'https://myjob-uat.myhr.co.th/api',
baseUrlMylearn: 'https://mylearn-uat.myhr.co.th/api',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment