mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 17:43:12 +00:00
- Replace all Contacts.Name with (FirstName + " " + LastName) pattern - Fix ContactService, Index.razor, QuotesPDF, QuotesDetails, CreateQuotes - Fix WorkOrderPDF, Viewworkorder, UserViewWordOrder, Addworkorders - Fix ViewTemplate, AddTemplate, Templates settings pages - Blazor project now builds successfully
218 lines
8.6 KiB
Text
218 lines
8.6 KiB
Text
<html style="background-color: #1a2035">
|
|
<body style="background-color: #1a2035;color: white;">
|
|
|
|
<style>
|
|
/* html {
|
|
-webkit-print-color-adjust: exact;
|
|
} */
|
|
|
|
p {
|
|
margin: 5px !important;
|
|
}
|
|
|
|
h6 {
|
|
margin: 5px !important;
|
|
}
|
|
|
|
|
|
|
|
</style>
|
|
<div class="card-body p-3" style="background-color: #1a2035;padding:10px">
|
|
<div class="row mt-2">
|
|
<div class="text-end">
|
|
<p style="color:#FCFF97;text-align:center;font-size:17px;font-size:20px">Work Order</p>
|
|
|
|
</div>
|
|
<div class="row ">
|
|
<div class="col-12 text-center" style="text-align:center">
|
|
<img src="data:image/png;base64,@base64Image" class="navbar-brand-img h-90 img-fluid" alt="main_logo">
|
|
<p class="text-info mb-0">80 Orville Dr</p>
|
|
<p class="mb-0"><i class="fa fa-map-marker me-1"></i> Bohemia, NY 11716</p>
|
|
<p class="mb-0"><i class="fa fa-phone me-1"></i> 516-699-2092/631-334-2594</p>
|
|
<p class="mb-0"><i class="fa fa-envelope me-1"></i> Info@seahavenindustries.com</p>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="row my-3" style="margin-top:20px">
|
|
<div class="col-md-6"><p style="font-size:20px"> Work Order Title: @order.WorkerOrderTitle</p></div>
|
|
<div>
|
|
<div class="col-6" style="width:50%"><p>WO ID: <span style="color:#9ED1ED;margin-left:10px"> @order.WorkerOrderNumber</span></p></div>
|
|
<div class="col-6" style="width:50%">
|
|
<p>
|
|
Due Date: <span style="color:#9ED1ED;margin-left:10px">
|
|
@if (order.DueDate != null)
|
|
{
|
|
@order.DueDate.Value.ToString("MMM dd yyyy")
|
|
}
|
|
</span>
|
|
</p>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card mb-2 cardbg">
|
|
|
|
<div class="card-body ">
|
|
|
|
<div class="row">
|
|
<div class="col-md-12 text-white">
|
|
<div class="row">
|
|
<div class="col-4">
|
|
<p class="mb-1" style="color: white !important;">
|
|
Status :
|
|
|
|
<span style="margin-left:15px">@selectedStatus</span>
|
|
|
|
</p>
|
|
<p class="mb-1" style="color: white !important;">
|
|
Assigned To:
|
|
@if (order.AssignToUser != null)
|
|
{
|
|
<span style="margin-left:15px">@order.AssignToUser.FirstName</span>
|
|
}
|
|
</p>
|
|
<p class="mb-1" style="color: white !important;">
|
|
Location:
|
|
@if (order.Locations != null)
|
|
{
|
|
<span style="margin-left:15px">
|
|
@order.Locations.Name
|
|
</span>
|
|
}
|
|
|
|
</p>
|
|
<p class="mb-1" style="color: white !important;">
|
|
PO #:
|
|
@if (order.PO != "" && order.PO != null)
|
|
{
|
|
<span style="margin-left:15px">@order.PO</span>
|
|
}
|
|
</p>
|
|
<p class="mb-1" style="color: white !important;">
|
|
TT #:
|
|
@if (order.TT != "" && order.TT != null)
|
|
{
|
|
<span style="margin-left:15px">@order.TT</span>
|
|
}
|
|
</p>
|
|
|
|
<p class="mb-1" style="color: white !important;">
|
|
Categories: <span style="margin-left:15px">
|
|
@if (order.WorkOrderCategories != null)
|
|
{
|
|
foreach (var itm in order.WorkOrderCategories)
|
|
{
|
|
<span class="me-2">@itm.Category.Name ,</span>
|
|
}
|
|
}
|
|
</span>
|
|
</p>
|
|
<p class="mb-1" style="color: white !important;">Priority: <span style="margin-left:15px">@order.Priority</span></p>
|
|
</div>
|
|
<div style="display:flex;flex-wrap: wrap;">
|
|
@if (order.WorkOrderContacts != null)
|
|
{
|
|
foreach (var itm in order.WorkOrderContacts)
|
|
{
|
|
<div class="card mt-2" style="background:#191e32 !important;width:46%;margin-top:20px;border-radius:10px;margin-right:2%">
|
|
<div class="card-body p-3" style="padding:10px">
|
|
<div class="row">
|
|
<div class="">
|
|
|
|
<p class="mb-1" style="color: white !important;">POC: <span style="margin-left:15px">@((itm.POC.FirstName + " " + itm.POC.LastName).Trim())</span></p>
|
|
<p class="mb-1" style="color: white !important;">Email: <span style="margin-left:15px">@itm.POC.Email</span></p>
|
|
<p class="mb-1" style="color: white !important;">Phone Number: <span style="margin-left:15px">@itm.POC.PhoneNumber</span></p>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
}
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
@if (isloading)
|
|
{
|
|
<div class="loading">Loading…</div>
|
|
}
|
|
@using SeaHavenIndustries.Data.IRepository;
|
|
@inject IWorkOrderRepository _service;
|
|
@using Microsoft.JSInterop
|
|
@using System.Text.Json
|
|
@using global::Data.SeaHavenIndustries
|
|
@inject IJSRuntime JSRuntime
|
|
|
|
@inject ChangeStepService StepService
|
|
|
|
|
|
@implements IDisposable
|
|
|
|
@inject NavigationManager Navigation
|
|
|
|
@inject Microsoft.AspNetCore.Hosting.IWebHostEnvironment _env
|
|
|
|
@code {
|
|
[Parameter]
|
|
public int? id { get; set; }
|
|
private WorkOrder order = new();
|
|
private string selectedStatus = "Open";
|
|
private bool isloading = true;
|
|
private IEnumerable<WorkOrder>? list { get; set; }
|
|
protected override async Task OnParametersSetAsync()
|
|
{
|
|
isloading = true;
|
|
StepService.OnStateChange += StateHasChanged;
|
|
if (id != null)
|
|
{
|
|
var result = await _service.GetworkorderById(id.Value);
|
|
if (result != null)
|
|
{
|
|
order = result;
|
|
selectedStatus = order.Status;
|
|
|
|
//StepService.SetCurrentstatus(selectedStatus);
|
|
// StepService.chnageactivemodel(order);
|
|
}
|
|
//isloading = false;
|
|
}
|
|
imagePath = _env.WebRootPath + "/assets/img/Logo.png";
|
|
|
|
ConvertToBase64();
|
|
isloading = false;
|
|
StateHasChanged();
|
|
}
|
|
private string base64Image;
|
|
private string imagePath;
|
|
|
|
private void ConvertToBase64()
|
|
{
|
|
if (!string.IsNullOrEmpty(imagePath))
|
|
{
|
|
var imageBytes = System.IO.File.ReadAllBytes(imagePath);
|
|
base64Image = Convert.ToBase64String(imageBytes);
|
|
}
|
|
else
|
|
{
|
|
base64Image = null;
|
|
}
|
|
}
|
|
|
|
public EventCallback<int> OnStepChange { get; set; }
|
|
public void Dispose()
|
|
{
|
|
StepService.OnStateChange -= StateHasChanged;
|
|
}
|
|
}
|