diff --git a/app/Classes/Modules/Companies/Services/UpdatesCompany.php b/app/Classes/Modules/Companies/Services/UpdatesCompany.php new file mode 100644 index 00000000..f89bbca8 --- /dev/null +++ b/app/Classes/Modules/Companies/Services/UpdatesCompany.php @@ -0,0 +1,26 @@ +name = $object->getName(); + $model->reference = $object->getReference(); + $model->type = $object->getType(); + + return $this->handler($model); + } +} \ No newline at end of file diff --git a/app/Classes/Modules/Companies/Standards/Rules/CanUpdateCompany.php b/app/Classes/Modules/Companies/Standards/Rules/CanUpdateCompany.php new file mode 100644 index 00000000..c7bd1f70 --- /dev/null +++ b/app/Classes/Modules/Companies/Standards/Rules/CanUpdateCompany.php @@ -0,0 +1,51 @@ +companyValidation = $companyValidation; + } + + /** + * @return bool + */ + protected function authorized(): bool + { + // TODO Set Authorization rules + return true; + } + + /** + * @param CompanyObject $object + * @return bool + * @throws \App\Classes\Exceptions\RequestValidationException + */ + protected function validators($object): bool + { + return $this->companyValidation->validate($object, 'PUT'); + } + + /** + * @param CompanyObject $object + * @return bool + */ + protected function criteria($object): bool + { + return true; + } +} \ No newline at end of file diff --git a/resources/assets/vue/components/companies/elements/IdentificationVerificationComponent.vue b/resources/assets/vue/components/companies/elements/IdentificationVerificationComponent.vue index 1c14a0fe..29edf834 100644 --- a/resources/assets/vue/components/companies/elements/IdentificationVerificationComponent.vue +++ b/resources/assets/vue/components/companies/elements/IdentificationVerificationComponent.vue @@ -63,9 +63,21 @@