Untitled

mail@pastecode.io avatar
unknown
plain_text
2 days ago
16 kB
3
Indexable
Never
- VaraosaPalautusAdd:
    Control: Screen
    Properties:
      BackgroundImage: =Backround
      Fill: =RGBA(255, 255, 255, 1)
      ImagePosition: =ImagePosition.Fill
    Children:
    - MainContainerVaraosa_1:
        Control: GroupContainer
        Variant: verticalAutoLayoutContainer
        Properties:
          Height: =Parent.Height
          LayoutAlignItems: =LayoutAlignItems.Center
          LayoutDirection: =LayoutDirection.Vertical
          LayoutJustifyContent: =LayoutJustifyContent.Center
          LayoutMode: =LayoutMode.Auto
          Width: =Parent.Width
        Children:
        - Container8_1:
            Control: GroupContainer
            Variant: horizontalAutoLayoutContainer
            Properties:
              AlignInContainer: =AlignInContainer.SetByContainer
              FillPortions: =0
              Height: =80
              LayoutMode: =LayoutMode.Auto
              Width: |+
                =Parent.Width - 200
            Children:
            - Label5_1:
                Control: Label
                Properties:
                  Text: '="Lisää osat osapalautukseen" '
                  FillPortions: =1
                  Font: =Font.'Lato Light'
                  Height: =80
                  LayoutMinWidth: =300
                  Size: =24
                  Width: |+
                    =Parent.Width - 200
            - Label3:
                Control: Label
                Properties:
                  Text: =FormVaraosapalautusAloita.LastSubmit.ID
                  Align: =Align.Center
                  Height: =80
            - Image5_1:
                Control: Image
                Properties:
                  Image: =logo
                  Height: =80
                  Visible: =false
                  Width: =150
        - Container9_1:
            Control: GroupContainer
            Variant: horizontalAutoLayoutContainer
            Properties:
              AlignInContainer: =AlignInContainer.SetByContainer
              FillPortions: =0
              Height: =50
              LayoutMode: =LayoutMode.Auto
              Width: =Parent.Width - 200
            Children:
            - Label7:
                Control: Label
                Properties:
                  Text: ="Osanumero"
                  Align: =Align.Center
                  BorderStyle: =BorderStyle.Dotted
                  BorderThickness: =0.5
                  FontWeight: =FontWeight.Bold
                  Height: =50
                  Width: =InputOsanumero.Width
            - Label7_1:
                Control: Label
                Properties:
                  Text: ="Nimike"
                  Align: =Align.Center
                  BorderStyle: =BorderStyle.Dotted
                  BorderThickness: =0.5
                  FontWeight: =FontWeight.Bold
                  Height: =50
                  Width: =InputNimike.Width
            - Label7_2:
                Control: Label
                Properties:
                  Text: ="Kpl"
                  Align: =Align.Center
                  BorderStyle: =BorderStyle.Dotted
                  BorderThickness: =0.5
                  FontWeight: =FontWeight.Bold
                  Height: =50
                  Width: =InputKpl.Width
            - Label7_3:
                Control: Label
                Properties:
                  Text: ="Työnumero"
                  Align: =Align.Center
                  BorderStyle: =BorderStyle.Dotted
                  BorderThickness: =0.5
                  FontWeight: =FontWeight.Bold
                  Height: =50
                  Width: =InputTyönumero.Width
            - Label7_4:
                Control: Label
                Properties:
                  Text: |-
                    ="Kommentti
                    "
                  Align: =Align.Center
                  BorderStyle: =BorderStyle.Dotted
                  BorderThickness: =0.5
                  FillPortions: =1
                  FontWeight: =FontWeight.Bold
                  Height: =50
            - iconClear:
                Control: Classic/Icon
                Variant: Erase
                Properties:
                  OnSelect: =Clear(ColVaraosaPalautus)
                  AlignInContainer: =AlignInContainer.Start
                  Height: =50
                  Icon: =Icon.Erase
                  Width: =30
            - iconAdd:
                Control: Classic/Icon
                Variant: Add
                Properties:
                  OnSelect: |+
                    =Collect(ColVaraosaPalautus, {Osanumero: InputOsanumero.Text, Nimike: InputNimike.Text, kpl: InputKpl.Text, Työnumero: InputTyönumero.Text, Kommentti: InputKommentti.Text, uniqueID: uniquieID1});
                    Set(resetInputFields, true); Set(resetInputFields, false);
                  AlignInContainer: =AlignInContainer.Start
                  Height: =50
                  Icon: =Icon.Add
                  LayoutMinWidth: =25
                  Width: =30
        - Container9:
            Control: GroupContainer
            Variant: horizontalAutoLayoutContainer
            Properties:
              AlignInContainer: =AlignInContainer.SetByContainer
              FillPortions: =0
              Height: =80
              LayoutMode: =LayoutMode.Auto
              Width: =Parent.Width - 200
            Children:
            - InputOsanumero:
                Control: Classic/TextInput
                Properties:
                  Default: =""
                  Reset: =resetInputFields
                  Format: =TextFormat.Number
                  Height: =50
                  Width: |+
                    =Parent.Width / 5 - 15
            - InputNimike:
                Control: Classic/TextInput
                Properties:
                  Default: =""
                  Reset: =resetInputFields
                  Height: =50
                  Width: |+
                    =Parent.Width / 5 - 15
            - InputKpl:
                Control: Classic/TextInput
                Properties:
                  Default: =""
                  Reset: =resetInputFields
                  Format: =TextFormat.Number
                  Height: =50
                  Width: |+
                    =70
            - InputTyönumero:
                Control: Classic/TextInput
                Properties:
                  Default: =""
                  Reset: =resetInputFields
                  Format: =TextFormat.Number
                  Height: =50
                  Width: |+
                    =Parent.Width / 5 - 15
            - InputKommentti:
                Control: Classic/TextInput
                Properties:
                  Default: =""
                  Reset: =resetInputFields
                  FillPortions: =1
                  Height: =50
                  Width: |+
                    =Parent.Width / 5
        - Container12:
            Control: GroupContainer
            Variant: horizontalAutoLayoutContainer
            Properties:
              AlignInContainer: =AlignInContainer.Center
              LayoutMode: =LayoutMode.Auto
              Width: =Parent.Width - 200
            Children:
            - Gallery3:
                Control: Gallery
                Variant: BrowseLayout_Vertical_OneTextVariant_ver5.0
                Properties:
                  Items: |+
                    =ColVaraosaPalautus
                  AlignInContainer: =AlignInContainer.SetByContainer
                  DelayItemLoading: =true
                  Layout: =Layout.Vertical
                  LoadingSpinner: =LoadingSpinner.Data
                  TemplatePadding: =0
                  TemplateSize: =80
                  Width: =Parent.Width
                  X: =40
                  Y: =40
                Children:
                - Container13:
                    Control: GroupContainer
                    Variant: horizontalAutoLayoutContainer
                    Properties:
                      Height: =80
                      LayoutMode: =LayoutMode.Auto
                      Width: =Parent.Width - 200
                    Children:
                    - titleOsanumero:
                        Control: Label
                        Properties:
                          OnSelect: =Select(Parent)
                          Text: =ThisItem.Osanumero
                          FontWeight: =If(ThisItem.IsSelected, FontWeight.Semibold, FontWeight.Normal)
                          Height: =34
                          PaddingBottom: =0
                          PaddingLeft: =0
                          PaddingRight: =0
                          PaddingTop: =0
                          VerticalAlign: =VerticalAlign.Top
                          Width: =175
                          X: =40
                          Y: =(Parent.TemplateHeight / 2) - (Self.Height / 2)
                    - titleKpl:
                        Control: Label
                        Properties:
                          OnSelect: =Select(Parent)
                          Text: =ThisItem.kpl
                          FontWeight: =If(ThisItem.IsSelected, FontWeight.Semibold, FontWeight.Normal)
                          Height: =34
                          PaddingBottom: =0
                          PaddingLeft: =0
                          PaddingRight: =0
                          PaddingTop: =0
                          VerticalAlign: =VerticalAlign.Top
                          Width: =73
                          X: =433
                          Y: =23
                    - titleNimike:
                        Control: Label
                        Properties:
                          OnSelect: =Select(Parent)
                          Text: =ThisItem.Nimike
                          FontWeight: =If(ThisItem.IsSelected, FontWeight.Semibold, FontWeight.Normal)
                          Height: =38
                          PaddingBottom: =0
                          PaddingLeft: =0
                          PaddingRight: =0
                          PaddingTop: =0
                          VerticalAlign: =VerticalAlign.Top
                          Width: =218
                          X: =215
                          Y: =19
                    - titleTyönumero:
                        Control: Label
                        Properties:
                          OnSelect: =Select(Parent)
                          Text: =ThisItem.Työnumero
                          FontWeight: =If(ThisItem.IsSelected, FontWeight.Semibold, FontWeight.Normal)
                          Height: =38
                          PaddingBottom: =0
                          PaddingLeft: =0
                          PaddingRight: =0
                          PaddingTop: =0
                          VerticalAlign: =VerticalAlign.Top
                          Width: =218
                          X: =291
                          Y: =19
                    - titleTyönumero_1:
                        Control: Label
                        Properties:
                          OnSelect: =Select(Parent)
                          Text: =ThisItem.Kommentti
                          FontWeight: =If(ThisItem.IsSelected, FontWeight.Semibold, FontWeight.Normal)
                          Height: =38
                          PaddingBottom: =0
                          PaddingLeft: =0
                          PaddingRight: =0
                          PaddingTop: =0
                          VerticalAlign: =VerticalAlign.Top
                          Width: =380
                          X: =509
                          Y: =19
                    - NextArrow8:
                        Control: Classic/Icon
                        Variant: ChevronRight
                        Properties:
                          OnSelect: =Select(Parent)
                          AccessibleLabel: =Self.Tooltip
                          Tooltip: ="View item details"
                          Color: =RGBA(166, 166, 166, 1)
                          Height: =50
                          Icon: =Icon.ChevronRight
                          PaddingBottom: =12
                          PaddingLeft: =12
                          PaddingRight: =12
                          PaddingTop: =12
                          Width: =50
                          X: =Parent.TemplateWidth - Self.Width - 12
                          Y: =(Parent.TemplateHeight / 2) - (Self.Height / 2)
                    - Separator8:
                        Control: Rectangle
                        Properties:
                          OnSelect: =Select(Parent)
                          Height: =8
                          Width: =Parent.TemplateWidth
                          Y: =Parent.TemplateHeight - Self.Height
                    - Rectangle8:
                        Control: Rectangle
                        Properties:
                          OnSelect: =Select(Parent)
                          Height: =Parent.TemplateHeight - Separator8.Height
                          Visible: =ThisItem.IsSelected
                          Width: =4
        - Container6_1:
            Control: GroupContainer
            Variant: horizontalAutoLayoutContainer
            Properties:
              AlignInContainer: =AlignInContainer.SetByContainer
              FillPortions: =0
              Height: =40
              LayoutGap: =5
              LayoutJustifyContent: =LayoutJustifyContent.Center
              LayoutMinWidth: =100
              LayoutMode: =LayoutMode.Auto
              Y: =728
            Children:
            - Button1_1:
                Control: Classic/Button
                Properties:
                  OnSelect: |-
                    =Remove(Varaosapalautus, LookUp(Varaosapalautus, ID=FormVaraosapalautusAloita.LastSubmit.ID));
                    Navigate(Valitse, ScreenTransition.UnCoverRight)
                  Text: ="Etusivu"
            - Button2_1:
                Control: Classic/Button
                Properties:
                  OnSelect: |-
                    =/*ForAll(ColVaraosaPalautus, Patch(Varaosat, Defaults(Varaosat), {Osanumero: Osanumero, Nimike: Nimike, kpl: kpl, Työmääräin: Työnumero, Kommentti: Kommentti, uniqueID: uniqueID}));
                    Patch(Varaosapalautus, Defaults(Varaosapalautus), {Kuukausi: DataCardValue1.Selected, Tyyppi: DataCardValue5.Selected, UID: uniquieID1});*/

                    //Empty collection for store patch id's 
                    ClearCollect(ColID, {}); 
                    ForAll(ColVaraosaPalautus,Collect(ColID,Patch(Varaosat, Defaults(Varaosat), {Osanumero: Osanumero, Nimike: Nimike, kpl: kpl, Työmääräin: Työnumero, Kommentti: Kommentti, uniqueID: uniqueID}).ID));

                    // Empty collection for create lookup format 
                    ClearCollect(colLookupvalues, {}); 
                    ForAll(ColID As data, Collect(colLookupvalues, {Id: data.Value, Value: data.Value}));
                    Patch(Varaosapalautus, Defaults(Varaosapalautus), {Kuukausi: DataCardValue1.Selected, Tyyppi: DataCardValue5.Selected, UID: uniquieID1});
                  Text: ="Seuraava"
Leave a Comment