diff --git a/Client/Pages/Index.razor b/Client/Pages/Index.razor
index a3927a3..bd65808 100644
--- a/Client/Pages/Index.razor
+++ b/Client/Pages/Index.razor
@@ -42,7 +42,7 @@ else
{
@if (shift.IsPngIcon)
{
-
+
}
else
{
diff --git a/Client/ShiftScheduler.Client.csproj b/Client/ShiftScheduler.Client.csproj
index 822d92e..840e903 100644
--- a/Client/ShiftScheduler.Client.csproj
+++ b/Client/ShiftScheduler.Client.csproj
@@ -16,4 +16,31 @@
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+
diff --git a/Client/wwwroot/icons/Bg.png b/Client/wwwroot/icons/Bg.png
new file mode 100644
index 0000000..a1b032e
Binary files /dev/null and b/Client/wwwroot/icons/Bg.png differ
diff --git a/Client/wwwroot/icons/F1.png b/Client/wwwroot/icons/F1.png
new file mode 100644
index 0000000..ced0130
Binary files /dev/null and b/Client/wwwroot/icons/F1.png differ
diff --git a/Client/wwwroot/icons/G1.png b/Client/wwwroot/icons/G1.png
new file mode 100644
index 0000000..2dbc8c1
Binary files /dev/null and b/Client/wwwroot/icons/G1.png differ
diff --git a/Client/wwwroot/icons/G2.png b/Client/wwwroot/icons/G2.png
new file mode 100644
index 0000000..df0a6f7
Binary files /dev/null and b/Client/wwwroot/icons/G2.png differ
diff --git a/Client/wwwroot/icons/G2TS.png b/Client/wwwroot/icons/G2TS.png
new file mode 100644
index 0000000..c40ed23
Binary files /dev/null and b/Client/wwwroot/icons/G2TS.png differ
diff --git a/Client/wwwroot/icons/Kompensation.png b/Client/wwwroot/icons/Kompensation.png
new file mode 100644
index 0000000..a005d55
Binary files /dev/null and b/Client/wwwroot/icons/Kompensation.png differ
diff --git a/Client/wwwroot/break-icon.png b/Client/wwwroot/icons/break-icon.png
similarity index 100%
rename from Client/wwwroot/break-icon.png
rename to Client/wwwroot/icons/break-icon.png
diff --git a/Services/PdfExportService.cs b/Services/PdfExportService.cs
index 37290f1..2a211df 100644
--- a/Services/PdfExportService.cs
+++ b/Services/PdfExportService.cs
@@ -103,21 +103,20 @@ namespace ShiftScheduler.Services
if (shift != null && shift.IsPngIcon)
{
// For PNG icons, embed the image
- var iconPath = Path.Combine(AppContext.BaseDirectory, "wwwroot", shift.Icon);
+ var iconPath = Path.Combine(AppContext.BaseDirectory, "wwwroot", "icons", shift.Icon);
if (File.Exists(iconPath))
{
- table.Cell().Element(CellStyleMiddle).Image(iconPath).FitArea();
+ table.Cell().Height(24).Element(CellStyleMiddle).Image(iconPath).FitArea();
}
else
{
- // Fallback to shift name if PNG not found
table.Cell().Element(CellStyleMiddle).Text(shift.Name);
}
}
else
{
// For text/emoji icons, render as text
- var icon = shift?.Icon ?? "";
+ var icon = shift?.Icon ?? shift?.Name;
table.Cell().Element(CellStyleMiddle).Text(icon);
}
}
@@ -126,23 +125,11 @@ namespace ShiftScheduler.Services
RenderEmptyCell(table);
}
- // Shifname
- foreach (var day in Enumerable.Range(0, dayInWeek))
- {
- var shiftWithTransport = shiftsWithTransport.GetValueOrDefault(weekDates.ElementAtOrDefault(day));
- var shiftName = shiftWithTransport?.Shift.Name ?? "";
- table.Cell().Element(CellStyleMiddle).Text(shiftName);
- }
- foreach (var day in Enumerable.Range(dayInWeek, 7 - dayInWeek))
- {
- RenderEmptyCell(table);
- }
-
// Morning times
foreach (var day in Enumerable.Range(0, dayInWeek))
{
var shiftWithTransport = shiftsWithTransport.GetValueOrDefault(weekDates.ElementAtOrDefault(day));
- var morningTime = $"🌅 {shiftWithTransport?.Shift.MorningTime}";
+ var morningTime = shiftWithTransport?.Shift.MorningTime.Length > 0 ? $"🌅 {shiftWithTransport?.Shift.MorningTime}" : "";
table.Cell().Element(CellStyleMiddle).Text(morningTime);
}
foreach (var day in Enumerable.Range(dayInWeek, 7 - dayInWeek))
@@ -154,7 +141,7 @@ namespace ShiftScheduler.Services
foreach (var day in Enumerable.Range(0, dayInWeek))
{
var shiftWithTransport = shiftsWithTransport.GetValueOrDefault(weekDates.ElementAtOrDefault(day));
- var afternoonTime = $"🌆 {shiftWithTransport?.Shift.AfternoonTime}";
+ var afternoonTime = shiftWithTransport?.Shift.AfternoonTime.Length > 0 ? $"🌆 {shiftWithTransport?.Shift.AfternoonTime}" : "";
table.Cell().Element(CellStyleMiddle).Text(afternoonTime);
}
foreach (var day in Enumerable.Range(dayInWeek, 7 - dayInWeek))
@@ -201,7 +188,7 @@ namespace ShiftScheduler.Services
transportLines.Add(afternoonInfo);
}
- return transportLines.Count > 0 ? string.Join("\n", transportLines) : "-";
+ return transportLines.Count > 0 ? string.Join("\n", transportLines) : "";
}
private static string FormatTransportConnection(TransportConnection transport)