|
| 1 | +// ------------------------------------------------------------------------------------------------ |
| 2 | +// Copyright (c) Microsoft Corporation. All rights reserved. |
| 3 | +// Licensed under the MIT License. See License.txt in the project root for license information. |
| 4 | +// ------------------------------------------------------------------------------------------------ |
| 5 | +namespace Microsoft.QualityManagement.Setup.ManualSetup; |
| 6 | + |
| 7 | +using Microsoft.QualityManagement.Configuration.GenerationRule; |
| 8 | +using Microsoft.QualityManagement.Configuration.Result; |
| 9 | +using Microsoft.QualityManagement.Configuration.Template; |
| 10 | +using Microsoft.QualityManagement.Configuration.Template.Test; |
| 11 | +using Microsoft.QualityManagement.Setup; |
| 12 | +using System.Environment.Configuration; |
| 13 | + |
| 14 | +codeunit 20400 "Qlty. Manual Setup" |
| 15 | +{ |
| 16 | + Access = Internal; |
| 17 | + |
| 18 | + var |
| 19 | + QualityTestsShortTitleTxt: Label 'Set up quality tests'; |
| 20 | + QualityTestsTitleTxt: Label 'Tests'; |
| 21 | + QualityTestsDescriptionTxt: Label 'Set up quality tests to define what is measured. Visit the Quality Tests list to see available tests, then open a test card to review parameters, limits, and expected values used during inspections.'; |
| 22 | + QualityTestsKeywordsTxt: Label 'Quality Tests, Measurements, Parameters, Expected Values'; |
| 23 | + |
| 24 | + QualityTestLookupValuesShortTitleTxt: Label 'Set up quality test lookup values'; |
| 25 | + QualityTestLookupValuesTitleTxt: Label 'Test lookup values'; |
| 26 | + QualityTestLookupValuesDescriptionTxt: Label 'Set up the allowed outcome values for quality tests using a predefined custom list.'; |
| 27 | + QualityTestLookupValuesKeywordsTxt: Label 'Quality Test, Lookup, Values'; |
| 28 | + |
| 29 | + QualityInspectionResultsShortTitleTxt: Label 'Set up quality inspection results'; |
| 30 | + QualityInspectionResultsTitleTxt: Label 'Inspection results'; |
| 31 | + QualityInspectionResultsDescriptionTxt: Label 'Set up how inspection results are captured and tracked. Review completed quality inspections to see test results, pass or fail outcomes, and recorded measurements.'; |
| 32 | + QualityInspectionResultsKeywordsTxt: Label 'Quality Inspection, Results, Grades, Outcomes'; |
| 33 | + |
| 34 | + QualityInspectionGenerationRulesShortTitleTxt: Label 'Set up quality inspection generation rules'; |
| 35 | + QualityInspectionGenerationRulesTitleTxt: Label 'Inspection generation rules'; |
| 36 | + QualityInspectionGenerationRulesDescriptionTxt: Label 'Set up inspection generation rules to define when quality inspections are created automatically, such as during receiving, production, or assembly.'; |
| 37 | + QualityInspectionGenerationRulesKeywordsTxt: Label 'Quality Inspection, Generation, Creation, Rules'; |
| 38 | + |
| 39 | + QualityInspectionTemplatesShortTitleTxt: Label 'Set up quality inspection templates'; |
| 40 | + QualityInspectionTemplatesTitleTxt: Label 'Inspection templates'; |
| 41 | + QualityInspectionTemplatesDescriptionTxt: Label 'Set up templates you can group and reuse quality tests so you can apply consistent inspection standards across items, processes, or scenarios. From the list you can create a new template card to understand its structure and purpose.'; |
| 42 | + QualityInspectionTemplatesKeywordsTxt: Label 'Quality Inspection, Templates, Procedures'; |
| 43 | + |
| 44 | + QualityManagementSetupTitleTxt: Label 'Set up quality management'; |
| 45 | + QualityManagementSetupShortTitleTxt: Label 'Quality management setup'; |
| 46 | + QualityManagementSetupDescriptionTxt: Label 'Set up how and when inspections are created. Manage when to show inspections, set up test generation rules, such as for production scenarios or inventory and warehouse inspections.'; |
| 47 | + QualityManagementSetupKeywordsTxt: Label 'Quality Management Setup'; |
| 48 | + |
| 49 | + [EventSubscriber(ObjectType::Codeunit, Codeunit::"Guided Experience", 'OnRegisterManualSetup', '', false, false)] |
| 50 | + local procedure InsertQualityManagementManualSetupOnRegisterManualSetup(var Sender: Codeunit "Guided Experience") |
| 51 | + var |
| 52 | + ManualSetupCategory: Enum "Manual Setup Category"; |
| 53 | + begin |
| 54 | + Sender.InsertManualSetup(QualityTestsShortTitleTxt, |
| 55 | + QualityTestsTitleTxt, |
| 56 | + QualityTestsDescriptionTxt, |
| 57 | + 10, |
| 58 | + ObjectType::Page, |
| 59 | + Page::"Qlty. Tests", |
| 60 | + ManualSetupCategory::"Quality Management", |
| 61 | + QualityTestsKeywordsTxt); |
| 62 | + |
| 63 | + Sender.InsertManualSetup(QualityTestLookupValuesShortTitleTxt, |
| 64 | + QualityTestLookupValuesTitleTxt, |
| 65 | + QualityTestLookupValuesDescriptionTxt, |
| 66 | + 10, |
| 67 | + ObjectType::Page, |
| 68 | + Page::"Qlty. Test Lookup Values", |
| 69 | + ManualSetupCategory::"Quality Management", |
| 70 | + QualityTestLookupValuesKeywordsTxt); |
| 71 | + |
| 72 | + Sender.InsertManualSetup(QualityInspectionResultsShortTitleTxt, |
| 73 | + QualityInspectionResultsTitleTxt, |
| 74 | + QualityInspectionResultsDescriptionTxt, |
| 75 | + 10, |
| 76 | + ObjectType::Page, |
| 77 | + Page::"Qlty. Inspection Result List", |
| 78 | + ManualSetupCategory::"Quality Management", |
| 79 | + QualityInspectionResultsKeywordsTxt); |
| 80 | + |
| 81 | + Sender.InsertManualSetup(QualityInspectionGenerationRulesShortTitleTxt, |
| 82 | + QualityInspectionGenerationRulesTitleTxt, |
| 83 | + QualityInspectionGenerationRulesDescriptionTxt, |
| 84 | + 10, |
| 85 | + ObjectType::Page, |
| 86 | + Page::"Qlty. Inspection Gen. Rules", |
| 87 | + ManualSetupCategory::"Quality Management", |
| 88 | + QualityInspectionGenerationRulesKeywordsTxt); |
| 89 | + |
| 90 | + Sender.InsertManualSetup(QualityInspectionTemplatesShortTitleTxt, |
| 91 | + QualityInspectionTemplatesTitleTxt, |
| 92 | + QualityInspectionTemplatesDescriptionTxt, |
| 93 | + 10, |
| 94 | + ObjectType::Page, |
| 95 | + Page::"Qlty. Inspection Template List", |
| 96 | + ManualSetupCategory::"Quality Management", |
| 97 | + QualityInspectionTemplatesKeywordsTxt); |
| 98 | + |
| 99 | + Sender.InsertManualSetup(QualityManagementSetupTitleTxt, |
| 100 | + QualityManagementSetupShortTitleTxt, |
| 101 | + QualityManagementSetupDescriptionTxt, |
| 102 | + 10, |
| 103 | + ObjectType::Page, |
| 104 | + Page::"Qlty. Management Setup", |
| 105 | + ManualSetupCategory::"Quality Management", |
| 106 | + QualityManagementSetupKeywordsTxt, |
| 107 | + true); |
| 108 | + end; |
| 109 | +} |
0 commit comments