Exemplo n.º 1
0
        public static void RegisterFlow(IModuleBuilder moduleBuilder)
        {
            var flow = moduleBuilder
                       .WithFlow <A2A3A4Model, A2A3A4Context>("a2a3a4")
                       .WithStep(m => m.Data)
                       .GridConfig("1fr 1fr 1fr")
                       .WithBorder(BorderEnum.ltrb)
                       .Next("Save")
                       // .WithTask<A2A3A4CalculationTask>(TaskTypeEnum.PeriTask)
                       .AddDecorator("A2 - Liquid Limit")
                       .PositionConfig("1/4", "1")
                       .WithMetadata("textAlign", "center")
                       .WithMetadata("textWeight", "bold")
                       .End()
                       .AddArray(m => m.LiquidLimitPoints, "Liquid limit points")
                       .Vertical(3)
                       .MaxRows(3)
                       .GridConfig("1fr")
                       .PositionConfig("1/4", "2")
                       .AddControl(m => m.PanNumber, ControlType.Text, "Pan Number").End()
                       .AddControl(m => m.Blows, ControlType.Number, "Blows").End()
                       .AddControl(m => m.WetMass, ControlType.Number, "Wet Mass").WithSuffix(Appendixes.Grams).End()
                       .AddControl(m => m.DryMass, ControlType.Number, "Dry Mass").WithSuffix(Appendixes.Grams).End()
                       .AddControl(m => m.PanMass, ControlType.Number, "Pan Mass").WithSuffix(Appendixes.Grams).End()
                       .AddControl(m => m.LiquidLimit, ControlType.Number, "Liquid Limit").WithSuffix(Appendixes.Percentage).InitiallyDisabled().End()
                       .End()
                       .AddControl(m => m.AverageLiquidLimit, ControlType.Number, "Average Liquid Limit")
                       .InitiallyDisabled()
                       .WithSuffix("%")
                       .PositionConfig("1", "3")
                       .End()
                       .AddDecorator("A3 - Plastic Limit")
                       .PositionConfig("1/4", "4")
                       .WithMetadata("textAlign", "center")
                       .WithMetadata("textWeight", "bold")
                       .End()
                       .AddArray(m => m.PlasticLimitPoints, "Plastic limit points")
                       .Vertical(3)
                       .MaxRows(3)
                       .GridConfig("1fr")
                       .PositionConfig("1/4", "5")
                       .AddControl(m => m.PanNumber, ControlType.Text, "Pan Number").End()
                       .AddControl(m => m.WetMass, ControlType.Number, "Wet Mass").WithSuffix(Appendixes.Grams).End()
                       .AddControl(m => m.DryMass, ControlType.Number, "Dry Mass").WithSuffix(Appendixes.Grams).End()
                       .AddControl(m => m.PanMass, ControlType.Number, "Pan Mass").WithSuffix(Appendixes.Grams).End()
                       .AddControl(m => m.PlasticLimit, ControlType.Number, "Liquid Limit").WithSuffix(Appendixes.Percentage).InitiallyDisabled().End()
                       .End()
                       .AddControl(m => m.AveragePlasticLimit, ControlType.Number, "Average Liquid Limit")
                       .InitiallyDisabled()
                       .WithSuffix(Appendixes.Percentage)
                       .PositionConfig("1", "6")
                       .End()
                       .End();

            moduleBuilder.AddFlowToModule("", "lab-calculator", "tmh1", flow.Flow);
        }
Exemplo n.º 2
0
        public static void RegisterFlow(IModuleBuilder moduleBuilder)
        {
            var flow = moduleBuilder
                       .WithFlow <TestData, TestContext>("test-flow")
                       .RequiresAuthorization()
                       .WithStep(m => m.PersonalDetails)
                       .WithTask <TestTask>(TaskTypeEnum.PostTask)
                       .Next("Next")
                       .GridConfig("1fr")
                       .AddGroup(m => m.MainMember, "Main Member")
                       .GridConfig("4fr 4fr 2fr")
                       .AddControl(m => m.FirstName, ControlType.Text, "First Name").End()
                       .AddControl(m => m.LastName, ControlType.Text, "Last Name").End()
                       .AddControl(m => m.Gender, ControlType.Select, "Gender")
                       .WithOptions(Constants.Lookups.Gender)
                       .End()
                       .AddControl(m => m.DateOfBirth, ControlType.DateTime).End()
                       .End()
                       .AddControl(m => m.HasSpouse, ControlType.Boolean, "Do you have a spouse?")
                       .End()
                       .AddGroup(m => m.Spouse, "Spouse")
                       .GridConfig("4fr 4fr 2fr")
                       .WithReactivity(m => m.HasSpouse == false, ReactivityType.ClearWhen)
                       .WithReactivity(m => m.HasSpouse == true, ReactivityType.VisibleWhen)
                       .AddControl(m => m.FirstName, ControlType.Text, "First Name").End()
                       .AddControl(m => m.LastName, ControlType.Text, "Last Name").End()
                       .AddControl(m => m.Gender, ControlType.Select, "Gender")
                       .WithOptions(Constants.Lookups.Gender)
                       .End()
                       .AddControl(m => m.DateOfBirth, ControlType.DateTime).End()
                       .End()
                       .AddControl(m => m.HasChildren, ControlType.Boolean, "Do you have children?")
                       .End()
                       .AddArray(m => m.Children, "Children")
                       .GridConfig("1fr 4fr")
                       .WithReactivity(m => m.HasChildren == false, ReactivityType.ClearWhen)
                       .WithReactivity(m => m.HasChildren == true, ReactivityType.VisibleWhen)
                       .AddControl(m => m.isBiologicalChild, ControlType.Boolean, "Biological child?")
                       .End()
                       .AddGroup(m => m.Details)
                       .PositionConfig("2/5")
                       .GridConfig("4fr 4fr 2fr")
                       .AddControl(m => m.FirstName, ControlType.Text, "First Name").End()
                       .AddControl(m => m.LastName, ControlType.Text, "Last Name").End()
                       .AddControl(m => m.Gender, ControlType.Select, "Gender")
                       .WithOptions(Constants.Lookups.Gender)
                       .End()
                       .End()
                       .End()
                       .End();

            moduleBuilder.AddFlowToModule("", "lab-calculator", "test", flow.Flow);
        }
Exemplo n.º 3
0
        public static void RegisterFlow(IModuleBuilder moduleBuilder)
        {
            var flow = moduleBuilder.WithFlow <MainReportModel, MainReportContext>("tmh1-main-report")
                       .RequiresAuthorization()
                       .WithReport(m => m.Data, "report")
                       .AddPage(m => m.Page1, "Page 1")
                       .End()
                       .AddPage(m => m.Page2, "Page 2")
                       .Orientation(PageOrientation.Landscape)
                       .End()
                       .AddPage(m => m.Page3, "Page 3")
                       .End()
                       .End();

            moduleBuilder.AddFlowToModule("", "lab-calculator", "reports", flow.Flow);
        }
Exemplo n.º 4
0
        public static void RegisterFlow(IModuleBuilder moduleBuilder)
        {
            var flow = moduleBuilder
                       .WithFlow <UserEditModel, UserEditContext>("user-edit")
                       .WithStep(m => m.UserGrid, "select-user", "edit")
                       .WithTask <UserEditGetGridTask>(TaskTypeEnum.PreTask)
                       .Next("Next")
                       .AddArray(m => m.Users, "System Users", "defaultGrid")
                       .WithMetadata("editable", false)
                       .WithMetadata("allColumnsSearchable", true)
                       .WithMetadata("allColumnsOrderBy", true)
                       .GridConfig("repeat(9, 1fr)")
                       .HideAddAndDelete()
                       .AddControl(m => m.Id, ControlType.Column, "Id").InitiallyDisabled().End()
                       .AddControl(m => m.ProviderId, ControlType.Column, "Provider Id").InitiallyDisabled().End()
                       .AddControl(m => m.ProviderType, ControlType.Column, "Provider Type").InitiallyDisabled().End()
                       .AddControl(m => m.DisplayName, ControlType.Column, "Display Name").InitiallyDisabled().End()
                       .AddControl(m => m.FirstName, ControlType.Column, "First Name").InitiallyDisabled().End()
                       .AddControl(m => m.LastName, ControlType.Column, "Last Name").InitiallyDisabled().End()
                       .AddControl(m => m.EmailAddress, ControlType.Column, "Email Address").InitiallyDisabled().End()
                       .AddControl(m => m.AccountEnabled, ControlType.Column, "Enabled").InitiallyDisabled().End()
                       .AddControl(m => m.Id, ControlType.Button, "Edit")
                       .WithMetadata("icon", "edit")
                       .WithUiTask(TaskTypeEnum.PeriTask, "user-edit")          // BUTTON CLICK
                       .End()
                       .End()
                       .End()
                       .WithStep(m => m.UserEdit, "edit", "edit")
                       .WithTask <UserEditRetrieveUserTask>(TaskTypeEnum.PreTask)
                       .Back("Back")
                       .GridConfig("1fr 1fr")
                       .AddControl(m => m.Id, ControlType.Text, "Id").End()
                       .AddControl(m => m.ProviderId, ControlType.Text, "Login Id").End()
                       .AddControl(m => m.ProviderType, ControlType.Text, "Provider Type").End()
                       .AddControl(m => m.DisplayName, ControlType.Text, "Display name").End()
                       .AddControl(m => m.FirstName, ControlType.Text, "First name").End()
                       .AddControl(m => m.LastName, ControlType.Text, "Last name").End()
                       .AddControl(m => m.EmailAddress, ControlType.Text, "Email address").End()
                       .AddControl(m => m.AccountEnabled, ControlType.Boolean, "Account enabled").End()
                       .AddControl(m => m.Id, ControlType.Button, "save-changes")
                       .WithMetadata("icon", "save")
                       .WithTask <UserEditSaveChangesTask>(TaskTypeEnum.PeriTask, "user-edit")
                       .End()
                       .End();

            moduleBuilder.AddFlowToModule("", "lab-calculator", "account", flow.Flow);
        }
Exemplo n.º 5
0
        public static void RegisterFlow(IModuleBuilder moduleBuilder)
        {
            var flow = moduleBuilder
                       .WithFlow <SimpleData, SimpleContext>("simple-flow")
                       .WithStep(m => m.Step1)
                       .Next("Next")
                       .GridConfig("1fr")
                       .AddControl(m => m.Shower, ControlType.Boolean, "Toggle to show other value")
                       .End()
                       .AddControl(m => m.DependsOnShower, ControlType.Text, "Toggled Value")
                       .WithReactivity(m => m.Shower != true, ReactivityType.ClearWhen)
                       .WithReactivity(m => m.Shower == true, ReactivityType.VisibleWhen)
                       .End()
                       .End();

            moduleBuilder.AddFlowToModule("", "lab-calculator", "test", flow.Flow);
        }
        public static void RegisterFlow(IModuleBuilder moduleBuilder)
        {
            var flow = moduleBuilder
                       .WithFlow <UserRegistrationModel, UserRegistrationContext>("user-registration")
                       .WithStep(m => m.UserRegistrationDetails, "details", "create")
                       .Next("Register")
                       .GridConfig("5fr 2fr 3fr")
                       .AddControl(m => m.EmailAddress, ControlType.Text, "Email address")
                       .PositionConfig("1 / 2", "1 / 1")
                       .End()
                       .AddControl(m => m.MobilePrefix, ControlType.Select, "Prefix")
                       .PositionConfig("2 / 3", "1 / 1")
                       .WithOptions(new List <SelectOption>
            {
                new SelectOption {
                    Key = "27", Display = "+27"
                },
                new SelectOption {
                    Key = "264", Display = "+264"
                },
            })
                       .End()
                       .AddControl(m => m.MobileNumber, ControlType.Number, "Mobile number")
                       .PositionConfig("3 / 4", "1 / 1")
                       .End()
                       .AddControl(m => m.FirstName, ControlType.Text, "First name")
                       .PositionConfig("1 / 2", "2 / 2")
                       .End()
                       .AddControl(m => m.Surname, ControlType.Text, "Surname")
                       .PositionConfig("2 / 4", "2 / 2")
                       .End()
                       .AddControl(m => m.Password, ControlType.HideableText, "Password")
                       .PositionConfig("1 / 2", "3 / 3")
                       .End()
                       .AddControl(m => m.ConfirmPassword, ControlType.HideableText, "Confirm password")
                       .PositionConfig("2 / 4", "3 / 3")
                       .End()
                       .WithTask <UserRegistrationTask>(TaskTypeEnum.PostTask)
                       .End()
                       .WithStep(m => m.RegistrationDone, "done", "done")
                       .Next("Done")
                       .End();

            moduleBuilder.AddFlowToModule("", "lab-calculator", "account", flow.Flow);
        }
Exemplo n.º 7
0
        public static void RegisterFlow(IModuleBuilder moduleBuilder)
        {
            var flow = moduleBuilder
                       .WithFlow <UserLoginModel, UserLoginContext>("user-login")
                       .WithStep(m => m.UserLoginDetails, "details", "create")
                       .Next("Login")
                       .GridConfig("2fr 5fr 2fr")
                       .AddControl(m => m.UsernameOrEmailAddress, ControlType.Text, "Username or Email address")
                       .PositionConfig("2/3", "1")
                       .End()
                       .AddControl(m => m.Password, ControlType.HideableText, "Password")
                       .PositionConfig("2/3", "2")
                       .End()
                       .WithTask <UserLoginTask>(TaskTypeEnum.PostTask)
                       .WithUiTask(TaskTypeEnum.PostTask, "login")
                       .End();

            moduleBuilder.AddFlowToModule("", "lab-calculator", "account", flow.Flow);
        }
Exemplo n.º 8
0
        public static void RegisterFlow(IModuleBuilder moduleBuilder)
        {
            var flow = moduleBuilder
                       .WithFlow <A7Model, A7Context>("a7")
                       .WithStep(m => m.Data)
                       .GridConfig("repeat(5,1fr)")
                       .WithBorder(BorderEnum.ltrb)
                       .Next("Save")
                       .WithTask <A7CalculationTask>(TaskTypeEnum.PeriTask)
                       .AddDecorator("A2 - The determination of the maximum dry density and optimum moisture content of gravel, soil and sand")
                       .PositionConfig("2/5", "1")
                       .WithMetadata("textAlign", "center")
                       .WithMetadata("textWeight", "bold")
                       .End()
                       .AddArray(m => m.DensityPoints, "Samples")
                       .PositionConfig("1/6", "2")
                       .GridConfig("1fr")
                       .Vertical(5)
                       .MaxRows(5)
                       .AddControl(m => m.SampleMass, ControlType.Text, "Sample Mass").End()
                       .AddControl(m => m.WaterPercAdded, ControlType.Number, "Water % Added").WithSuffix(Appendixes.Percentage).End()
                       .AddControl(m => m.WaterAdded, ControlType.Number, "Water Added").InitiallyDisabled().WithSuffix(Appendixes.MilliLiter).End()
                       .AddControl(m => m.MouldNumber, ControlType.Text, "Mould Number").End()
                       .AddControl(m => m.MouldMass, ControlType.Number, "MouldMass").WithSuffix(Appendixes.Grams).End()
                       .AddControl(m => m.MouldVolume, ControlType.Number, "MouldVolume").WithSuffix(Appendixes.MilliLiterCubed, true).End()
                       .AddControl(m => m.MouldPlusWetMass, ControlType.Number, "Mould + Wet Mass").WithSuffix(Appendixes.Grams).End()
                       .AddControl(m => m.WetDensity, ControlType.Number, "Wet Density").InitiallyDisabled().WithSuffix(Appendixes.KilogramMeterCubed, true).End()
                       .AddControl(m => m.EstimatedDryDensity, ControlType.Number, "Estimated Dry Density").InitiallyDisabled().WithSuffix(Appendixes.KilogramMeterCubed, true).End()
                       .AddControl(m => m.PanNumber, ControlType.Text, "Pan Number").End()
                       .AddControl(m => m.WetMassPlusPan, ControlType.Number, "Wet mass + Pan").WithSuffix(Appendixes.Grams).End()
                       .AddControl(m => m.DryMassPlusPan, ControlType.Number, "Dry mass + Pan").WithSuffix(Appendixes.Grams).End()
                       .AddControl(m => m.PanMass, ControlType.Number, "Pan Mass").WithSuffix(Appendixes.Grams).End()
                       .AddControl(m => m.ActualMoistureContent, ControlType.Number, "Actual Moisture Content").InitiallyDisabled().WithSuffix(Appendixes.Percentage).End()
                       .AddControl(m => m.ActualDryDensity, ControlType.Number, "Actual Dry Density").InitiallyDisabled().WithSuffix(Appendixes.KilogramMeterCubed, true).End()
                       .AddControl(m => m.HygroscopicMoisture, ControlType.Number, "Hygroscopic Moisture").InitiallyDisabled().WithSuffix(Appendixes.Percentage).End()
                       .End()
                       .AddControl(m => m.MaximumDryDensity, ControlType.Number, "Maximum Dry Density").PositionConfig("1", "3").InitiallyDisabled().WithSuffix(Appendixes.KilogramMeterCubed, true).End()
                       .AddControl(m => m.OptimumMoistureContent, ControlType.Number, "Optimum Moisture Content").PositionConfig("1", "4").InitiallyDisabled().WithSuffix(Appendixes.Percentage).End()

                       .End();

            moduleBuilder.AddFlowToModule("", "lab-calculator", "tmh1", flow.Flow);
        }
Exemplo n.º 9
0
        public static void RegisterFlow(IModuleBuilder moduleBuilder)
        {
            var flow = moduleBuilder
                       .WithFlow <A1Model, A1Context>("a1")
                       .RequiresAuthorization()
                       .WithStep(m => m.Data)
                       .GridConfig("3fr 6fr")
                       .Next("Save")
                       .WithTask <A1CalculationTask>(TaskTypeEnum.PeriTask)
                       .AddDecorator("A1 - Grading")
                       .PositionConfig("1/3", "1")
                       .WithMetadata("textAlign", "center")
                       .WithMetadata("textWeight", "bold")
                       .End()
                       .AddDecorator("Initial Sieve").PositionConfig("1", "3").End()
                       .AddControl(m => m.TotalSampleMass, ControlType.Number, "Total Sample Mass").WithSuffix(Appendixes.Grams).PositionConfig("1", "4").End()
                       .AddControl(m => m.TotalRetainedOn19mm, ControlType.Number, "Total Retained 19mm Sieve").WithSuffix(Appendixes.Grams).InitiallyDisabled().PositionConfig("1", "5").End()
                       .AddControl(m => m.RiffledDryMass, ControlType.Number, "Riffled Dry Mass ( < 19 mm)").WithSuffix(Appendixes.Grams).PositionConfig("1", "6").End()
                       .AddControl(m => m.ReductionFactor, ControlType.Number, "Reduction factor").WithSuffix("factor").InitiallyDisabled().PositionConfig("1", "7").End()
                       .AddControl(m => m.InitialSieve, ControlType.Number, "Initial Sieve (<0.425 mm)").WithSuffix(Appendixes.Grams).PositionConfig("1", "8").End()
                       .AddControl(m => m.Washed, ControlType.Number, "Washed (<0.425 mm)").WithSuffix(Appendixes.Grams).PositionConfig("1", "9").End()
                       .AddControl(m => m.Final, ControlType.Number, "Final (<0.425 mm)").WithSuffix(Appendixes.Grams).PositionConfig("1", "10").End()
                       .AddDecorator("Grading").WithMetadata("textWeight", "bold").PositionConfig("1/3", "11").End()
                       .AddArray(m => m.Sieves)
                       .PositionConfig("1/3", "12")
                       .GridConfig("1fr 1fr 1fr 1fr")
                       .HideAddAndDelete()
                       .WithDefaultValue(SievesConstant.A1Sieves)
                       .AddControl(m => m.Size, ControlType.Number, "Sieve Size").PositionConfig("1").WithSuffix(Appendixes.Millimeters).InitiallyDisabled().End()
                       .AddControl(m => m.MassRetained, ControlType.Number, "Mass Retained").WithSuffix(Appendixes.Grams).PositionConfig("2").WithMetadata("decimal", 2).End()
                       .AddControl(m => m.PercPassing, ControlType.Number, "Percentage Passing").WithSuffix(Appendixes.Percentage).PositionConfig("3").InitiallyDisabled().End()
                       .AddControl(m => m.PercRetained, ControlType.Number, "Percentage Retained").WithSuffix(Appendixes.Percentage).PositionConfig("4")
                       .WithReactivity(m => m.Size != "< 0.425", ReactivityType.VisibleWhen)
                       .InitiallyDisabled()
                       .End()
                       .End()
                       .AddControl(m => m.GradingModulus, ControlType.Number, "Grading Modulus").InitiallyDisabled().PositionConfig("1", "13").End()
                       .End();

            moduleBuilder.AddFlowToModule("", "lab-calculator", "tmh1", flow.Flow);
        }