Intranet düzenlemesi
This commit is contained in:
parent
204d7108fc
commit
d9c718fb4e
8 changed files with 179 additions and 168 deletions
|
|
@ -7817,7 +7817,7 @@
|
|||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Intranet.Training",
|
||||
"key": "App.Hr.Training",
|
||||
"tr": "Eğitimler",
|
||||
"en": "Trainings"
|
||||
},
|
||||
|
|
@ -14557,16 +14557,6 @@
|
|||
"RequiredPermissionName": "App.Intranet.Events.Event",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Intranet",
|
||||
"Code": "App.Intranet.Training",
|
||||
"DisplayName": "App.Intranet.Training",
|
||||
"Order": 2,
|
||||
"Url": "/admin/list/list-training",
|
||||
"Icon": "FcGraduationCap",
|
||||
"RequiredPermissionName": "App.Intranet.Training",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Intranet",
|
||||
"Code": "App.Intranet.Meal",
|
||||
|
|
@ -15427,6 +15417,16 @@
|
|||
"RequiredPermissionName": "App.Hr.Performance360",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Hr",
|
||||
"Code": "App.Hr.Training",
|
||||
"DisplayName": "App.Hr.Training",
|
||||
"Order": 13,
|
||||
"Url": "/admin/list/list-training",
|
||||
"Icon": "FcGraduationCap",
|
||||
"RequiredPermissionName": "App.Hr.Training",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": null,
|
||||
"Code": "App.Mrp",
|
||||
|
|
@ -24685,6 +24685,69 @@
|
|||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Hr",
|
||||
"Name": "App.Hr.Training",
|
||||
"ParentName": null,
|
||||
"DisplayName": "App.Hr.Training",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Hr",
|
||||
"Name": "App.Hr.Training.Create",
|
||||
"ParentName": "App.Hr.Training",
|
||||
"DisplayName": "Create",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Hr",
|
||||
"Name": "App.Hr.Training.Update",
|
||||
"ParentName": "App.Hr.Training",
|
||||
"DisplayName": "Update",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Hr",
|
||||
"Name": "App.Hr.Training.Delete",
|
||||
"ParentName": "App.Hr.Training",
|
||||
"DisplayName": "Delete",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Hr",
|
||||
"Name": "App.Hr.Training.Export",
|
||||
"ParentName": "App.Hr.Training",
|
||||
"DisplayName": "Export",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Hr",
|
||||
"Name": "App.Hr.Training.Import",
|
||||
"ParentName": "App.Hr.Training",
|
||||
"DisplayName": "Import",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Hr",
|
||||
"Name": "App.Hr.Training.Activity",
|
||||
"ParentName": "App.Hr.Training",
|
||||
"DisplayName": "Activity",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Hr",
|
||||
"Name": "App.Hr.CostCenter",
|
||||
|
|
@ -25063,69 +25126,6 @@
|
|||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Kurs"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Intranet",
|
||||
"Name": "App.Intranet.Training",
|
||||
"ParentName": null,
|
||||
"DisplayName": "App.Intranet.Training",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Intranet",
|
||||
"Name": "App.Intranet.Training.Create",
|
||||
"ParentName": "App.Intranet.Training",
|
||||
"DisplayName": "Create",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Intranet",
|
||||
"Name": "App.Intranet.Training.Update",
|
||||
"ParentName": "App.Intranet.Training",
|
||||
"DisplayName": "Update",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Intranet",
|
||||
"Name": "App.Intranet.Training.Delete",
|
||||
"ParentName": "App.Intranet.Training",
|
||||
"DisplayName": "Delete",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Intranet",
|
||||
"Name": "App.Intranet.Training.Export",
|
||||
"ParentName": "App.Intranet.Training",
|
||||
"DisplayName": "Export",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Intranet",
|
||||
"Name": "App.Intranet.Training.Import",
|
||||
"ParentName": "App.Intranet.Training",
|
||||
"DisplayName": "Import",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Intranet",
|
||||
"Name": "App.Intranet.Training.Activity",
|
||||
"ParentName": "App.Intranet.Training",
|
||||
"DisplayName": "Activity",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Intranet",
|
||||
"Name": "App.Intranet.Meal",
|
||||
|
|
|
|||
|
|
@ -37815,13 +37815,13 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
}),
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = ListFormCodes.Lists.Training,
|
||||
Name = AppCodes.Intranet.Training,
|
||||
Title = AppCodes.Intranet.Training,
|
||||
Name = AppCodes.Hr.Training,
|
||||
Title = AppCodes.Hr.Training,
|
||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||
IsTenant = true,
|
||||
IsBranch = false,
|
||||
IsOrganizationUnit = false,
|
||||
Description = AppCodes.Intranet.Training,
|
||||
Description = AppCodes.Hr.Training,
|
||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Training)),
|
||||
KeyFieldName = "Id",
|
||||
|
|
@ -37848,13 +37848,13 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto
|
||||
{
|
||||
C = AppCodes.Intranet.Training + ".Create",
|
||||
R = AppCodes.Intranet.Training,
|
||||
U = AppCodes.Intranet.Training + ".Update",
|
||||
D = AppCodes.Intranet.Training + ".Delete",
|
||||
E = AppCodes.Intranet.Training + ".Export",
|
||||
I = AppCodes.Intranet.Training + ".Import",
|
||||
A = AppCodes.Intranet.Training + ".Activity",
|
||||
C = AppCodes.Hr.Training + ".Create",
|
||||
R = AppCodes.Hr.Training,
|
||||
U = AppCodes.Hr.Training + ".Update",
|
||||
D = AppCodes.Hr.Training + ".Delete",
|
||||
E = AppCodes.Hr.Training + ".Export",
|
||||
I = AppCodes.Hr.Training + ".Import",
|
||||
A = AppCodes.Hr.Training + ".Activity",
|
||||
}),
|
||||
DeleteCommand = $"UPDATE \"{TableNameResolver.GetFullTableName(nameof(TableNameEnum.Training))}\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id",
|
||||
DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
|
|
@ -37949,7 +37949,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
new CommandColumnDto() {
|
||||
Hint = "Sertifikalar",
|
||||
Text = "Sertifikalar",
|
||||
AuthName = AppCodes.Intranet.Training + ".Update",
|
||||
AuthName = AppCodes.Hr.Training + ".Update",
|
||||
DialogName = "TrainingCertificates",
|
||||
DialogParameters = JsonSerializer.Serialize(new {
|
||||
name = "@Email",
|
||||
|
|
@ -37984,9 +37984,9 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Intranet.Training + ".Create",
|
||||
R = AppCodes.Intranet.Training,
|
||||
U = AppCodes.Intranet.Training + ".Update",
|
||||
C = AppCodes.Hr.Training + ".Create",
|
||||
R = AppCodes.Hr.Training,
|
||||
U = AppCodes.Hr.Training + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
|
|
@ -38018,9 +38018,9 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Intranet.Training + ".Create",
|
||||
R = AppCodes.Intranet.Training,
|
||||
U = AppCodes.Intranet.Training + ".Update",
|
||||
C = AppCodes.Hr.Training + ".Create",
|
||||
R = AppCodes.Hr.Training,
|
||||
U = AppCodes.Hr.Training + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
|
|
@ -38049,9 +38049,9 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Intranet.Training + ".Create",
|
||||
R = AppCodes.Intranet.Training,
|
||||
U = AppCodes.Intranet.Training + ".Update",
|
||||
C = AppCodes.Hr.Training + ".Create",
|
||||
R = AppCodes.Hr.Training,
|
||||
U = AppCodes.Hr.Training + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
|
|
@ -38083,9 +38083,9 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Intranet.Training + ".Create",
|
||||
R = AppCodes.Intranet.Training,
|
||||
U = AppCodes.Intranet.Training + ".Update",
|
||||
C = AppCodes.Hr.Training + ".Create",
|
||||
R = AppCodes.Hr.Training,
|
||||
U = AppCodes.Hr.Training + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
|
|
@ -38130,9 +38130,9 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Intranet.Training + ".Create",
|
||||
R = AppCodes.Intranet.Training,
|
||||
U = AppCodes.Intranet.Training + ".Update",
|
||||
C = AppCodes.Hr.Training + ".Create",
|
||||
R = AppCodes.Hr.Training,
|
||||
U = AppCodes.Hr.Training + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
|
|
@ -38175,9 +38175,9 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Intranet.Training + ".Create",
|
||||
R = AppCodes.Intranet.Training,
|
||||
U = AppCodes.Intranet.Training + ".Update",
|
||||
C = AppCodes.Hr.Training + ".Create",
|
||||
R = AppCodes.Hr.Training,
|
||||
U = AppCodes.Hr.Training + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
|
|
@ -38206,9 +38206,9 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Intranet.Training + ".Create",
|
||||
R = AppCodes.Intranet.Training,
|
||||
U = AppCodes.Intranet.Training + ".Update",
|
||||
C = AppCodes.Hr.Training + ".Create",
|
||||
R = AppCodes.Hr.Training,
|
||||
U = AppCodes.Hr.Training + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
|
|
@ -38237,9 +38237,9 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Intranet.Training + ".Create",
|
||||
R = AppCodes.Intranet.Training,
|
||||
U = AppCodes.Intranet.Training + ".Update",
|
||||
C = AppCodes.Hr.Training + ".Create",
|
||||
R = AppCodes.Hr.Training,
|
||||
U = AppCodes.Hr.Training + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
|
|
@ -38268,9 +38268,9 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Intranet.Training + ".Create",
|
||||
R = AppCodes.Intranet.Training,
|
||||
U = AppCodes.Intranet.Training + ".Update",
|
||||
C = AppCodes.Hr.Training + ".Create",
|
||||
R = AppCodes.Hr.Training,
|
||||
U = AppCodes.Hr.Training + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
|
|
@ -38302,9 +38302,9 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Intranet.Training + ".Create",
|
||||
R = AppCodes.Intranet.Training,
|
||||
U = AppCodes.Intranet.Training + ".Update",
|
||||
C = AppCodes.Hr.Training + ".Create",
|
||||
R = AppCodes.Hr.Training,
|
||||
U = AppCodes.Hr.Training + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
|
|
@ -38336,9 +38336,9 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Intranet.Training + ".Create",
|
||||
R = AppCodes.Intranet.Training,
|
||||
U = AppCodes.Intranet.Training + ".Update",
|
||||
C = AppCodes.Hr.Training + ".Create",
|
||||
R = AppCodes.Hr.Training,
|
||||
U = AppCodes.Hr.Training + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
|
|
@ -38367,9 +38367,9 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Intranet.Training + ".Create",
|
||||
R = AppCodes.Intranet.Training,
|
||||
U = AppCodes.Intranet.Training + ".Update",
|
||||
C = AppCodes.Hr.Training + ".Create",
|
||||
R = AppCodes.Hr.Training,
|
||||
U = AppCodes.Hr.Training + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
|
|
@ -38398,9 +38398,9 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Intranet.Training + ".Create",
|
||||
R = AppCodes.Intranet.Training,
|
||||
U = AppCodes.Intranet.Training + ".Update",
|
||||
C = AppCodes.Hr.Training + ".Create",
|
||||
R = AppCodes.Hr.Training,
|
||||
U = AppCodes.Hr.Training + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
|
|
@ -38440,9 +38440,9 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Intranet.Training + ".Create",
|
||||
R = AppCodes.Intranet.Training,
|
||||
U = AppCodes.Intranet.Training + ".Update",
|
||||
C = AppCodes.Hr.Training + ".Create",
|
||||
R = AppCodes.Hr.Training,
|
||||
U = AppCodes.Hr.Training + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
|
|
|
|||
|
|
@ -453,7 +453,6 @@ public static class SeedConsts
|
|||
public const string EventType = Events + ".EventType";
|
||||
public const string EventCategory = Events + ".EventCategory";
|
||||
public const string Event = Events + ".Event";
|
||||
public const string Training = Default + ".Training";
|
||||
public const string Meal = Default + ".Meal";
|
||||
public const string Reservation = Default + ".Reservation";
|
||||
public const string ShuttleRoute = Default + ".ShuttleRoute";
|
||||
|
|
@ -464,6 +463,7 @@ public static class SeedConsts
|
|||
public static class Hr
|
||||
{
|
||||
public const string Default = Prefix.App + ".Hr";
|
||||
public const string Training = Default + ".Training";
|
||||
public const string Department = Default + ".Department";
|
||||
public const string Employee = Default + ".Employee";
|
||||
public const string JobPosition = Default + ".JobPosition";
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
|||
namespace Kurs.Platform.Migrations
|
||||
{
|
||||
[DbContext(typeof(PlatformDbContext))]
|
||||
[Migration("20251025202511_Initial")]
|
||||
[Migration("20251025204259_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
|
@ -593,7 +593,7 @@ export const mockCertificates: Certificate[] = [
|
|||
export const mockMealMenus: MealMenu[] = [
|
||||
{
|
||||
id: 'menu1',
|
||||
date: new Date('2025-10-20'),
|
||||
date: new Date('2025-10-27'),
|
||||
dayOfWeek: 'Pazartesi',
|
||||
meals: [
|
||||
{
|
||||
|
|
@ -605,7 +605,7 @@ export const mockMealMenus: MealMenu[] = [
|
|||
},
|
||||
{
|
||||
id: 'menu2',
|
||||
date: new Date('2025-10-21'),
|
||||
date: new Date('2025-10-28'),
|
||||
dayOfWeek: 'Salı',
|
||||
meals: [
|
||||
{
|
||||
|
|
@ -617,7 +617,7 @@ export const mockMealMenus: MealMenu[] = [
|
|||
},
|
||||
{
|
||||
id: 'menu3',
|
||||
date: new Date('2025-10-22'),
|
||||
date: new Date('2025-10-29'),
|
||||
dayOfWeek: 'Çarşamba',
|
||||
meals: [
|
||||
{
|
||||
|
|
@ -629,7 +629,7 @@ export const mockMealMenus: MealMenu[] = [
|
|||
},
|
||||
{
|
||||
id: 'menu4',
|
||||
date: new Date('2025-10-23'),
|
||||
date: new Date('2025-10-30'),
|
||||
dayOfWeek: 'Perşembe',
|
||||
meals: [
|
||||
{
|
||||
|
|
@ -641,7 +641,7 @@ export const mockMealMenus: MealMenu[] = [
|
|||
},
|
||||
{
|
||||
id: 'menu5',
|
||||
date: new Date('2025-10-24'),
|
||||
date: new Date('2025-10-31'),
|
||||
dayOfWeek: 'Cuma',
|
||||
meals: [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ const IntranetDashboard: React.FC = () => {
|
|||
<ActiveReservations onNewReservation={() => setShowReservationModal(true)} />
|
||||
<ActiveSurveys onTakeSurvey={handleTakeSurvey} />
|
||||
<Visitors />
|
||||
<ExpenseManagement onNewExpense={() => setShowExpenseModal(true)} />
|
||||
</div>
|
||||
|
||||
<div className="lg:col-span-5 space-y-6">
|
||||
|
|
@ -109,7 +110,6 @@ const IntranetDashboard: React.FC = () => {
|
|||
<ShuttleSchedule />
|
||||
<LeaveManagement onNewLeave={() => setShowLeaveModal(true)} />
|
||||
<OvertimeManagement onNewOvertime={() => setShowOvertimeModal(true)} />
|
||||
<ExpenseManagement onNewExpense={() => setShowExpenseModal(true)} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { FaUtensils } from 'react-icons/fa'
|
|||
import dayjs from 'dayjs'
|
||||
import isBetween from 'dayjs/plugin/isBetween'
|
||||
import { mockMealMenus } from '../../../mocks/mockIntranet'
|
||||
import { Badge } from '@/components/ui'
|
||||
|
||||
dayjs.extend(isBetween)
|
||||
|
||||
|
|
@ -25,47 +26,57 @@ const MealWeeklyMenu: React.FC = () => {
|
|||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div className="divide-y divide-gray-200 dark:divide-gray-700">
|
||||
{mealWeekMenus.map((menu) => {
|
||||
const isToday = dayjs(menu.date).isSame(dayjs(), 'day')
|
||||
return (
|
||||
<div
|
||||
key={menu.id}
|
||||
className={`p-4 hover:bg-gray-50 dark:hover:bg-gray-700/50 transition-colors ${
|
||||
isToday ? 'bg-orange-50 dark:bg-orange-900/20' : ''
|
||||
}`}
|
||||
>
|
||||
<div className="flex items-start justify-between mb-2">
|
||||
<div>
|
||||
<h3 className="text-sm font-semibold text-gray-900 dark:text-white flex items-center gap-2">
|
||||
{menu.dayOfWeek}
|
||||
{mealWeekMenus.length > 0 ? (
|
||||
<div className="divide-y divide-gray-200 dark:divide-gray-700">
|
||||
{mealWeekMenus.map((menu) => {
|
||||
const isToday = dayjs(menu.date).isSame(dayjs(), 'day')
|
||||
return (
|
||||
<div
|
||||
key={menu.id}
|
||||
className={`p-4 hover:bg-gray-50 dark:hover:bg-gray-700/50 transition-colors ${
|
||||
isToday ? 'bg-orange-50 dark:bg-orange-900/20' : ''
|
||||
}`}
|
||||
>
|
||||
<div className="flex items-center justify-between mb-2">
|
||||
<div className="flex items-center gap-2">
|
||||
<h3 className="text-sm font-semibold text-gray-900 dark:text-white">
|
||||
{dayjs(menu.date).format('DD MMMM')} {menu.dayOfWeek}
|
||||
</h3>
|
||||
{isToday && (
|
||||
<span className="text-xs bg-orange-500 text-white px-2 py-0.5 rounded-full">
|
||||
Bugün
|
||||
</span>
|
||||
)}
|
||||
</h3>
|
||||
<p className="text-xs text-gray-500 dark:text-gray-400">
|
||||
{dayjs(menu.date).format('DD MMMM')}
|
||||
</p>
|
||||
</div>
|
||||
{menu.meals[0]?.calories && (
|
||||
<div className="flex items-center gap-1.5 text-xs text-gray-500 dark:text-gray-400">
|
||||
{menu.meals[0].calories} kcal
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="flex flex-wrap gap-2">
|
||||
{menu.meals[0]?.items.map((item, idx) => (
|
||||
<Badge key={idx} content={item} className='bg-red-500' />
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div className="space-y-1">
|
||||
{menu.meals[0]?.items.slice(0, 3).map((item, idx) => (
|
||||
<p key={idx} className="text-xs text-gray-600 dark:text-gray-400">
|
||||
• {item}
|
||||
</p>
|
||||
))}
|
||||
{menu.meals[0]?.items.length > 3 && (
|
||||
<p className="text-xs text-gray-500 dark:text-gray-500">
|
||||
+{menu.meals[0].items.length - 3} daha...
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
) : (
|
||||
<div className="p-8 text-center">
|
||||
<div className="flex flex-col items-center gap-3">
|
||||
<div className="w-16 h-16 bg-gray-100 dark:bg-gray-700 rounded-full flex items-center justify-center">
|
||||
<FaUtensils className="w-8 h-8 text-gray-400 dark:text-gray-500" />
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
<div className="space-y-1">
|
||||
<p className="text-xs text-gray-500 dark:text-gray-400">
|
||||
Haftalık menü henüz hazırlanmamış. Lütfen daha sonra tekrar kontrol edin.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue