Code Duplication    Length = 250-272 lines in 2 locations

public/js/resources_js_Pages_Equipment_editEquipment_vue.js 1 location

@@ 732-1003 (lines=272) @@
729
/*!******************************************************************************************************************************************************************************************************************************!*\
730
  !*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/Pages/Equipment/editEquipment.vue?vue&type=template&id=aa5de66c& ***!
731
  \******************************************************************************************************************************************************************************************************************************/
732
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
733
734
"use strict";
735
__webpack_require__.r(__webpack_exports__);
736
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
737
/* harmony export */   "render": () => (/* binding */ render),
738
/* harmony export */   "staticRenderFns": () => (/* binding */ staticRenderFns)
739
/* harmony export */ });
740
var render = function() {
741
  var _vm = this
742
  var _h = _vm.$createElement
743
  var _c = _vm._self._c || _h
744
  return _c("div", [
745
    _vm._m(0),
746
    _vm._v(" "),
747
    _c("div", { staticClass: "row grid-margin justify-content-center" }, [
748
      _c("div", { staticClass: "col-md-6" }, [
749
        _c("div", { staticClass: "card" }, [
750
          _c(
751
            "div",
752
            { staticClass: "card-body" },
753
            [
754
              _c("ValidationObserver", {
755
                scopedSlots: _vm._u([
756
                  {
757
                    key: "default",
758
                    fn: function(ref) {
759
                      var handleSubmit = ref.handleSubmit
760
                      return [
761
                        _c(
762
                          "b-form",
763
                          {
764
                            attrs: { novalidate: "" },
765
                            on: {
766
                              submit: function($event) {
767
                                $event.preventDefault()
768
                                return handleSubmit(_vm.submitForm)
769
                              }
770
                            }
771
                          },
772
                          [
773
                            _c("dropdown-input", {
774
                              attrs: {
775
                                label: "Select Category",
776
                                name: "category",
777
                                "text-field": "name",
778
                                "value-field": "name",
779
                                placeholder:
780
                                  "Select A Category This Equipment Belongs To",
781
                                rules: "required",
782
                                options: _vm.categories
783
                              },
784
                              model: {
785
                                value: _vm.form.cat_id,
786
                                callback: function($$v) {
787
                                  _vm.$set(_vm.form, "cat_id", $$v)
788
                                },
789
                                expression: "form.cat_id"
790
                              }
791
                            }),
792
                            _vm._v(" "),
793
                            _c("text-input", {
794
                              attrs: {
795
                                label: "Equipment Name",
796
                                rules: "required|no-special",
797
                                name: "name",
798
                                placeholder:
799
                                  "Enter A Unique Name for the Equipment"
800
                              },
801
                              model: {
802
                                value: _vm.form.name,
803
                                callback: function($$v) {
804
                                  _vm.$set(_vm.form, "name", $$v)
805
                                },
806
                                expression: "form.name"
807
                              }
808
                            }),
809
                            _vm._v(" "),
810
                            _c("fieldset", [
811
                              _c("label", [
812
                                _vm._v("Customer Information to Gather:")
813
                              ])
814
                            ]),
815
                            _vm._v(" "),
816
                            _c(
817
                              "draggable",
818
                              {
819
                                attrs: {
820
                                  animation: "200",
821
                                  list: _vm.form.data_fields
822
                                }
823
                              },
824
                              _vm._l(_vm.form.data_fields, function(
825
                                name,
826
                                index
827
                              ) {
828
                                return _c(
829
                                  "b-input-group",
830
                                  { key: index, staticClass: "my-2" },
831
                                  [
832
                                    _c(
833
                                      "b-input-group-prepend",
834
                                      {
835
                                        staticClass: "align-middle d-block mr-1"
836
                                      },
837
                                      [
838
                                        _c("i", {
839
                                          directives: [
840
                                            {
841
                                              name: "b-tooltip",
842
                                              rawName: "v-b-tooltip.hover",
843
                                              modifiers: { hover: true }
844
                                            }
845
                                          ],
846
                                          staticClass:
847
                                            "fas fa-sort align-middle pointer",
848
                                          attrs: {
849
                                            title: "Drag to Change Order"
850
                                          }
851
                                        })
852
                                      ]
853
                                    ),
854
                                    _vm._v(" "),
855
                                    _c("b-form-input", {
856
                                      attrs: {
857
                                        type: "text",
858
                                        list: "data-list",
859
                                        placeholder:
860
                                          "Input information to gather for the customer",
861
                                        autocomplete: "false",
862
                                        disabled: _vm.isNewOption(name)
863
                                      },
864
                                      model: {
865
                                        value: _vm.form.data_fields[index],
866
                                        callback: function($$v) {
867
                                          _vm.$set(
868
                                            _vm.form.data_fields,
869
                                            index,
870
                                            $$v
871
                                          )
872
                                        },
873
                                        expression: "form.data_fields[index]"
874
                                      }
875
                                    }),
876
                                    _vm._v(" "),
877
                                    _c(
878
                                      "b-input-group-append",
879
                                      {
880
                                        staticClass: "align-middle d-block ml-1"
881
                                      },
882
                                      [
883
                                        _c("i", {
884
                                          directives: [
885
                                            {
886
                                              name: "b-tooltip",
887
                                              rawName: "v-b-tooltip.hover",
888
                                              modifiers: { hover: true }
889
                                            }
890
                                          ],
891
                                          staticClass:
892
                                            "far fa-times-circle text-danger pointer",
893
                                          attrs: {
894
                                            title: "Remove this Option"
895
                                          },
896
                                          on: {
897
                                            click: function($event) {
898
                                              return _vm.delOption(name, index)
899
                                            }
900
                                          }
901
                                        })
902
                                      ]
903
                                    )
904
                                  ],
905
                                  1
906
                                )
907
                              }),
908
                              1
909
                            ),
910
                            _vm._v(" "),
911
                            _c(
912
                              "div",
913
                              [
914
                                _c(
915
                                  "b-button",
916
                                  {
917
                                    staticClass: "float-right my-2",
918
                                    attrs: { variant: "warning" },
919
                                    on: { click: _vm.addRow }
920
                                  },
921
                                  [
922
                                    _c("i", { staticClass: "fas fa-plus" }),
923
                                    _vm._v(" Add Row")
924
                                  ]
925
                                )
926
                              ],
927
                              1
928
                            ),
929
                            _vm._v(" "),
930
                            _c(
931
                              "datalist",
932
                              { attrs: { id: "data-list" } },
933
                              _vm._l(_vm.data_list, function(data) {
934
                                return _c("option", { key: data }, [
935
                                  _vm._v(_vm._s(data))
936
                                ])
937
                              }),
938
                              0
939
                            ),
940
                            _vm._v(" "),
941
                            _c("submit-button", {
942
                              attrs: {
943
                                button_text: "Save Changes",
944
                                submitted: _vm.submitted
945
                              }
946
                            })
947
                          ],
948
                          1
949
                        )
950
                      ]
951
                    }
952
                  }
953
                ])
954
              })
955
            ],
956
            1
957
          )
958
        ])
959
      ])
960
    ]),
961
    _vm._v(" "),
962
    _c("div", { staticClass: "row gris-margin justify-content-center" }, [
963
      _c("div", { staticClass: "col-md-4" }, [
964
        _c("div", { staticClass: "card" }, [
965
          _c(
966
            "div",
967
            { staticClass: "card-body text-center" },
968
            [
969
              _c(
970
                "b-button",
971
                {
972
                  attrs: { variant: "danger", block: "" },
973
                  on: { click: _vm.deleteEquipment }
974
                },
975
                [_vm._v("Delete Equipment")]
976
              )
977
            ],
978
            1
979
          )
980
        ])
981
      ])
982
    ])
983
  ])
984
}
985
var staticRenderFns = [
986
  function() {
987
    var _vm = this
988
    var _h = _vm.$createElement
989
    var _c = _vm._self._c || _h
990
    return _c("div", { staticClass: "row grid-margin" }, [
991
      _c("div", { staticClass: "col-md-12" }, [
992
        _c("h4", { staticClass: "text-center text-md-left" }, [
993
          _vm._v("Equipment")
994
        ])
995
      ])
996
    ])
997
  }
998
]
999
render._withStripped = true
1000
1001
1002
1003
/***/ })
1004
1005
}]);

