Various CSS work
This commit is contained in:
parent
ef174af0e1
commit
15579acba8
52 changed files with 8001 additions and 944 deletions
|
|
@ -0,0 +1,151 @@
|
|||
@model PlanTempus.Application.Features.Employees.Components.EmployeeDetailGeneralViewModel
|
||||
|
||||
<swp-detail-grid>
|
||||
<!-- Left column -->
|
||||
<div>
|
||||
<!-- Contact Card -->
|
||||
<swp-card>
|
||||
<swp-section-label>@Model.LabelContact</swp-section-label>
|
||||
<swp-edit-section>
|
||||
<swp-edit-row>
|
||||
<swp-edit-label>@Model.LabelFullName</swp-edit-label>
|
||||
<swp-edit-value contenteditable="true">@Model.Name</swp-edit-value>
|
||||
</swp-edit-row>
|
||||
<swp-edit-row>
|
||||
<swp-edit-label>@Model.LabelEmail</swp-edit-label>
|
||||
<swp-edit-value contenteditable="true">@Model.Email</swp-edit-value>
|
||||
</swp-edit-row>
|
||||
<swp-edit-row>
|
||||
<swp-edit-label>@Model.LabelPhone</swp-edit-label>
|
||||
<swp-edit-value contenteditable="true">@Model.Phone</swp-edit-value>
|
||||
</swp-edit-row>
|
||||
<swp-edit-row>
|
||||
<swp-edit-label>@Model.LabelAddress</swp-edit-label>
|
||||
<swp-edit-value contenteditable="true">@Model.Address</swp-edit-value>
|
||||
</swp-edit-row>
|
||||
<swp-edit-row>
|
||||
<swp-edit-label>@Model.LabelPostalCity</swp-edit-label>
|
||||
<swp-edit-value contenteditable="true">@Model.PostalCity</swp-edit-value>
|
||||
</swp-edit-row>
|
||||
</swp-edit-section>
|
||||
</swp-card>
|
||||
|
||||
<!-- Personal Card -->
|
||||
<swp-card>
|
||||
<swp-section-label>@Model.LabelPersonal</swp-section-label>
|
||||
<swp-edit-section>
|
||||
<swp-edit-row>
|
||||
<swp-edit-label>@Model.LabelBirthDate</swp-edit-label>
|
||||
<swp-edit-value contenteditable="true">@Model.BirthDate</swp-edit-value>
|
||||
</swp-edit-row>
|
||||
<swp-edit-row>
|
||||
<swp-edit-label>@Model.LabelEmergencyContact</swp-edit-label>
|
||||
<swp-edit-value contenteditable="true">@Model.EmergencyContact</swp-edit-value>
|
||||
</swp-edit-row>
|
||||
<swp-edit-row>
|
||||
<swp-edit-label>@Model.LabelEmergencyPhone</swp-edit-label>
|
||||
<swp-edit-value contenteditable="true">@Model.EmergencyPhone</swp-edit-value>
|
||||
</swp-edit-row>
|
||||
</swp-edit-section>
|
||||
</swp-card>
|
||||
</div>
|
||||
|
||||
<!-- Right column -->
|
||||
<div>
|
||||
<!-- Employment Card -->
|
||||
<swp-card>
|
||||
<swp-section-label>@Model.LabelEmployment</swp-section-label>
|
||||
<swp-edit-section>
|
||||
<swp-edit-row>
|
||||
<swp-edit-label>@Model.LabelEmploymentDate</swp-edit-label>
|
||||
<swp-edit-value contenteditable="true">@Model.EmploymentDate</swp-edit-value>
|
||||
</swp-edit-row>
|
||||
<swp-edit-row>
|
||||
<swp-edit-label>@Model.LabelPosition</swp-edit-label>
|
||||
<swp-edit-value contenteditable="true">@Model.Position</swp-edit-value>
|
||||
</swp-edit-row>
|
||||
<swp-edit-row>
|
||||
<swp-edit-label>@Model.LabelEmploymentType</swp-edit-label>
|
||||
<swp-edit-value contenteditable="true">@Model.EmploymentType</swp-edit-value>
|
||||
</swp-edit-row>
|
||||
<swp-edit-row>
|
||||
<swp-edit-label>@Model.LabelHoursPerWeek</swp-edit-label>
|
||||
<swp-edit-value contenteditable="true">@Model.HoursPerWeek</swp-edit-value>
|
||||
</swp-edit-row>
|
||||
</swp-edit-section>
|
||||
</swp-card>
|
||||
|
||||
<!-- Settings Card -->
|
||||
<swp-card>
|
||||
<swp-section-label>@Model.LabelSettings</swp-section-label>
|
||||
<swp-toggle-row>
|
||||
<div>
|
||||
<swp-toggle-label>@Model.SettingShowInBooking</swp-toggle-label>
|
||||
<swp-toggle-description>@Model.SettingShowInBookingDesc</swp-toggle-description>
|
||||
</div>
|
||||
<swp-toggle-slider data-value="yes">
|
||||
<swp-toggle-option>@Model.ToggleYes</swp-toggle-option>
|
||||
<swp-toggle-option>@Model.ToggleNo</swp-toggle-option>
|
||||
</swp-toggle-slider>
|
||||
</swp-toggle-row>
|
||||
<swp-toggle-row>
|
||||
<div>
|
||||
<swp-toggle-label>@Model.SettingSmsReminders</swp-toggle-label>
|
||||
<swp-toggle-description>@Model.SettingSmsRemindersDesc</swp-toggle-description>
|
||||
</div>
|
||||
<swp-toggle-slider data-value="yes">
|
||||
<swp-toggle-option>@Model.ToggleYes</swp-toggle-option>
|
||||
<swp-toggle-option>@Model.ToggleNo</swp-toggle-option>
|
||||
</swp-toggle-slider>
|
||||
</swp-toggle-row>
|
||||
<swp-toggle-row>
|
||||
<div>
|
||||
<swp-toggle-label>@Model.SettingEditCalendar</swp-toggle-label>
|
||||
<swp-toggle-description>@Model.SettingEditCalendarDesc</swp-toggle-description>
|
||||
</div>
|
||||
<swp-toggle-slider data-value="yes">
|
||||
<swp-toggle-option>@Model.ToggleYes</swp-toggle-option>
|
||||
<swp-toggle-option>@Model.ToggleNo</swp-toggle-option>
|
||||
</swp-toggle-slider>
|
||||
</swp-toggle-row>
|
||||
</swp-card>
|
||||
|
||||
<!-- Notifications Card -->
|
||||
<swp-card>
|
||||
<swp-section-label>@Model.LabelNotifications</swp-section-label>
|
||||
<swp-notification-intro>@Model.NotificationsIntro</swp-notification-intro>
|
||||
<swp-checkbox-list>
|
||||
<swp-checkbox-row class="checked">
|
||||
<swp-checkbox-box>
|
||||
<svg viewBox="0 0 24 24"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>
|
||||
</swp-checkbox-box>
|
||||
<swp-checkbox-text>@Model.NotifOnlineBooking</swp-checkbox-text>
|
||||
</swp-checkbox-row>
|
||||
<swp-checkbox-row class="checked">
|
||||
<swp-checkbox-box>
|
||||
<svg viewBox="0 0 24 24"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>
|
||||
</swp-checkbox-box>
|
||||
<swp-checkbox-text>@Model.NotifManualBooking</swp-checkbox-text>
|
||||
</swp-checkbox-row>
|
||||
<swp-checkbox-row>
|
||||
<swp-checkbox-box>
|
||||
<svg viewBox="0 0 24 24"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>
|
||||
</swp-checkbox-box>
|
||||
<swp-checkbox-text>@Model.NotifCancellation</swp-checkbox-text>
|
||||
</swp-checkbox-row>
|
||||
<swp-checkbox-row>
|
||||
<swp-checkbox-box>
|
||||
<svg viewBox="0 0 24 24"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>
|
||||
</swp-checkbox-box>
|
||||
<swp-checkbox-text>@Model.NotifWaitlist</swp-checkbox-text>
|
||||
</swp-checkbox-row>
|
||||
<swp-checkbox-row class="checked">
|
||||
<swp-checkbox-box>
|
||||
<svg viewBox="0 0 24 24"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>
|
||||
</swp-checkbox-box>
|
||||
<swp-checkbox-text>@Model.NotifDailySummary</swp-checkbox-text>
|
||||
</swp-checkbox-row>
|
||||
</swp-checkbox-list>
|
||||
</swp-card>
|
||||
</div>
|
||||
</swp-detail-grid>
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using PlanTempus.Application.Features.Localization.Services;
|
||||
|
||||
namespace PlanTempus.Application.Features.Employees.Components;
|
||||
|
||||
public class EmployeeDetailGeneralViewComponent : ViewComponent
|
||||
{
|
||||
private readonly ILocalizationService _localization;
|
||||
|
||||
public EmployeeDetailGeneralViewComponent(ILocalizationService localization)
|
||||
{
|
||||
_localization = localization;
|
||||
}
|
||||
|
||||
public IViewComponentResult Invoke(string key)
|
||||
{
|
||||
var employee = EmployeeDetailCatalog.Get(key);
|
||||
|
||||
var model = new EmployeeDetailGeneralViewModel
|
||||
{
|
||||
// Contact
|
||||
Name = employee.Name,
|
||||
Email = employee.Email,
|
||||
Phone = employee.Phone,
|
||||
Address = employee.Address,
|
||||
PostalCity = employee.PostalCity,
|
||||
|
||||
// Personal
|
||||
BirthDate = employee.BirthDate,
|
||||
EmergencyContact = employee.EmergencyContact,
|
||||
EmergencyPhone = employee.EmergencyPhone,
|
||||
|
||||
// Employment
|
||||
EmploymentDate = employee.EmploymentDate,
|
||||
Position = employee.Position,
|
||||
EmploymentType = employee.EmploymentType,
|
||||
HoursPerWeek = employee.HoursPerWeek,
|
||||
|
||||
// Labels
|
||||
LabelContact = _localization.Get("employees.detail.contact"),
|
||||
LabelPersonal = _localization.Get("employees.detail.personal"),
|
||||
LabelEmployment = _localization.Get("employees.detail.employment"),
|
||||
LabelFullName = _localization.Get("employees.detail.fullname"),
|
||||
LabelEmail = _localization.Get("employees.detail.email"),
|
||||
LabelPhone = _localization.Get("employees.detail.phone"),
|
||||
LabelAddress = _localization.Get("employees.detail.address"),
|
||||
LabelPostalCity = _localization.Get("employees.detail.postalcity"),
|
||||
LabelBirthDate = _localization.Get("employees.detail.birthdate"),
|
||||
LabelEmergencyContact = _localization.Get("employees.detail.emergencycontact"),
|
||||
LabelEmergencyPhone = _localization.Get("employees.detail.emergencyphone"),
|
||||
LabelEmploymentDate = _localization.Get("employees.detail.employmentdate"),
|
||||
LabelPosition = _localization.Get("employees.detail.position"),
|
||||
LabelEmploymentType = _localization.Get("employees.detail.employmenttype"),
|
||||
LabelHoursPerWeek = _localization.Get("employees.detail.hoursperweek"),
|
||||
|
||||
// Settings
|
||||
LabelSettings = _localization.Get("employees.detail.settings.label"),
|
||||
SettingShowInBooking = _localization.Get("employees.detail.settings.showinbooking.label"),
|
||||
SettingShowInBookingDesc = _localization.Get("employees.detail.settings.showinbooking.desc"),
|
||||
SettingSmsReminders = _localization.Get("employees.detail.settings.smsreminders.label"),
|
||||
SettingSmsRemindersDesc = _localization.Get("employees.detail.settings.smsreminders.desc"),
|
||||
SettingEditCalendar = _localization.Get("employees.detail.settings.editcalendar.label"),
|
||||
SettingEditCalendarDesc = _localization.Get("employees.detail.settings.editcalendar.desc"),
|
||||
ToggleYes = _localization.Get("common.yes"),
|
||||
ToggleNo = _localization.Get("common.no"),
|
||||
|
||||
// Notifications
|
||||
LabelNotifications = _localization.Get("employees.detail.notifications.label"),
|
||||
NotificationsIntro = _localization.Get("employees.detail.notifications.intro"),
|
||||
NotifOnlineBooking = _localization.Get("employees.detail.notifications.onlinebooking"),
|
||||
NotifManualBooking = _localization.Get("employees.detail.notifications.manualbooking"),
|
||||
NotifCancellation = _localization.Get("employees.detail.notifications.cancellation"),
|
||||
NotifWaitlist = _localization.Get("employees.detail.notifications.waitlist"),
|
||||
NotifDailySummary = _localization.Get("employees.detail.notifications.dailysummary")
|
||||
};
|
||||
|
||||
return View(model);
|
||||
}
|
||||
}
|
||||
|
||||
public class EmployeeDetailGeneralViewModel
|
||||
{
|
||||
// Contact
|
||||
public required string Name { get; init; }
|
||||
public required string Email { get; init; }
|
||||
public required string Phone { get; init; }
|
||||
public required string Address { get; init; }
|
||||
public required string PostalCity { get; init; }
|
||||
|
||||
// Personal
|
||||
public required string BirthDate { get; init; }
|
||||
public required string EmergencyContact { get; init; }
|
||||
public required string EmergencyPhone { get; init; }
|
||||
|
||||
// Employment
|
||||
public required string EmploymentDate { get; init; }
|
||||
public required string Position { get; init; }
|
||||
public required string EmploymentType { get; init; }
|
||||
public required string HoursPerWeek { get; init; }
|
||||
|
||||
// Labels
|
||||
public required string LabelContact { get; init; }
|
||||
public required string LabelPersonal { get; init; }
|
||||
public required string LabelEmployment { get; init; }
|
||||
public required string LabelFullName { get; init; }
|
||||
public required string LabelEmail { get; init; }
|
||||
public required string LabelPhone { get; init; }
|
||||
public required string LabelAddress { get; init; }
|
||||
public required string LabelPostalCity { get; init; }
|
||||
public required string LabelBirthDate { get; init; }
|
||||
public required string LabelEmergencyContact { get; init; }
|
||||
public required string LabelEmergencyPhone { get; init; }
|
||||
public required string LabelEmploymentDate { get; init; }
|
||||
public required string LabelPosition { get; init; }
|
||||
public required string LabelEmploymentType { get; init; }
|
||||
public required string LabelHoursPerWeek { get; init; }
|
||||
|
||||
// Settings
|
||||
public required string LabelSettings { get; init; }
|
||||
public required string SettingShowInBooking { get; init; }
|
||||
public required string SettingShowInBookingDesc { get; init; }
|
||||
public required string SettingSmsReminders { get; init; }
|
||||
public required string SettingSmsRemindersDesc { get; init; }
|
||||
public required string SettingEditCalendar { get; init; }
|
||||
public required string SettingEditCalendarDesc { get; init; }
|
||||
public required string ToggleYes { get; init; }
|
||||
public required string ToggleNo { get; init; }
|
||||
|
||||
// Notifications
|
||||
public required string LabelNotifications { get; init; }
|
||||
public required string NotificationsIntro { get; init; }
|
||||
public required string NotifOnlineBooking { get; init; }
|
||||
public required string NotifManualBooking { get; init; }
|
||||
public required string NotifCancellation { get; init; }
|
||||
public required string NotifWaitlist { get; init; }
|
||||
public required string NotifDailySummary { get; init; }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue