@nixweb/nixloc-ui 0.0.300 → 0.0.301

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/package.json +1 -1
  2. package/src/App.vue +13 -0
  3. package/src/component/forms/Button.vue +163 -0
  4. package/src/component/forms/ButtonFilter.vue +75 -0
  5. package/src/component/forms/ButtonGroup.vue +67 -0
  6. package/src/component/forms/ButtonSub.vue +98 -0
  7. package/src/component/forms/ButtonToggle.vue +77 -0
  8. package/src/component/forms/CheckboxGroup.vue +69 -0
  9. package/src/component/forms/CheckboxServer.vue +192 -0
  10. package/src/component/forms/CheckboxSimple.vue +60 -0
  11. package/src/component/forms/Color.vue +38 -0
  12. package/src/component/forms/DateTime.vue +170 -0
  13. package/src/component/forms/DateYearMonth.vue +193 -0
  14. package/src/component/forms/Dropdown.vue +236 -0
  15. package/src/component/forms/EditorHtml.vue +132 -0
  16. package/src/component/forms/FileUpload.vue +170 -0
  17. package/src/component/forms/ImageUpload.vue +214 -0
  18. package/src/component/forms/IncrementDecrement.vue +148 -0
  19. package/src/component/forms/InputAddressGoogle.vue +171 -0
  20. package/src/component/forms/InputCallToAction.vue +135 -0
  21. package/src/component/forms/InputDecimal.vue +153 -0
  22. package/src/component/forms/InputDecimalDiscount.vue +78 -0
  23. package/src/component/forms/InputNumber.vue +160 -0
  24. package/src/component/forms/InputPassword.vue +148 -0
  25. package/src/component/forms/InputTag.vue +125 -0
  26. package/src/component/forms/InputText.vue +174 -0
  27. package/src/component/forms/InputTextEdit.vue +69 -0
  28. package/src/component/forms/InputWhatsApp.vue +48 -0
  29. package/src/component/forms/Modal.vue +57 -0
  30. package/src/component/forms/RadioGroup.vue +91 -0
  31. package/src/component/forms/Select.vue +378 -0
  32. package/src/component/forms/SelectStatic.vue +198 -0
  33. package/src/component/forms/SideBar.vue +100 -0
  34. package/src/component/forms/Slider.vue +18 -0
  35. package/src/component/forms/TextArea.vue +138 -0
  36. package/src/component/forms/Toggle.vue +72 -0
  37. package/src/component/layout/Account.vue +131 -0
  38. package/src/component/layout/Alert.vue +88 -0
  39. package/src/component/layout/Badge.vue +111 -0
  40. package/src/component/layout/BarFloating.vue +68 -0
  41. package/src/component/layout/FixedBar.vue +103 -0
  42. package/src/component/layout/Gantt.vue +128 -0
  43. package/src/component/layout/Header.vue +56 -0
  44. package/src/component/layout/HideShow.vue +62 -0
  45. package/src/component/layout/IconMolded.vue +59 -0
  46. package/src/component/layout/LoadingFullPage.vue +27 -0
  47. package/src/component/layout/Menu.vue +287 -0
  48. package/src/component/layout/Molded.vue +30 -0
  49. package/src/component/layout/NewAccount.vue +136 -0
  50. package/src/component/layout/NewHeader.vue +60 -0
  51. package/src/component/layout/NewIconMolded.vue +71 -0
  52. package/src/component/layout/NewMenu.vue +456 -0
  53. package/src/component/layout/Panel.vue +185 -0
  54. package/src/component/layout/Popover.vue +126 -0
  55. package/src/component/layout/ScrollBar.vue +57 -0
  56. package/src/component/layout/Tab.vue +135 -0
  57. package/src/component/layout/Tag.vue +97 -0
  58. package/src/component/layout/Wizard.vue +211 -0
  59. package/src/component/rental/DisplayCalculatePeriod.vue +49 -0
  60. package/src/component/rental/DisplayPeriodRent.vue +55 -0
  61. package/src/component/rental/DisplayTotalization.vue +86 -0
  62. package/src/component/report/Fields.vue +109 -0
  63. package/src/component/report/Report.vue +314 -0
  64. package/src/component/report/ReportTable.vue +112 -0
  65. package/src/component/report/Totalization.vue +34 -0
  66. package/src/component/shared/CodeEditor.vue +128 -0
  67. package/src/component/shared/Collapse.vue +131 -0
  68. package/src/component/shared/Confirmation.vue +74 -0
  69. package/src/component/shared/DocumentEditor.vue +99 -0
  70. package/src/component/shared/DocumentPreview.vue +81 -0
  71. package/src/component/shared/DocumentPublic.vue +33 -0
  72. package/src/component/shared/ExportExcel.vue +56 -0
  73. package/src/component/shared/ExportPDF.vue +116 -0
  74. package/src/component/shared/FullCalendar.vue +174 -0
  75. package/src/component/shared/HeaderReport.vue +47 -0
  76. package/src/component/shared/HorizontalFilter.vue +64 -0
  77. package/src/component/shared/ListNotifications.vue +70 -0
  78. package/src/component/shared/Loading.vue +107 -0
  79. package/src/component/shared/LoadingCard.vue +65 -0
  80. package/src/component/shared/LoadingMoreButton.vue +23 -0
  81. package/src/component/shared/Messages.vue +109 -0
  82. package/src/component/shared/PDFViewer.vue +24 -0
  83. package/src/component/shared/Pagination.vue +108 -0
  84. package/src/component/shared/ParameterLegend.vue +169 -0
  85. package/src/component/shared/ProgressBar.vue +25 -0
  86. package/src/component/shared/QueryButton.vue +66 -0
  87. package/src/component/shared/Report.vue +200 -0
  88. package/src/component/shared/SaveCancel.vue +99 -0
  89. package/src/component/shared/Search.vue +174 -0
  90. package/src/component/shared/SelectOption.vue +162 -0
  91. package/src/component/shared/Table.vue +174 -0
  92. package/src/component/shared/TableButton.vue +36 -0
  93. package/src/component/shared/TableDraggable.vue +117 -0
  94. package/src/component/shared/TableImport.vue +93 -0
  95. package/src/component/shared/TableItem.vue +214 -0
  96. package/src/component/shared/TableTotalPerPage.vue +78 -0
  97. package/src/component/shared/TableTotalRecords.vue +44 -0
  98. package/src/component/shared/TableTotalization.vue +47 -0
  99. package/src/component/shared/TimeLine.vue +42 -0
  100. package/src/component/shared/Timer.vue +78 -0
  101. package/src/component/shared/Tip.vue +42 -0
  102. package/src/component/shared/Toast.vue +69 -0
  103. package/src/component/shared/ToggleTheme.vue +128 -0
  104. package/src/component/shared/TotalizationReport.vue +86 -0
  105. package/src/component/shared/VerticalFilter.vue +97 -0
  106. package/src/component/shared/automation/ActivitiesList.vue +44 -0
  107. package/src/component/shared/automation/AddRule.vue +61 -0
  108. package/src/component/shared/automation/AutomationBuilder.vue +27 -0
  109. package/src/component/shared/automation/DynamicComponentList.vue +86 -0
  110. package/src/component/shared/automation/SelectRule.vue +98 -0
  111. package/src/component/shared/automation/components/BillingByRent.vue +98 -0
  112. package/src/component/shared/automation/components/SendEmail.vue +94 -0
  113. package/src/component/shared/file-manager/FileManager.vue +391 -0
  114. package/src/component/shared/filter-builder/FilterBuilder.vue +221 -0
  115. package/src/component/shared/filter-builder/FilterQuery.vue +94 -0
  116. package/src/component/shared/query-builder/AddRule.vue +203 -0
  117. package/src/component/shared/query-builder/ConvertToOdata.js +86 -0
  118. package/src/component/shared/query-builder/DynamicComponent.vue +161 -0
  119. package/src/component/shared/query-builder/DynamicComponentList.vue +70 -0
  120. package/src/component/shared/query-builder/Fields.vue +93 -0
  121. package/src/component/shared/query-builder/QueryBuilder.vue +69 -0
  122. package/src/component/shared/query-builder/Rules.vue +68 -0
  123. package/src/component/shared/query-builder/SelectRule.vue +97 -0
  124. package/src/component/shared/query-builder/Tags.vue +59 -0
  125. package/src/component/shared/query-builder/utilities.js +22 -0
  126. package/src/component/signature/Payment.vue +161 -0
  127. package/src/component/signature/Warning.vue +76 -0
  128. package/src/component/template/ListViewWithDataHandler.vue +429 -0
  129. package/src/component/template/ReportCreateUpdate.vue +110 -0
  130. package/src/component/template/ViewTemplateConfiguration.vue +64 -0
  131. package/src/component/template/ViewTemplateDocumentView.vue +213 -0
  132. package/src/component/template/ViewTemplateImportFile.vue +347 -0
  133. package/src/component/template/ViewTemplateReportList.vue +217 -0
  134. package/src/component/template/ViewTemplateReportPreview.vue +432 -0
  135. package/src/component/template/ViewTemplateSelectOption.vue +46 -0
  136. package/src/component/template/ViewTemplateWithSalveCancel.vue +32 -0
  137. package/src/component/template/ViewTemplateWithTable.vue +62 -0
  138. package/src/component/template/model/Report.js +6 -0
  139. package/src/component/training/Course.vue +344 -0
  140. package/src/component/training/CourseView.vue +190 -0
  141. package/src/component/value-objects/Address.js +11 -0
  142. package/src/component/value-objects/Address.vue +157 -0
  143. package/src/component/value-objects/Contact.js +7 -0
  144. package/src/component/value-objects/Contact.vue +106 -0
  145. package/src/component/value-objects/Person.js +10 -0
  146. package/src/component/value-objects/Person.vue +129 -0
  147. package/src/config/axios.js +9 -0
  148. package/src/config/dicas.js +15 -0
  149. package/src/config/router.js +14 -0
  150. package/src/config/token.js +15 -0
  151. package/src/main.js +23 -0
  152. package/src/store/modules/automation.js +31 -0
  153. package/src/store/modules/generic.js +816 -0
  154. package/src/store/modules/report.js +278 -0
  155. package/src/store/modules/user.js +67 -0
  156. package/src/store/modules/util.js +26 -0
  157. package/src/store/modules/validation.js +39 -0
  158. package/src/store/store.js +14 -0
@@ -0,0 +1,157 @@
1
+ <template>
2
+ <div>
3
+ <b-row>
4
+ <b-col xs="12" sm="12" md="12" lg="3" xl="3">
5
+ <InputText title="CEP" field="zipCode" :formName="formName" :mask="'#####-###'" :maxLength="9"
6
+ :required="required" :markFormDirty="markFormDirty" v-model="address.zipCode">
7
+ <div class="glyphicon margin-button">
8
+ <Button _key="searchZipCode" type="success" classIcon="fas fa-search" size="small"
9
+ :disabled="address.zipCode.length < 9" :clicked="searchZipCode" />
10
+ </div>
11
+ </InputText>
12
+ </b-col>
13
+ <b-col xs="12" sm="12" md="12" lg="5" xl="5">
14
+ <InputText title="Endereço" field="street" :formName="formName" :maxLength="150" :required="required"
15
+ :markFormDirty="markFormDirty" v-model="address.street" />
16
+ </b-col>
17
+ <b-col xs="12" sm="12" md="12" lg="2" xl="2">
18
+ <InputText title="Número" field="number" :formName="formName" :maxLength="20" :markFormDirty="markFormDirty"
19
+ v-model="address.number" />
20
+ </b-col>
21
+ <b-col xs="12" sm="12" md="12" lg="2" xl="2">
22
+ <InputText title="Complemento" field="complement" :formName="formName" :maxLength="50"
23
+ :markFormDirty="markFormDirty" v-model="address.complement" />
24
+ </b-col>
25
+ <br />
26
+ </b-row>
27
+ <b-row>
28
+ <b-col xs="12" sm="12" md="12" lg="5" xl="5">
29
+ <InputText title="Bairro" field="province" :formName="formName" :maxLength="100" :required="required"
30
+ :markFormDirty="markFormDirty" v-model="address.province" />
31
+ </b-col><b-col xs="12" sm="12" md="12" lg="5" xl="5">
32
+ <InputText title="Cidade" field="city" :formName="formName" :maxLength="100" :required="required"
33
+ :markFormDirty="markFormDirty" v-model="address.city" />
34
+ </b-col>
35
+ <b-col xs="12" sm="12" md="12" lg="2" xl="2">
36
+ <SelectStatic title="UF" :formName="formName" field="uf" fieldTarget="uf" :required="required"
37
+ :markFormDirty="markFormDirty" v-model="address.state" :data="states" />
38
+ </b-col></b-row>
39
+ </div>
40
+ </template>
41
+
42
+ <script>
43
+ import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
44
+ import InputText from "@nixweb/nixloc-ui/src/component/forms/InputText";
45
+ import SelectStatic from "@nixweb/nixloc-ui/src/component/forms/SelectStatic";
46
+
47
+ import Address from "@nixweb/nixloc-ui/src/component/value-objects/Address.js";
48
+
49
+ import { mapGetters, mapMutations } from "vuex";
50
+
51
+ export default {
52
+ name: "Address",
53
+ props: {
54
+ formName: String,
55
+ markFormDirty: {
56
+ type: Boolean,
57
+ default: true,
58
+ },
59
+ required: {
60
+ type: Boolean,
61
+ default: false,
62
+ },
63
+ value: Object,
64
+ },
65
+ components: { InputText, Button, SelectStatic },
66
+
67
+ data() {
68
+ return {
69
+ address: new Address(),
70
+ states: [
71
+ { content: "AC", id: "AC" },
72
+ { content: "AL", id: "AL" },
73
+ { content: "AP", id: "AP" },
74
+ { content: "AM", id: "AM" },
75
+ { content: "BA", id: "BA" },
76
+ { content: "CE", id: "CE" },
77
+ { content: "DF", id: "DF" },
78
+ { content: "ES", id: "ES" },
79
+ { content: "GO", id: "GO" },
80
+ { content: "MA", id: "MA" },
81
+ { content: "MT", id: "MT" },
82
+ { content: "MS", id: "MS" },
83
+ { content: "MG", id: "MG" },
84
+ { content: "PA", id: "PA" },
85
+ { content: "PB", id: "PB" },
86
+ { content: "PR", id: "PR" },
87
+ { content: "PE", id: "PE" },
88
+ { content: "PI", id: "PI" },
89
+ { content: "RJ", id: "RJ" },
90
+ { content: "RN", id: "RN" },
91
+ { content: "RS", id: "RS" },
92
+ { content: "RO", id: "RO" },
93
+ { content: "RR", id: "RR" },
94
+ { content: "SC", id: "SC" },
95
+ { content: "SP", id: "SP" },
96
+ { content: "SE", id: "SE" },
97
+ { content: "TO", id: "TO" },
98
+ ],
99
+ };
100
+ },
101
+ mounted() {
102
+ if (this.value.zipCode != undefined) this.address = this.value;
103
+ },
104
+ computed: {
105
+ ...mapGetters("generic", ["event"]),
106
+ },
107
+ methods: {
108
+ ...mapMutations("generic", [
109
+ "addEvent",
110
+ "addNotifications",
111
+ "removeLoading",
112
+ ]),
113
+ searchZipCode() {
114
+ let zipCode = this.address.zipCode.replace(/\.|\-/g, "");
115
+ let url = `https://viacep.com.br/ws/${zipCode}/json/`;
116
+ this.$http.get(url).then((response) => {
117
+ let self = this;
118
+ setTimeout(function () {
119
+ self.loadData(response.data);
120
+ self.removeLoading(["searchZipCode"]);
121
+ }, 300);
122
+ });
123
+ },
124
+ loadData(data) {
125
+ this.address.zipCode = data.cep;
126
+ this.address.street = data.logradouro;
127
+ this.address.number = data.complemento;
128
+ this.address.province = data.bairro;
129
+ this.address.city =
130
+ data.localidade == undefined ? data.municipio : data.localidade;
131
+ this.address.state = { id: data.uf, content: data.uf };
132
+ },
133
+ },
134
+ watch: {
135
+ value: {
136
+ handler() {
137
+ this.address = this.value;
138
+ },
139
+ deep: true,
140
+ },
141
+ address: {
142
+ handler() {
143
+ this.$emit("input", this.address);
144
+ },
145
+ deep: true,
146
+ },
147
+ event: {
148
+ handler(event) {
149
+ if (event.name == "searchDocumentFederalRecipe") {
150
+ this.loadData(event.data);
151
+ }
152
+ },
153
+ deep: true,
154
+ },
155
+ },
156
+ };
157
+ </script>
@@ -0,0 +1,7 @@
1
+ export default class DadosContato {
2
+ constructor() {
3
+ this.phone = "";
4
+ this.webSite = "";
5
+ this.email = "";
6
+ }
7
+ }
@@ -0,0 +1,106 @@
1
+ <template>
2
+ <div>
3
+ <b-row>
4
+ <b-col xs="12" sm="12" md="12" lg="4" xl="4">
5
+ <InputText
6
+ title="Telefone"
7
+ field="phone"
8
+ :formName="formName"
9
+ :mask="['(##) ####-####', '(##) #####-####']"
10
+ :maxLength="20"
11
+ :required="required"
12
+ v-model="contact.phone"
13
+ :markFormDirty="markFormDirty"
14
+ />
15
+ </b-col>
16
+ <b-col xs="12" sm="12" md="12" lg="4" xl="4">
17
+ <InputText
18
+ title="Site"
19
+ field="webSite"
20
+ :formName="formName"
21
+ mask=""
22
+ :maxLength="100"
23
+ :required="false"
24
+ v-model="contact.webSite"
25
+ :markFormDirty="markFormDirty"
26
+ />
27
+ </b-col>
28
+ <b-col xs="12" sm="12" md="12" lg="4" xl="4">
29
+ <InputText
30
+ title="E-mail"
31
+ field="email"
32
+ :formName="formName"
33
+ mask=""
34
+ :maxLength="100"
35
+ :required="required"
36
+ v-model="contact.email"
37
+ :markFormDirty="markFormDirty"
38
+ />
39
+ </b-col>
40
+ </b-row>
41
+ </div>
42
+ </template>
43
+
44
+ <script>
45
+ import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
46
+ import InputText from "@nixweb/nixloc-ui/src/component/forms/InputText";
47
+ import Contact from "@nixweb/nixloc-ui/src/component/value-objects/Contact.js";
48
+
49
+ import { mapGetters } from "vuex";
50
+
51
+ export default {
52
+ name: "Contact",
53
+ props: {
54
+ formName: String,
55
+ required: {
56
+ type: Boolean,
57
+ default: false,
58
+ },
59
+ markFormDirty: {
60
+ type: Boolean,
61
+ default: true,
62
+ },
63
+ value: Object,
64
+ },
65
+ components: { InputText, Button },
66
+ data() {
67
+ return {
68
+ contact: new Contact(),
69
+ };
70
+ },
71
+ mounted() {
72
+ if (this.value.phone != undefined) this.contact = this.value;
73
+ },
74
+ methods: {
75
+ loadData(data) {
76
+ this.contact.phone = data.phone;
77
+ this.contact.email = data.email;
78
+ },
79
+ },
80
+ computed: {
81
+ ...mapGetters("generic", ["event"]),
82
+ },
83
+ watch: {
84
+ value: {
85
+ handler() {
86
+ this.contact = this.value;
87
+ },
88
+ deep: true,
89
+ },
90
+ contact: {
91
+ handler() {
92
+ this.$emit("input", this.contact);
93
+ },
94
+ deep: true,
95
+ },
96
+ event: {
97
+ handler(event) {
98
+ if (event.name == "searchDocumentFederalRecipe") {
99
+ this.loadData(event.data);
100
+ }
101
+ },
102
+ deep: true,
103
+ },
104
+ },
105
+ };
106
+ </script>
@@ -0,0 +1,10 @@
1
+ export default class Person {
2
+ constructor() {
3
+ this.typePerson = 2;
4
+ this.companyName = "";
5
+ this.tradeName = "";
6
+ this.document = "";
7
+ this.stateInscription = "";
8
+ this.municipalInscription = "";
9
+ }
10
+ }
@@ -0,0 +1,129 @@
1
+ <template>
2
+ <div>
3
+ <b-row>
4
+ <b-col xs="12" sm="12" md="12" lg="4" xl="4">
5
+ <RadioGroup field="typePerson" :formName="formName" v-show="showTypePerson" :options="[
6
+ { text: 'Física', value: 1 },
7
+ { text: 'Jurídica', value: 2 },
8
+ ]" v-model="person.typePerson" :markFormDirty="markFormDirty" />
9
+ </b-col>
10
+ </b-row>
11
+ <div v-if="showDocument">
12
+ <b-row>
13
+ <b-col xs="12" sm="12" md="12" lg="4" xl="4">
14
+ <InputText :title="person.typePerson == 2 ? 'CNPJ' : 'CPF'" field="document" :formName="formName" :mask="person.typePerson == 2 ? ['##.###.###/####-##'] : ['###.###.###-##']
15
+ " :maxLength="30" :required="required" v-model="person.document" :markFormDirty="markFormDirty">
16
+ <div class="glyphicon margin-button">
17
+ <Button v-if="person.typePerson == 2" _key="searchDocumentFederalRecipe" type="success"
18
+ classIcon="fas fa-search" :disabled="person.document.length < 18" size="small"
19
+ :clicked="searchDocumentFederalRecipe" />
20
+ </div>
21
+ </InputText>
22
+ </b-col>
23
+ <b-col xs="12" sm="12" md="12" lg="4" xl="4">
24
+ <InputText :title="person.typePerson == 2 ? 'Inscrição Estadual' : 'RG'" field="stateInscription"
25
+ :formName="formName" :maxLength="50" :required="required" v-model="person.stateInscription"
26
+ :markFormDirty="markFormDirty" />
27
+ </b-col>
28
+ <b-col xs="12" sm="12" md="12" lg="4" xl="4">
29
+ <InputText v-if="person.typePerson == 2" title="Inscrição Municipal" field="municipalInscription"
30
+ :formName="formName" :maxLength="50" :required="false" v-model="person.municipalInscription"
31
+ :markFormDirty="markFormDirty" />
32
+ </b-col>
33
+ </b-row>
34
+ </div>
35
+ <br v-if="person.typePerson == 2 && showDocument" />
36
+ <b-row>
37
+ <b-col xs="12" sm="12" md="12" lg="8" xl="8">
38
+ <InputText :title="person.typePerson == 2 ? 'Razão Social' : 'Nome'" field="companyName" :formName="formName"
39
+ :required="true" :maxLength="100" v-model="person.companyName" :markFormDirty="markFormDirty" />
40
+ </b-col>
41
+ <b-col xs="12" sm="12" md="12" lg="4" xl="4">
42
+ <InputText :title="person.typePerson == 2 ? 'Fantasia' : 'Apelido'" field="tradeName" :formName="formName"
43
+ :required="true" :maxLength="100" v-model="person.tradeName" :markFormDirty="markFormDirty" />
44
+ </b-col>
45
+ </b-row>
46
+ </div>
47
+ </template>
48
+
49
+ <script>
50
+ import Button from "@nixweb/nixloc-ui/src/component/forms/Button";
51
+ import InputText from "@nixweb/nixloc-ui/src/component/forms/InputText";
52
+ import RadioGroup from "@nixweb/nixloc-ui/src/component/forms/RadioGroup";
53
+ import Person from "@nixweb/nixloc-ui/src/component/value-objects/Person.js";
54
+
55
+ import { mapMutations } from "vuex";
56
+
57
+ export default {
58
+ name: "Person",
59
+ props: {
60
+ formName: String,
61
+ required: {
62
+ type: Boolean,
63
+ default: false,
64
+ },
65
+ showTypePerson: {
66
+ type: Boolean,
67
+ default: true,
68
+ },
69
+ showDocument: {
70
+ type: Boolean,
71
+ default: true,
72
+ },
73
+ markFormDirty: {
74
+ type: Boolean,
75
+ default: true,
76
+ },
77
+ value: Object,
78
+ },
79
+ components: { RadioGroup, InputText, Button },
80
+ data() {
81
+ return {
82
+ person: new Person(),
83
+ };
84
+ },
85
+ mounted() {
86
+ if (this.value.companyName != undefined) this.person = this.value;
87
+ },
88
+ methods: {
89
+ ...mapMutations("generic", [
90
+ "addEvent",
91
+ "addNotifications",
92
+ "removeLoading",
93
+ ]),
94
+ searchDocumentFederalRecipe() {
95
+ let url = `https://ws.hubdodesenvolvedor.com.br/v2/cnpj/?cnpj=${this.person.document}&token=94473735FzLqpNKajP170569464`;
96
+ this.$http.post(url, {}, {}).then((response) => {
97
+ if (response.data.return == "OK") {
98
+ this.addEvent({
99
+ name: "searchDocumentFederalRecipe",
100
+ data: response.data.result,
101
+ });
102
+ this.person.companyName = response.data.result.nome;
103
+ this.person.tradeName = response.data.result.fantasia;
104
+ console.log(response.data.result);
105
+ } else {
106
+ this.addNotifications([
107
+ { message: "CNPJ inválido ou não encontrado." },
108
+ ]);
109
+ }
110
+ this.removeLoading(["searchDocumentFederalRecipe"]);
111
+ });
112
+ },
113
+ },
114
+ watch: {
115
+ value: {
116
+ handler() {
117
+ this.person = this.value;
118
+ },
119
+ deep: true,
120
+ },
121
+ person: {
122
+ handler() {
123
+ this.$emit("input", this.person);
124
+ },
125
+ deep: true,
126
+ },
127
+ },
128
+ };
129
+ </script>
@@ -0,0 +1,9 @@
1
+ import axios from "axios";
2
+
3
+ const BASE_URL = process.env.VUE_APP_API_URL;
4
+
5
+ const api = axios.create({
6
+ baseURL: BASE_URL,
7
+ });
8
+
9
+ export default api;
@@ -0,0 +1,15 @@
1
+ const dicas = [];
2
+
3
+ const manutencao = [
4
+ // { formName: "opcoesFaturamento", field: "unificar", title: "Unificar Cliente", description: "Ao marcar essa opção" },
5
+
6
+ ];
7
+
8
+
9
+ manutencao.forEach(function (obj) {
10
+ dicas.push(obj);
11
+ });
12
+
13
+
14
+
15
+ export default dicas;
@@ -0,0 +1,14 @@
1
+ import Vue from 'vue'
2
+ import Router from 'vue-router'
3
+
4
+ Vue.use(Router)
5
+
6
+ const router = new Router({
7
+ mode: 'history',
8
+ routes: [
9
+ { path: '/', redirect: { name: "" } },
10
+
11
+ ],
12
+ })
13
+
14
+ export default router
@@ -0,0 +1,15 @@
1
+ export default class Token {
2
+
3
+ tokenHeaders() {
4
+ return {
5
+ "Content-Type": "application/json",
6
+ Authorization: "Bearer " + JSON.parse(sessionStorage.vuex).user.userLogged.token
7
+ };
8
+ }
9
+ tokenHeadersFormData() {
10
+ return {
11
+ "Content-Type": "multipart/form-data",
12
+ Authorization: "Bearer " + JSON.parse(sessionStorage.vuex).user.userLogged.token
13
+ };
14
+ }
15
+ }
package/src/main.js ADDED
@@ -0,0 +1,23 @@
1
+ import Vue from 'vue'
2
+ import App from './App.vue'
3
+ import router from './config/router'
4
+ import store from './store/store'
5
+
6
+ import BootstrapVue from 'bootstrap-vue'
7
+ import VueLoading from "vue-loading-template";
8
+ import VueTheMask from 'vue-the-mask'
9
+
10
+ import 'bootstrap/dist/css/bootstrap.css'
11
+ import 'bootstrap-vue/dist/bootstrap-vue.css'
12
+
13
+ Vue.use(BootstrapVue)
14
+ Vue.use(VueLoading)
15
+ Vue.use(VueTheMask)
16
+
17
+ Vue.config.productionTip = false
18
+
19
+ new Vue({
20
+ router,
21
+ store,
22
+ render: h => h(App),
23
+ }).$mount('#app')
@@ -0,0 +1,31 @@
1
+ export default {
2
+ namespaced: true,
3
+ state: {
4
+ rules: [],
5
+ },
6
+ getters: {
7
+ listActivity: (state) => (id) => {
8
+ var selected = state.rules.find(x => x.id == id);
9
+ return selected.listActivity
10
+ },
11
+ },
12
+ mutations: {
13
+ addSelectedRules: (state, obj) => {
14
+ state.rules.push(obj);
15
+ },
16
+ removeRule: (state, id) => {
17
+ let filter = state.rules.filter(x => x.id != id);
18
+ state.rules = filter;
19
+ },
20
+ addActivity: (state, obj) => {
21
+ var selected = state.rules.find(x => x.id == obj.id);
22
+ selected.listActivity.push(obj.activity);
23
+ },
24
+ removeActivity: (state, id) => {
25
+ state.rules.forEach(item => {
26
+ let filter = item.listActivity.filter(x => x.id != id);
27
+ item.listActivity = filter;
28
+ });
29
+ },
30
+ },
31
+ }