Skip to content

Commit

Permalink
- bug fix validation
Browse files Browse the repository at this point in the history
- standarize loader
  • Loading branch information
sulfanoaf committed Apr 9, 2021
1 parent 0f28317 commit 7f05e9e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Controllers/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function validateData($data, $data_type)
$data_rows = collect($data_type->dataRows)->where('add', 1)->all();
$rules = [];
foreach ($data_rows as $row) {
if ($row->required == 0) {
if ($row->required == 1) {
$rules[$row->field][] = 'required';
if ($row->type == 'relation') {
$relation_detail = [];
Expand Down
2 changes: 1 addition & 1 deletion src/resources/js/pages/menu-management/add.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default {
methods: {
submitForm() {
this.errors = {};
this.$vs.loading();
this.$openLoader();
this.$api.badasoMenu
.add(this.menu)
.then((response) => {
Expand Down
2 changes: 1 addition & 1 deletion src/resources/js/pages/menu-management/edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default {
methods: {
submitForm() {
this.errors = {};
this.$vs.loading();
this.$openLoader();
this.$api.badasoMenu
.edit(this.menu)
.then((response) => {
Expand Down
2 changes: 1 addition & 1 deletion src/resources/js/pages/permission-management/add.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export default {
methods: {
submitForm() {
this.errors = {};
this.$vs.loading();
this.$openLoader();
this.$api.badasoPermission
.add(this.permission)
.then((response) => {
Expand Down
2 changes: 1 addition & 1 deletion src/resources/js/pages/permission-management/edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default {
},
submitForm() {
this.errors = {};
this.$vs.loading();
this.$openLoader();
this.$api.badasoPermission
.edit(this.permission)
.then((response) => {
Expand Down

0 comments on commit 7f05e9e

Please sign in to comment.