This commit is contained in:
Jitendra Singh 2020-01-29 16:37:20 +05:30
parent b4dacd4db6
commit 813f61eeaa
4 changed files with 28 additions and 9 deletions

View File

@ -12,4 +12,16 @@ class CountryState extends TranslatableModel implements CountryStateContract
public $translatedAttributes = ['default_name'];
protected $with = ['translations'];
/**
* @return array
*/
public function toArray()
{
$array = parent::toArray();
$array['default_name'] = $this->default_name;
return $array;
}
}

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
{
"/js/ui.js": "/js/ui.js?id=d6802d7d61cdbdfc21e5",
"/js/ui.js": "/js/ui.js?id=fc16a516045fc2b1ab87",
"/css/ui.css": "/css/ui.css?id=0895b560bbc19259cee8"
}

View File

@ -35,14 +35,9 @@
},
mounted: function() {
var this_this = this;
this.addHasErrorClass()
eventBus.$on('onFormError', function() {
$(this_this.$el).find('.control-group').each(function(index, element) {
if ($(element).hasClass('has-error'))
this_this.hasError = true;
});
})
eventBus.$on('onFormError', this.addHasErrorClass);
this.isActive = this.active;
},
@ -50,6 +45,18 @@
methods: {
toggleAccordian: function() {
this.isActive = ! this.isActive;
},
addHasErrorClass: function() {
var this_this = this;
setTimeout(function() {
$(this_this.$el).find('.control-group').each(function(index, element) {
if ($(element).hasClass('has-error')) {
this_this.hasError = true;
}
});
}, 0);
}
},