MRB webassembly
This commit is contained in:
22
MesaFabApproval.Shared/Models/Approval.cs
Normal file
22
MesaFabApproval.Shared/Models/Approval.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using MesaFabApproval.Shared.Utilities;
|
||||
|
||||
namespace MesaFabApproval.Shared.Models;
|
||||
|
||||
public class Approval {
|
||||
public int ApprovalID { get; set; }
|
||||
public required int IssueID { get; set; }
|
||||
public required string RoleName { get; set; }
|
||||
public required string SubRole { get; set; }
|
||||
public required int UserID { get; set; }
|
||||
public User? User { get; set; }
|
||||
public required int SubRoleID { get; set; }
|
||||
public int ItemStatus { get; set; } = 0;
|
||||
public string StatusMessage = "Assigned";
|
||||
public DateTime NotifyDate { get; set; } = DateTimeUtilities.MIN_DT;
|
||||
public required DateTime AssignedDate { get; set; }
|
||||
public DateTime CompletedDate { get; set; } = DateTimeUtilities.MAX_DT;
|
||||
public string Comments { get; set; } = "";
|
||||
public int Step { get; set; } = 1;
|
||||
public string SubRoleCategoryItem { get; set; } = "";
|
||||
public int TaskID { get; set; }
|
||||
}
|
7
MesaFabApproval.Shared/Models/AuthAttempt.cs
Normal file
7
MesaFabApproval.Shared/Models/AuthAttempt.cs
Normal file
@ -0,0 +1,7 @@
|
||||
namespace MesaFabApproval.Shared.Models;
|
||||
|
||||
public class AuthAttempt {
|
||||
public required string LoginID { get; set; }
|
||||
public string Password { get; set; } = "";
|
||||
public AuthTokens? AuthTokens { get; set; }
|
||||
}
|
6
MesaFabApproval.Shared/Models/AuthTokens.cs
Normal file
6
MesaFabApproval.Shared/Models/AuthTokens.cs
Normal file
@ -0,0 +1,6 @@
|
||||
namespace MesaFabApproval.Shared.Models;
|
||||
|
||||
public class AuthTokens {
|
||||
public required string JwtToken { get; set; }
|
||||
public required string RefreshToken { get; set; }
|
||||
}
|
7
MesaFabApproval.Shared/Models/LoginResult.cs
Normal file
7
MesaFabApproval.Shared/Models/LoginResult.cs
Normal file
@ -0,0 +1,7 @@
|
||||
namespace MesaFabApproval.Shared.Models;
|
||||
|
||||
public class LoginResult {
|
||||
public required bool IsAuthenticated { get; set; }
|
||||
public required User User { get; set; }
|
||||
public required AuthTokens AuthTokens { get; set; }
|
||||
}
|
46
MesaFabApproval.Shared/Models/MRB.cs
Normal file
46
MesaFabApproval.Shared/Models/MRB.cs
Normal file
@ -0,0 +1,46 @@
|
||||
using MesaFabApproval.Shared.Utilities;
|
||||
|
||||
namespace MesaFabApproval.Shared.Models;
|
||||
|
||||
public class MRB {
|
||||
public static string[] Stages { get; } = {
|
||||
"Draft",
|
||||
"QA Pre Approval",
|
||||
"Pending Approval",
|
||||
"Approved",
|
||||
"Complete"
|
||||
};
|
||||
|
||||
public int MRBNumber { get; set; }
|
||||
public int OriginatorID { get; set; }
|
||||
public string OriginatorName { get; set; } = "";
|
||||
public string Title { get; set; } = "";
|
||||
public DateTime SubmittedDate { get; set; } = DateTimeUtilities.MIN_DT;
|
||||
public DateTime CloseDate { get; set; } = DateTimeUtilities.MAX_DT;
|
||||
public DateTime CancelDate { get; set; } = DateTimeUtilities.MAX_DT;
|
||||
public DateTime ApprovalDate { get; set; } = DateTimeUtilities.MAX_DT;
|
||||
public string IssueDescription { get; set; } = "";
|
||||
public int NumberOfLotsAffected { get; set; }
|
||||
public int Val { get; set; }
|
||||
public bool CustomerImpacted { get; set; } = false;
|
||||
public string CustomerImpactedName { get; set; } = "";
|
||||
public string Department { get; set; } = "";
|
||||
public string Process { get; set; } = "";
|
||||
public int RMANo { get; set; }
|
||||
public string PCRBNo { get; set; } = "";
|
||||
public bool SpecsImpacted { get; set; } = false;
|
||||
public int ProcessECNNumber { get; set; }
|
||||
public bool TrainingRequired { get; set; } = false;
|
||||
public IEnumerable<MRBAttachment>? Attachments { get; set; }
|
||||
public IEnumerable<MRBAction>? Actions { get; set; }
|
||||
public IEnumerable<int>? ApproverUserIds { get; set; }
|
||||
public required int StageNo { get; set; }
|
||||
public required string Status { get; set; }
|
||||
public string Tool { get; set; } = "";
|
||||
public string Category { get; set; } = string.Empty;
|
||||
|
||||
public sealed class StageApprovalData {
|
||||
public required string RoleName { get; set; }
|
||||
public required string SubRoleName { get; set; }
|
||||
}
|
||||
}
|
20
MesaFabApproval.Shared/Models/MRBAction.cs
Normal file
20
MesaFabApproval.Shared/Models/MRBAction.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using MesaFabApproval.Shared.Utilities;
|
||||
|
||||
namespace MesaFabApproval.Shared.Models;
|
||||
|
||||
public class MRBAction {
|
||||
public int ActionID { get; set; }
|
||||
public required string Action { get; set; }
|
||||
public required string Customer { get; set; }
|
||||
public required int Quantity { get; set; }
|
||||
public required string PartNumber { get; set; }
|
||||
public required string LotNumber { get; set; }
|
||||
public required int MRBNumber { get; set; }
|
||||
public DateTime AssignedDate { get; set; } = DateTimeUtilities.MIN_DT;
|
||||
public DateTime CompletedDate { get; set; } = DateTimeUtilities.MAX_DT;
|
||||
public int CompletedByUserID { get; set; } = 0;
|
||||
public User? CompletedByUser { get; set; }
|
||||
public string ConvertFrom { get; set; } = "";
|
||||
public string ConvertTo { get; set; } = "";
|
||||
public string Justification { get; set; } = "";
|
||||
}
|
9
MesaFabApproval.Shared/Models/MRBActionAttachment.cs
Normal file
9
MesaFabApproval.Shared/Models/MRBActionAttachment.cs
Normal file
@ -0,0 +1,9 @@
|
||||
namespace MesaFabApproval.Shared.Models;
|
||||
|
||||
public class MRBActionAttachment {
|
||||
public required int AttachmentID { get; set; }
|
||||
public required int ActionID { get; set; }
|
||||
public required string FileName { get; set; }
|
||||
public required DateTime UploadDate { get; set; }
|
||||
public required string Path { get; set; }
|
||||
}
|
13
MesaFabApproval.Shared/Models/MRBAttachment.cs
Normal file
13
MesaFabApproval.Shared/Models/MRBAttachment.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using Microsoft.AspNetCore.Components.Forms;
|
||||
|
||||
namespace MesaFabApproval.Shared.Models;
|
||||
|
||||
public class MRBAttachment {
|
||||
public int AttachmentID { get; set; }
|
||||
public required int MRBNumber { get; set; }
|
||||
public required string FileName { get; set; }
|
||||
public required int UserID { get; set; }
|
||||
public required DateTime UploadDate { get; set; }
|
||||
public string? Path { get; set; }
|
||||
public IBrowserFile? File { get; set; }
|
||||
}
|
6
MesaFabApproval.Shared/Models/MRBNotification.cs
Normal file
6
MesaFabApproval.Shared/Models/MRBNotification.cs
Normal file
@ -0,0 +1,6 @@
|
||||
namespace MesaFabApproval.Shared.Models;
|
||||
|
||||
public class MRBNotification {
|
||||
public required string Message { get; set; }
|
||||
public required MRB MRB { get; set; }
|
||||
}
|
8
MesaFabApproval.Shared/Models/MonInMetricRequest.cs
Normal file
8
MesaFabApproval.Shared/Models/MonInMetricRequest.cs
Normal file
@ -0,0 +1,8 @@
|
||||
namespace MesaFabApproval.Shared.Models;
|
||||
|
||||
public class MonInMetricRequest {
|
||||
public required string resource { get; set; }
|
||||
public required DateTime dateTime { get; set; }
|
||||
public required string metricName { get; set; }
|
||||
public required double metricValue { get; set; }
|
||||
}
|
27
MesaFabApproval.Shared/Models/PCRB.cs
Normal file
27
MesaFabApproval.Shared/Models/PCRB.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using MesaFabApproval.Shared.Utilities;
|
||||
|
||||
namespace MesaFabApproval.Shared.Models;
|
||||
|
||||
public class PCRB {
|
||||
public static string[] Stages { get; } = {
|
||||
"Draft",
|
||||
"QA Pre Approval",
|
||||
"PCR1",
|
||||
"PCR2",
|
||||
"PCR3",
|
||||
"Complete"
|
||||
};
|
||||
|
||||
public int PlanNumber { get; set; }
|
||||
public int OwnerID { get; set; }
|
||||
public string OwnerName { get; set; } = "";
|
||||
public string Title { get; set; } = "";
|
||||
public string ChangeLevel { get; set; } = "Mesa";
|
||||
public bool IsITAR { get; set; } = false;
|
||||
public int CurrentStep { get; set; } = 0;
|
||||
public string ReasonForChange { get; set; } = "";
|
||||
public string ChangeDescription { get; set; } = "";
|
||||
public DateTime InsertTimeStamp { get; set; } = DateTimeUtilities.MIN_DT;
|
||||
public DateTime LastUpdateDate { get; set; } = DateTimeUtilities.MIN_DT;
|
||||
public DateTime ClosedDate { get; set; } = DateTimeUtilities.MAX_DT;
|
||||
}
|
56
MesaFabApproval.Shared/Models/Process.cs
Normal file
56
MesaFabApproval.Shared/Models/Process.cs
Normal file
@ -0,0 +1,56 @@
|
||||
namespace MesaFabApproval.Shared.Models;
|
||||
|
||||
public class Process {
|
||||
public required string Name { get; set; } = "";
|
||||
|
||||
private static readonly Process Receiving = new Process { Name="Receiving" };
|
||||
private static readonly Process Kitting = new Process { Name = "Kitting" };
|
||||
private static readonly Process Cleans = new Process { Name = "Cleans" };
|
||||
private static readonly Process Reactor = new Process { Name = "Reactor" };
|
||||
private static readonly Process Metrology = new Process { Name = "Metrology" };
|
||||
private static readonly Process FQA = new Process { Name = "FQA" };
|
||||
private static readonly Process Packaging = new Process { Name = "Packaging" };
|
||||
private static readonly Process Shipping = new Process { Name = "Shipping" };
|
||||
private static readonly Process BuildingInfrastructure = new Process { Name = "Building Infrastructure" };
|
||||
private static readonly Process Conversion = new Process { Name = "Conversion" };
|
||||
private static readonly Process RMA = new Process { Name = "RMA" };
|
||||
private static readonly Process CustomerCompliant = new Process { Name = "Customer Compliant" };
|
||||
|
||||
public static IEnumerable<Process> ProductionProcesses = new HashSet<Process> {
|
||||
Cleans,
|
||||
Reactor,
|
||||
Metrology,
|
||||
FQA,
|
||||
Packaging
|
||||
};
|
||||
|
||||
public static IEnumerable<Process> EngineeringProcesses = new HashSet<Process> {
|
||||
Conversion,
|
||||
Cleans,
|
||||
Reactor,
|
||||
Metrology,
|
||||
FQA,
|
||||
Packaging
|
||||
};
|
||||
|
||||
public static IEnumerable<Process> MaterialsProcesses = new HashSet<Process> {
|
||||
Receiving,
|
||||
Kitting,
|
||||
Shipping
|
||||
};
|
||||
|
||||
public static IEnumerable<Process> FacilitiesProcesses = new HashSet<Process> {
|
||||
BuildingInfrastructure
|
||||
};
|
||||
|
||||
public static IEnumerable<Process> MaintenanceProcesses = new HashSet<Process> {
|
||||
Cleans,
|
||||
Reactor,
|
||||
Packaging
|
||||
};
|
||||
|
||||
public static IEnumerable<Process> QualityProcesses = new HashSet<Process> {
|
||||
RMA,
|
||||
CustomerCompliant
|
||||
};
|
||||
}
|
8
MesaFabApproval.Shared/Models/RawMonInStatusRequest.cs
Normal file
8
MesaFabApproval.Shared/Models/RawMonInStatusRequest.cs
Normal file
@ -0,0 +1,8 @@
|
||||
namespace MesaFabApproval.Shared.Models;
|
||||
|
||||
public class RawMonInStatusRequest {
|
||||
public required string resource { get; set; }
|
||||
public required DateTime dateTime { get; set; }
|
||||
public required string statusName { get; set; }
|
||||
public required string statusValue { get; set; }
|
||||
}
|
11
MesaFabApproval.Shared/Models/Role.cs
Normal file
11
MesaFabApproval.Shared/Models/Role.cs
Normal file
@ -0,0 +1,11 @@
|
||||
namespace MesaFabApproval.Shared.Models;
|
||||
|
||||
public class Role {
|
||||
private string Value { get; set; }
|
||||
|
||||
private Role(string value) { this.Value = value; }
|
||||
|
||||
public static Role MRB_APPROVER { get { return new Role("MRB Approver"); } }
|
||||
|
||||
public override string ToString() => Value;
|
||||
}
|
10
MesaFabApproval.Shared/Models/StatusValue.cs
Normal file
10
MesaFabApproval.Shared/Models/StatusValue.cs
Normal file
@ -0,0 +1,10 @@
|
||||
namespace MesaFabApproval.Shared.Models;
|
||||
|
||||
public enum StatusValue {
|
||||
Up,
|
||||
Ok,
|
||||
Warning,
|
||||
Critical,
|
||||
Down,
|
||||
Unknown
|
||||
}
|
13
MesaFabApproval.Shared/Models/SubRole.cs
Normal file
13
MesaFabApproval.Shared/Models/SubRole.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Immutable;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace MesaFabApproval.Shared.Models;
|
||||
|
||||
public class SubRole {
|
||||
public int SubRoleID { get; set; }
|
||||
public required string SubRoleName { get; set; }
|
||||
public required int SubRoleCategoryID { get; set; }
|
||||
public required string SubRoleCategoryItem { get; set; }
|
||||
}
|
111
MesaFabApproval.Shared/Models/Tool.cs
Normal file
111
MesaFabApproval.Shared/Models/Tool.cs
Normal file
@ -0,0 +1,111 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace MesaFabApproval.Shared.Models;
|
||||
|
||||
public class Tool {
|
||||
[Key]
|
||||
public int ToolID { get; set; }
|
||||
|
||||
[Required]
|
||||
public required string Name { get; set; } = "";
|
||||
|
||||
public static IEnumerable<Tool> ReactorTools = new HashSet<Tool> {
|
||||
new Tool { Name = "Reactor 20"},
|
||||
new Tool { Name = "Reactor 21"},
|
||||
new Tool { Name = "Reactor 22"},
|
||||
new Tool { Name = "Reactor 23"},
|
||||
new Tool { Name = "Reactor 24"},
|
||||
new Tool { Name = "Reactor 25"},
|
||||
new Tool { Name = "Reactor 26"},
|
||||
new Tool { Name = "Reactor 27"},
|
||||
new Tool { Name = "Reactor 28"},
|
||||
new Tool { Name = "Reactor 29"},
|
||||
new Tool { Name = "Reactor 30"},
|
||||
new Tool { Name = "Reactor 31"},
|
||||
new Tool { Name = "Reactor 32"},
|
||||
new Tool { Name = "Reactor 33"},
|
||||
new Tool { Name = "Reactor 34"},
|
||||
new Tool { Name = "Reactor 35"},
|
||||
new Tool { Name = "Reactor 36"},
|
||||
new Tool { Name = "Reactor 37"},
|
||||
new Tool { Name = "Reactor 38"},
|
||||
new Tool { Name = "Reactor 39"},
|
||||
new Tool { Name = "Reactor 40"},
|
||||
new Tool { Name = "Reactor 41"},
|
||||
new Tool { Name = "Reactor 42"},
|
||||
new Tool { Name = "Reactor 43"},
|
||||
new Tool { Name = "Reactor 44"},
|
||||
new Tool { Name = "Reactor 45"},
|
||||
new Tool { Name = "Reactor 46"},
|
||||
new Tool { Name = "Reactor 47"},
|
||||
new Tool { Name = "Reactor 48"},
|
||||
new Tool { Name = "Reactor 49"},
|
||||
new Tool { Name = "Reactor 50"},
|
||||
new Tool { Name = "Reactor 51"},
|
||||
new Tool { Name = "Reactor 52"},
|
||||
new Tool { Name = "Reactor 53"},
|
||||
new Tool { Name = "Reactor 54"},
|
||||
new Tool { Name = "Reactor 55"},
|
||||
new Tool { Name = "Reactor 56"},
|
||||
new Tool { Name = "Reactor 57"},
|
||||
new Tool { Name = "Reactor 58"},
|
||||
new Tool { Name = "Reactor 59"},
|
||||
new Tool { Name = "Reactor 60"},
|
||||
new Tool { Name = "Reactor 61"},
|
||||
new Tool { Name = "Reactor 62"},
|
||||
new Tool { Name = "Reactor 63"},
|
||||
new Tool { Name = "Reactor 64"},
|
||||
new Tool { Name = "Reactor 65"},
|
||||
new Tool { Name = "Reactor 66"},
|
||||
new Tool { Name = "Reactor 67"},
|
||||
new Tool { Name = "Reactor 68"},
|
||||
new Tool { Name = "Reactor 70"},
|
||||
new Tool { Name = "Reactor 72"},
|
||||
new Tool { Name = "Reactor 73"},
|
||||
new Tool { Name = "Reactor 74"},
|
||||
new Tool { Name = "Reactor 75"},
|
||||
new Tool { Name = "Reactor 77"},
|
||||
new Tool { Name = "Reactor 79"}
|
||||
};
|
||||
|
||||
public static IEnumerable<Tool> MetrologyTools { get; private set; } = new HashSet<Tool> {
|
||||
new Tool { Name = "Biorad 2"},
|
||||
new Tool { Name = "Biorad 3"},
|
||||
new Tool { Name = "Biorad 4"},
|
||||
new Tool { Name = "Biorad 5"},
|
||||
new Tool { Name = "HgCV 1" },
|
||||
new Tool { Name = "HgCV 2" },
|
||||
new Tool { Name = "HgCV 3" },
|
||||
new Tool { Name = "CDE 4" },
|
||||
new Tool { Name = "CDE 5" },
|
||||
new Tool { Name = "CDE 6" },
|
||||
new Tool { Name = "Tencor 1" },
|
||||
new Tool { Name = "Tencor 2" },
|
||||
new Tool { Name = "Tencor 3" },
|
||||
new Tool { Name = "SP1" },
|
||||
new Tool { Name = "SRP" },
|
||||
new Tool { Name = "SPV" }
|
||||
};
|
||||
|
||||
public static IEnumerable<Tool> PackagingTools { get; private set; } = new HashSet<Tool> {
|
||||
new Tool { Name = "Bagger 1" },
|
||||
new Tool { Name = "Bagger 2" },
|
||||
new Tool { Name = "Bagger 3" },
|
||||
new Tool { Name = "Bagger 4" }
|
||||
};
|
||||
|
||||
public static IEnumerable<Tool> CleansTools { get; private set; } = new HashSet<Tool> {
|
||||
new Tool { Name = "Akrion 1" },
|
||||
new Tool { Name = "AHPS" }
|
||||
};
|
||||
|
||||
public static IEnumerable<Tool> FqaTools { get; private set; } = new HashSet<Tool> {
|
||||
new Tool { Name = "6\" Wafer Counter 1" },
|
||||
new Tool { Name = "6\" Wafer Counter 2" },
|
||||
new Tool { Name = "6\" Wafer Counter 3" },
|
||||
new Tool { Name = "6\" Wafer Counter 4" },
|
||||
new Tool { Name = "8\" Wafer Counter 1" },
|
||||
new Tool { Name = "8\" Wafer Counter 2" },
|
||||
new Tool { Name = "8\" Wafer Counter 3" }
|
||||
};
|
||||
}
|
7
MesaFabApproval.Shared/Models/UploadResult.cs
Normal file
7
MesaFabApproval.Shared/Models/UploadResult.cs
Normal file
@ -0,0 +1,7 @@
|
||||
namespace MesaFabApproval.Shared.Models;
|
||||
|
||||
public class UploadResult {
|
||||
public required bool UploadSuccessful { get; set; }
|
||||
public string? FileName { get; set; }
|
||||
public string? Error { get; set; }
|
||||
}
|
30
MesaFabApproval.Shared/Models/User.cs
Normal file
30
MesaFabApproval.Shared/Models/User.cs
Normal file
@ -0,0 +1,30 @@
|
||||
namespace MesaFabApproval.Shared.Models;
|
||||
|
||||
public class User {
|
||||
public required int UserID { get; set; }
|
||||
public required string LoginID { get; set; }
|
||||
public required string FirstName { get; set; }
|
||||
public required string LastName { get; set; }
|
||||
public required string Email { get; set; }
|
||||
public bool IsAdmin { get; set; } = false;
|
||||
public bool IsManager { get; set; } = false;
|
||||
public bool IsActive { get; set; } = false;
|
||||
public bool OOO { get; set; } = false;
|
||||
public DateTime OOOStartDate { get; set; }
|
||||
public DateTime OOOExpirationDate { get; set; }
|
||||
public int DelegatedTo { get; set; }
|
||||
|
||||
public string GetFullName() {
|
||||
return $"{FirstName} {LastName}";
|
||||
}
|
||||
|
||||
public override bool Equals(object obj) {
|
||||
User? u = obj as User;
|
||||
|
||||
return u is not null && u.UserID == this.UserID;
|
||||
}
|
||||
|
||||
public override int GetHashCode() {
|
||||
return this.UserID.GetHashCode();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user