82 lines
2.5 KiB
C#
82 lines
2.5 KiB
C#
using Thor.Shared;
|
|
using Thor.Shared.Visit;
|
|
|
|
namespace Thor.BlazorCommon.Services;
|
|
|
|
public class TripManager
|
|
{
|
|
public Inspection? Current = null;
|
|
|
|
public TripManager() {
|
|
Current = GenerateSampleInspection();
|
|
}
|
|
|
|
public Inspection GenerateSampleInspection()
|
|
{
|
|
Inspection inspection = new()
|
|
{
|
|
Identifier = "inspection-001",
|
|
Name = "Inspection OxyFake"
|
|
};
|
|
|
|
inspection.Grid.Identifier = "inspection-001/doum001";
|
|
inspection.Grid.Name = "Grille Doum v1";
|
|
inspection.Grid.AddItems(
|
|
new ItemTitle
|
|
{
|
|
Identifier = "inspection-001/doum001/1",
|
|
OrderId = "1",
|
|
ParentId = null,
|
|
Label = "Pilotage"
|
|
},
|
|
new ItemVerification
|
|
{
|
|
Identifier = "inspection-001/doum001/1.0a",
|
|
OrderId = "1.0a",
|
|
ParentId = "inspection-001/doum001/1",
|
|
Label = "La personne responsable de qualité et/ou de la gestion des risques liée à la PECM DEVRAIT être désignée."
|
|
},
|
|
new ItemVerification
|
|
{
|
|
Identifier = "inspection-001/doum001/1.0b",
|
|
OrderId = "1.0b",
|
|
ParentId = "inspection-001/doum001/1",
|
|
Label = "Ceci est une indication.",
|
|
Force = ItemVerification.VerificationForce.Optionnal
|
|
},
|
|
new ItemVerification
|
|
{
|
|
Identifier = "inspection-001/doum001/1.0c",
|
|
OrderId = "1.0c",
|
|
ParentId = "inspection-001/doum001/1",
|
|
Label = "Ceci est une recommandation.",
|
|
Force = ItemVerification.VerificationForce.Recommandation
|
|
},
|
|
new ItemVerification
|
|
{
|
|
Identifier = "inspection-001/doum001/1.0d",
|
|
OrderId = "1.0d",
|
|
ParentId = "inspection-001/doum001/1",
|
|
Label = "Ceci est une obligation.",
|
|
Force = ItemVerification.VerificationForce.Mandatory
|
|
},
|
|
new ItemTitle
|
|
{
|
|
Identifier = "inspection-001/doum001/1.1",
|
|
OrderId = "1.1",
|
|
ParentId = "inspection-001/doum001/1",
|
|
Label = "Évaluation"
|
|
},
|
|
new ItemVerification
|
|
{
|
|
Identifier = "inspection-001/doum001/1.1.0a",
|
|
OrderId = "1.1.0a",
|
|
ParentId = "inspection-001/doum001/1.1",
|
|
Label = "Les évaluations internes ou externes DEVRAIENT portent sur la PECM."
|
|
}
|
|
);
|
|
|
|
return inspection;
|
|
}
|
|
}
|