🚀 مُصادَق: تحديث برمجي جديد 2026-05-03 02:07
This commit is contained in:
@@ -6,6 +6,7 @@ namespace App\Modules\Companies;
|
|||||||
|
|
||||||
use App\Services\Security\EncryptionService;
|
use App\Services\Security\EncryptionService;
|
||||||
use App\Modules\Companies\CompanyModel;
|
use App\Modules\Companies\CompanyModel;
|
||||||
|
use Ramsey\Uuid\Uuid;
|
||||||
|
|
||||||
final class CompanyService
|
final class CompanyService
|
||||||
{
|
{
|
||||||
@@ -16,6 +17,9 @@ final class CompanyService
|
|||||||
|
|
||||||
public function createCompany(array $data): string
|
public function createCompany(array $data): string
|
||||||
{
|
{
|
||||||
|
if (!isset($data['id'])) {
|
||||||
|
$data['id'] = Uuid::uuid4()->toString();
|
||||||
|
}
|
||||||
// Encrypt sensitive JoFotara credentials
|
// Encrypt sensitive JoFotara credentials
|
||||||
if (isset($data['jofotara_client_id'])) {
|
if (isset($data['jofotara_client_id'])) {
|
||||||
$data['jofotara_client_id_encrypted'] = $this->encryption->encrypt($data['jofotara_client_id']);
|
$data['jofotara_client_id_encrypted'] = $this->encryption->encrypt($data['jofotara_client_id']);
|
||||||
|
|||||||
@@ -375,7 +375,7 @@
|
|||||||
try {
|
try {
|
||||||
const name = document.getElementById('comp-name').value;
|
const name = document.getElementById('comp-name').value;
|
||||||
const tax = document.getElementById('comp-tax').value;
|
const tax = document.getElementById('comp-tax').value;
|
||||||
await API.post('/companies', { name, tax_number: tax });
|
await API.post('/companies', { name, tax_identification_number: tax });
|
||||||
document.getElementById('company-modal').remove();
|
document.getElementById('company-modal').remove();
|
||||||
renderCompanies();
|
renderCompanies();
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user