public/js/resources_js_Pages_Equipment_createEquipment_vue.js 1 location

@@ 642-891 (lines=250) @@
639
/*!********************************************************************************************************************************************************************************************************************************!*\
640
  !*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/Pages/Equipment/createEquipment.vue?vue&type=template&id=2ea88798& ***!
641
  \********************************************************************************************************************************************************************************************************************************/
642
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
643
644
"use strict";
645
__webpack_require__.r(__webpack_exports__);
646
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
647
/* harmony export */   "render": () => (/* binding */ render),
648
/* harmony export */   "staticRenderFns": () => (/* binding */ staticRenderFns)
649
/* harmony export */ });
650
var render = function() {
651
  var _vm = this
652
  var _h = _vm.$createElement
653
  var _c = _vm._self._c || _h
654
  return _c("div", [
655
    _vm._m(0),
656
    _vm._v(" "),
657
    _c("div", { staticClass: "row grid-margin justify-content-center" }, [
658
      _c("div", { staticClass: "col-md-6" }, [
659
        _c("div", { staticClass: "card" }, [
660
          _c(
661
            "div",
662
            { staticClass: "card-body" },
663
            [
664
              _c("ValidationObserver", {
665
                scopedSlots: _vm._u([
666
                  {
667
                    key: "default",
668
                    fn: function(ref) {
669
                      var handleSubmit = ref.handleSubmit
670
                      return [
671
                        _c(
672
                          "b-form",
673
                          {
674
                            attrs: { novalidate: "" },
675
                            on: {
676
                              submit: function($event) {
677
                                $event.preventDefault()
678
                                return handleSubmit(_vm.submitForm)
679
                              }
680
                            }
681
                          },
682
                          [
683
                            _c("dropdown-input", {
684
                              attrs: {
685
                                label: "Select Category",
686
                                name: "category",
687
                                "text-field": "name",
688
                                "value-field": "name",
689
                                placeholder:
690
                                  "Select A Category This Equipment Belongs To",
691
                                rules: "required",
692
                                options: _vm.categories
693
                              },
694
                              model: {
695
                                value: _vm.form.cat_id,
696
                                callback: function($$v) {
697
                                  _vm.$set(_vm.form, "cat_id", $$v)
698
                                },
699
                                expression: "form.cat_id"
700
                              }
701
                            }),
702
                            _vm._v(" "),
703
                            _c("text-input", {
704
                              attrs: {
705
                                label: "Equipment Name",
706
                                rules: "required|no-special",
707
                                name: "name",
708
                                placeholder:
709
                                  "Enter A Unique Name for the Equipment"
710
                              },
711
                              model: {
712
                                value: _vm.form.name,
713
                                callback: function($$v) {
714
                                  _vm.$set(_vm.form, "name", $$v)
715
                                },
716
                                expression: "form.name"
717
                              }
718
                            }),
719
                            _vm._v(" "),
720
                            _c("fieldset", [
721
                              _c("label", [
722
                                _vm._v("Customer Information to Gather:")
723
                              ])
724
                            ]),
725
                            _vm._v(" "),
726
                            _c(
727
                              "draggable",
728
                              {
729
                                attrs: {
730
                                  animation: "200",
731
                                  list: _vm.form.system_data_fields
732
                                }
733
                              },
734
                              _vm._l(_vm.fields, function(index) {
735
                                return _c(
736
                                  "b-input-group",
737
                                  { key: index, staticClass: "my-2" },
738
                                  [
739
                                    _c(
740
                                      "b-input-group-prepend",
741
                                      {
742
                                        staticClass: "align-middle d-block mr-1"
743
                                      },
744
                                      [
745
                                        _c("i", {
746
                                          directives: [
747
                                            {
748
                                              name: "b-tooltip",
749
                                              rawName: "v-b-tooltip.hover",
750
                                              modifiers: { hover: true }
751
                                            }
752
                                          ],
753
                                          staticClass:
754
                                            "fas fa-sort align-middle pointer",
755
                                          attrs: {
756
                                            title: "Drag to Change Order"
757
                                          }
758
                                        })
759
                                      ]
760
                                    ),
761
                                    _vm._v(" "),
762
                                    _c("b-form-input", {
763
                                      attrs: {
764
                                        type: "text",
765
                                        list: "data-list",
766
                                        placeholder:
767
                                          "Input information to gather for the customer",
768
                                        autocomplete: "false"
769
                                      },
770
                                      model: {
771
                                        value: _vm.form.data_fields[index],
772
                                        callback: function($$v) {
773
                                          _vm.$set(
774
                                            _vm.form.data_fields,
775
                                            index,
776
                                            $$v
777
                                          )
778
                                        },
779
                                        expression: "form.data_fields[index]"
780
                                      }
781
                                    }),
782
                                    _vm._v(" "),
783
                                    _c(
784
                                      "b-input-group-append",
785
                                      {
786
                                        staticClass: "align-middle d-block ml-1"
787
                                      },
788
                                      [
789
                                        _c("i", {
790
                                          directives: [
791
                                            {
792
                                              name: "b-tooltip",
793
                                              rawName: "v-b-tooltip.hover",
794
                                              modifiers: { hover: true }
795
                                            }
796
                                          ],
797
                                          staticClass:
798
                                            "far fa-times-circle text-danger pointer",
799
                                          attrs: {
800
                                            title: "Remove this Option"
801
                                          },
802
                                          on: {
803
                                            click: function($event) {
804
                                              return _vm.delOption(index)
805
                                            }
806
                                          }
807
                                        })
808
                                      ]
809
                                    )
810
                                  ],
811
                                  1
812
                                )
813
                              }),
814
                              1
815
                            ),
816
                            _vm._v(" "),
817
                            _c(
818
                              "div",
819
                              [
820
                                _c(
821
                                  "b-button",
822
                                  {
823
                                    staticClass: "float-right my-2",
824
                                    attrs: { variant: "warning" },
825
                                    on: {
826
                                      click: function($event) {
827
                                        _vm.fields++
828
                                      }
829
                                    }
830
                                  },
831
                                  [
832
                                    _c("i", { staticClass: "fas fa-plus" }),
833
                                    _vm._v(" Add Row")
834
                                  ]
835
                                )
836
                              ],
837
                              1
838
                            ),
839
                            _vm._v(" "),
840
                            _c(
841
                              "datalist",
842
                              { attrs: { id: "data-list" } },
843
                              _vm._l(_vm.dataList, function(data) {
844
                                return _c("option", { key: data }, [
845
                                  _vm._v(_vm._s(data))
846
                                ])
847
                              }),
848
                              0
849
                            ),
850
                            _vm._v(" "),
851
                            _c("submit-button", {
852
                              attrs: {
853
                                button_text: "Create Equipment",
854
                                submitted: _vm.submitted
855
                              }
856
                            })
857
                          ],
858
                          1
859
                        )
860
                      ]
861
                    }
862
                  }
863
                ])
864
              })
865
            ],
866
            1
867
          )
868
        ])
869
      ])
870
    ])
871
  ])
872
}
873
var staticRenderFns = [
874
  function() {
875
    var _vm = this
876
    var _h = _vm.$createElement
877
    var _c = _vm._self._c || _h
878
    return _c("div", { staticClass: "row grid-margin" }, [
879
      _c("div", { staticClass: "col-md-12" }, [
880
        _c("h4", { staticClass: "text-center text-md-left" }, [
881
          _vm._v("Equipment")
882
        ])
883
      ])
884
    ])
885
  }
886
]
887
render._withStripped = true
888
889
890
891
/***/ })
892
893
}]);