|
@@ -144,6 +144,8 @@ class Member extends Component
|
|
|
public $filterCertScaduto = 0;
|
|
public $filterCertScaduto = 0;
|
|
|
public $filterCertInScadenza = 0;
|
|
public $filterCertInScadenza = 0;
|
|
|
public $already_existing = false;
|
|
public $already_existing = false;
|
|
|
|
|
+ private $fileService;
|
|
|
|
|
+
|
|
|
protected $rules = [
|
|
protected $rules = [
|
|
|
'first_name' => 'required',
|
|
'first_name' => 'required',
|
|
|
'last_name' => 'required',
|
|
'last_name' => 'required',
|
|
@@ -408,45 +410,91 @@ class Member extends Component
|
|
|
|
|
|
|
|
public function removeDocument($idx, $type)
|
|
public function removeDocument($idx, $type)
|
|
|
{
|
|
{
|
|
|
- if ($type == 'father') {
|
|
|
|
|
- unset($this->father_document_files[$idx]);
|
|
|
|
|
- } elseif ($type == 'mother') {
|
|
|
|
|
- unset($this->mother_document_files[$idx]);
|
|
|
|
|
- } else {
|
|
|
|
|
- unset($this->document_files[$idx]);
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ if ($type == 'father') {
|
|
|
|
|
+ if (isset($this->father_document_files[$idx])) {
|
|
|
|
|
+ $filePath = $this->father_document_files[$idx];
|
|
|
|
|
+ $this->fileService->deleteFile($filePath);
|
|
|
|
|
+ unset($this->father_document_files[$idx]);
|
|
|
|
|
+ $this->father_document_files = array_values($this->father_document_files);
|
|
|
|
|
+ }
|
|
|
|
|
+ } elseif ($type == 'mother') {
|
|
|
|
|
+ if (isset($this->mother_document_files[$idx])) {
|
|
|
|
|
+ $filePath = $this->mother_document_files[$idx];
|
|
|
|
|
+ $this->fileService->deleteFile($filePath);
|
|
|
|
|
+ unset($this->mother_document_files[$idx]);
|
|
|
|
|
+ $this->mother_document_files = array_values($this->mother_document_files);
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (isset($this->document_files[$idx])) {
|
|
|
|
|
+ $filePath = $this->document_files[$idx];
|
|
|
|
|
+ $this->fileService->deleteFile($filePath);
|
|
|
|
|
+ unset($this->document_files[$idx]);
|
|
|
|
|
+ $this->document_files = array_values($this->document_files);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (\Exception $e) {
|
|
|
|
|
+ session()->flash('error', 'Error removing document: ' . $e->getMessage());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
public function updatedDocuments()
|
|
public function updatedDocuments()
|
|
|
{
|
|
{
|
|
|
- foreach ($this->documents as $document) {
|
|
|
|
|
- $name = $document->getClientOriginalName();
|
|
|
|
|
- $document->storeAs('public', $name);
|
|
|
|
|
- $this->document_files[] = $name;
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ foreach ($this->documents as $document) {
|
|
|
|
|
+ if ($this->dataId > 0) {
|
|
|
|
|
+ $s3Path = $this->fileService->uploadDocument($document, $this->dataId, 'self');
|
|
|
|
|
+ $this->document_files[] = $s3Path;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $name = $document->getClientOriginalName();
|
|
|
|
|
+ $document->storeAs('public', $name);
|
|
|
|
|
+ $this->document_files[] = $name;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ $this->documents = [];
|
|
|
|
|
+ } catch (\Exception $e) {
|
|
|
|
|
+ session()->flash('error', 'Error uploading documents: ' . $e->getMessage());
|
|
|
}
|
|
}
|
|
|
- $this->documents = [];
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public function updatedFatherDocuments()
|
|
public function updatedFatherDocuments()
|
|
|
{
|
|
{
|
|
|
- foreach ($this->father_documents as $document) {
|
|
|
|
|
- $name = $document->getClientOriginalName();
|
|
|
|
|
- $document->storeAs('public', $name);
|
|
|
|
|
- $this->father_document_files[] = $name;
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ foreach ($this->father_documents as $document) {
|
|
|
|
|
+ if ($this->dataId > 0) {
|
|
|
|
|
+ $s3Path = $this->fileService->uploadDocument($document, $this->dataId, 'father');
|
|
|
|
|
+ $this->father_document_files[] = $s3Path;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $name = $document->getClientOriginalName();
|
|
|
|
|
+ $document->storeAs('public', $name);
|
|
|
|
|
+ $this->father_document_files[] = $name;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ $this->father_documents = [];
|
|
|
|
|
+ } catch (\Exception $e) {
|
|
|
|
|
+ session()->flash('error', 'Error uploading father documents: ' . $e->getMessage());
|
|
|
}
|
|
}
|
|
|
- $this->father_documents = [];
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public function updatedMotherDocuments()
|
|
public function updatedMotherDocuments()
|
|
|
{
|
|
{
|
|
|
- foreach ($this->mother_documents as $document) {
|
|
|
|
|
- $name = $document->getClientOriginalName();
|
|
|
|
|
- $document->storeAs('public', $name);
|
|
|
|
|
- $this->mother_document_files[] = $name;
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ foreach ($this->mother_documents as $document) {
|
|
|
|
|
+ if ($this->dataId > 0) {
|
|
|
|
|
+ $s3Path = $this->fileService->uploadDocument($document, $this->dataId, 'mother');
|
|
|
|
|
+ $this->mother_document_files[] = $s3Path;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $name = $document->getClientOriginalName();
|
|
|
|
|
+ $document->storeAs('public', $name);
|
|
|
|
|
+ $this->mother_document_files[] = $name;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ $this->mother_documents = [];
|
|
|
|
|
+ } catch (\Exception $e) {
|
|
|
|
|
+ session()->flash('error', 'Error uploading mother documents: ' . $e->getMessage());
|
|
|
}
|
|
}
|
|
|
- $this->mother_documents = [];
|
|
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
public function resetCategoryFields()
|
|
public function resetCategoryFields()
|
|
|
{
|
|
{
|
|
|
$this->category_category_id = null;
|
|
$this->category_category_id = null;
|
|
@@ -523,6 +571,11 @@ class Member extends Component
|
|
|
$this->birthCities = \App\Models\City::where('province_id', 178)->orderBy('name')->orderBy('name')->get();*/
|
|
$this->birthCities = \App\Models\City::where('province_id', 178)->orderBy('name')->orderBy('name')->get();*/
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ public function boot(){
|
|
|
|
|
+ $this->fileService = app(\App\Services\MemberFileService::class);
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public function updated()
|
|
public function updated()
|
|
|
{
|
|
{
|
|
|
if ($this->isSaving) {
|
|
if ($this->isSaving) {
|
|
@@ -926,16 +979,14 @@ class Member extends Component
|
|
|
}
|
|
}
|
|
|
try {
|
|
try {
|
|
|
|
|
|
|
|
- $name = '';
|
|
|
|
|
|
|
+ $imageName = '';
|
|
|
if ($this->image) {
|
|
if ($this->image) {
|
|
|
- $name = md5($this->image . microtime()) . '.' . $this->image->extension();
|
|
|
|
|
- $this->image->storeAs('public', $name);
|
|
|
|
|
|
|
+ $imageName = md5($this->image . microtime()) . '.' . $this->image->extension();
|
|
|
|
|
+ $this->image->storeAs('public', $imageName);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$docs = implode("|", $this->document_files);
|
|
$docs = implode("|", $this->document_files);
|
|
|
-
|
|
|
|
|
$father_docs = implode("|", $this->father_document_files);
|
|
$father_docs = implode("|", $this->father_document_files);
|
|
|
-
|
|
|
|
|
$mother_docs = implode("|", $this->mother_document_files);
|
|
$mother_docs = implode("|", $this->mother_document_files);
|
|
|
|
|
|
|
|
|
|
|
|
@@ -981,10 +1032,18 @@ class Member extends Component
|
|
|
'phone2' => $this->phone2,
|
|
'phone2' => $this->phone2,
|
|
|
'phone3' => $this->phone3,
|
|
'phone3' => $this->phone3,
|
|
|
'email' => strtolower($this->email),
|
|
'email' => strtolower($this->email),
|
|
|
- 'image' => $name,
|
|
|
|
|
|
|
+ 'image' => $imageName,
|
|
|
'to_complete' => false,
|
|
'to_complete' => false,
|
|
|
'enabled' => $this->enabled
|
|
'enabled' => $this->enabled
|
|
|
]);
|
|
]);
|
|
|
|
|
+ $this->fileService->createMemberFolders($member->id);
|
|
|
|
|
+
|
|
|
|
|
+ if ($this->image) {
|
|
|
|
|
+ $s3ImagePath = $this->fileService->uploadProfileImage($this->image, $member->id);
|
|
|
|
|
+ $member->update(['image' => $s3ImagePath]);
|
|
|
|
|
+ }
|
|
|
|
|
+ $this->migrateTemporaryFiles($member->id);
|
|
|
|
|
+
|
|
|
|
|
|
|
|
session()->flash('success, Tesserato creato');
|
|
session()->flash('success, Tesserato creato');
|
|
|
updateMemberData($member->id);
|
|
updateMemberData($member->id);
|
|
@@ -1000,6 +1059,104 @@ class Member extends Component
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ private function migrateTemporaryFiles($memberId)
|
|
|
|
|
+ {
|
|
|
|
|
+ try {
|
|
|
|
|
+ $updatedPaths = [];
|
|
|
|
|
+
|
|
|
|
|
+ // Migrate document files
|
|
|
|
|
+ $newDocumentFiles = [];
|
|
|
|
|
+ foreach ($this->document_files as $filePath) {
|
|
|
|
|
+ if (strpos($filePath, '/members/') === false) {
|
|
|
|
|
+ // This is a temporary local file, move to S3
|
|
|
|
|
+ $localPath = storage_path('app/public/' . $filePath);
|
|
|
|
|
+ if (file_exists($localPath)) {
|
|
|
|
|
+ $uploadedFile = new \Illuminate\Http\UploadedFile(
|
|
|
|
|
+ $localPath,
|
|
|
|
|
+ basename($filePath),
|
|
|
|
|
+ mime_content_type($localPath),
|
|
|
|
|
+ filesize($localPath),
|
|
|
|
|
+ 0,
|
|
|
|
|
+ true
|
|
|
|
|
+ );
|
|
|
|
|
+ $s3Path = $this->fileService->uploadDocument($uploadedFile, $memberId, 'self');
|
|
|
|
|
+ $newDocumentFiles[] = $s3Path;
|
|
|
|
|
+ // Delete temporary file
|
|
|
|
|
+ unlink($localPath);
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $newDocumentFiles[] = $filePath;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!empty($newDocumentFiles)) {
|
|
|
|
|
+ $updatedPaths['document_files'] = implode('|', $newDocumentFiles);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // Migrate father document files
|
|
|
|
|
+ $newFatherFiles = [];
|
|
|
|
|
+ foreach ($this->father_document_files as $filePath) {
|
|
|
|
|
+ if (strpos($filePath, '/members/') === false) {
|
|
|
|
|
+ $localPath = storage_path('app/public/' . $filePath);
|
|
|
|
|
+ if (file_exists($localPath)) {
|
|
|
|
|
+ $uploadedFile = new \Illuminate\Http\UploadedFile(
|
|
|
|
|
+ $localPath,
|
|
|
|
|
+ basename($filePath),
|
|
|
|
|
+ mime_content_type($localPath),
|
|
|
|
|
+ filesize($localPath),
|
|
|
|
|
+ 0,
|
|
|
|
|
+ true
|
|
|
|
|
+ );
|
|
|
|
|
+ $s3Path = $this->fileService->uploadDocument($uploadedFile, $memberId, 'father');
|
|
|
|
|
+ $newFatherFiles[] = $s3Path;
|
|
|
|
|
+ unlink($localPath);
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $newFatherFiles[] = $filePath;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!empty($newFatherFiles)) {
|
|
|
|
|
+ $updatedPaths['father_document_files'] = implode('|', $newFatherFiles);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // Migrate mother document files
|
|
|
|
|
+ $newMotherFiles = [];
|
|
|
|
|
+ foreach ($this->mother_document_files as $filePath) {
|
|
|
|
|
+ if (strpos($filePath, '/members/') === false) {
|
|
|
|
|
+ $localPath = storage_path('app/public/' . $filePath);
|
|
|
|
|
+ if (file_exists($localPath)) {
|
|
|
|
|
+ $uploadedFile = new \Illuminate\Http\UploadedFile(
|
|
|
|
|
+ $localPath,
|
|
|
|
|
+ basename($filePath),
|
|
|
|
|
+ mime_content_type($localPath),
|
|
|
|
|
+ filesize($localPath),
|
|
|
|
|
+ 0,
|
|
|
|
|
+ true
|
|
|
|
|
+ );
|
|
|
|
|
+ $s3Path = $this->fileService->uploadDocument($uploadedFile, $memberId, 'mother');
|
|
|
|
|
+ $newMotherFiles[] = $s3Path;
|
|
|
|
|
+ unlink($localPath);
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $newMotherFiles[] = $filePath;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!empty($newMotherFiles)) {
|
|
|
|
|
+ $updatedPaths['mother_document_files'] = implode('|', $newMotherFiles);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // Update member with new S3 paths
|
|
|
|
|
+ if (!empty($updatedPaths)) {
|
|
|
|
|
+ \App\Models\Member::whereId($memberId)->update($updatedPaths);
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (\Exception $e) {
|
|
|
|
|
+ Log::error('Error migrating temporary files', [
|
|
|
|
|
+ 'member_id' => $memberId,
|
|
|
|
|
+ 'error' => $e->getMessage()
|
|
|
|
|
+ ]);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
public function duplicate($id)
|
|
public function duplicate($id)
|
|
|
{
|
|
{
|
|
|
$member = \App\Models\Member::findOrFail($id);
|
|
$member = \App\Models\Member::findOrFail($id);
|
|
@@ -1179,12 +1336,12 @@ class Member extends Component
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
|
|
|
|
|
|
- $name = '';
|
|
|
|
|
|
|
+ $imagePath = $this->image_old; // Keep existing if no new image
|
|
|
if ($this->image) {
|
|
if ($this->image) {
|
|
|
- $name = md5($this->image . microtime()) . '.' . $this->image->extension();
|
|
|
|
|
- $this->image->storeAs('public', $name);
|
|
|
|
|
|
|
+ $imagePath = $this->fileService->uploadProfileImage($this->image, $this->dataId);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
$docs = implode("|", $this->document_files);
|
|
$docs = implode("|", $this->document_files);
|
|
|
$father_docs = implode("|", $this->father_document_files);
|
|
$father_docs = implode("|", $this->father_document_files);
|
|
|
$mother_docs = implode("|", $this->mother_document_files);
|
|
$mother_docs = implode("|", $this->mother_document_files);
|
|
@@ -1226,7 +1383,7 @@ class Member extends Component
|
|
|
'nation_id' => $this->nation_id > 0 ? $this->nation_id : null,
|
|
'nation_id' => $this->nation_id > 0 ? $this->nation_id : null,
|
|
|
'province_id' => $this->province_id > 0 ? $this->province_id : null,
|
|
'province_id' => $this->province_id > 0 ? $this->province_id : null,
|
|
|
'city_id' => $this->city_id > 0 ? $this->city_id : null,
|
|
'city_id' => $this->city_id > 0 ? $this->city_id : null,
|
|
|
- 'image' => $name != '' ? $name : $this->image_old,
|
|
|
|
|
|
|
+ 'image' => $imagePath,
|
|
|
'phone' => $this->phone,
|
|
'phone' => $this->phone,
|
|
|
'phone2' => $this->phone2,
|
|
'phone2' => $this->phone2,
|
|
|
'phone3' => $this->phone3,
|
|
'phone3' => $this->phone3,
|
|
@@ -1751,43 +1908,26 @@ class Member extends Component
|
|
|
|
|
|
|
|
public function storeCertificate()
|
|
public function storeCertificate()
|
|
|
{
|
|
{
|
|
|
-
|
|
|
|
|
$this->validate(['certificate_expire_date' => 'required']);
|
|
$this->validate(['certificate_expire_date' => 'required']);
|
|
|
- // $this->validate();
|
|
|
|
|
- try {
|
|
|
|
|
-
|
|
|
|
|
- $name = '';
|
|
|
|
|
- try {
|
|
|
|
|
|
|
|
|
|
- if ($this->certificate_filename) {
|
|
|
|
|
- $name = md5($this->certificate_filename . microtime()) . '.' . $this->certificate_filename->extension();
|
|
|
|
|
- $this->certificate_filename->storeAs('public', $name);
|
|
|
|
|
- }
|
|
|
|
|
- } catch (\Exception $ex) {
|
|
|
|
|
- //session()->flash('error','Errore (' . $ex->getMessage() . ')');
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ $certificatePath = '';
|
|
|
|
|
+ if ($this->certificate_filename) {
|
|
|
|
|
+ $certificatePath = $this->fileService->uploadCertificate($this->certificate_filename, $this->dataId);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if ($this->dataId > -1) {
|
|
if ($this->dataId > -1) {
|
|
|
\App\Models\MemberCertificate::create([
|
|
\App\Models\MemberCertificate::create([
|
|
|
'member_id' => $this->dataId,
|
|
'member_id' => $this->dataId,
|
|
|
'type' => $this->certificate_type,
|
|
'type' => $this->certificate_type,
|
|
|
- 'filename' => $name,
|
|
|
|
|
|
|
+ 'filename' => $certificatePath,
|
|
|
'expire_date' => $this->certificate_expire_date,
|
|
'expire_date' => $this->certificate_expire_date,
|
|
|
'status' => $this->certificate_status
|
|
'status' => $this->certificate_status
|
|
|
]);
|
|
]);
|
|
|
updateMemberData($this->dataId);
|
|
updateMemberData($this->dataId);
|
|
|
}
|
|
}
|
|
|
- /*else
|
|
|
|
|
- {
|
|
|
|
|
- $this->certificateTmp = new \App\Models\MemberCertificate();
|
|
|
|
|
- $this->certificateTmp->type = $this->certificate_type;
|
|
|
|
|
- $this->certificateTmp->filename = $name;
|
|
|
|
|
- $this->certificateTmp->expire_date = $this->certificate_expire_date;
|
|
|
|
|
- $this->certificateTmp->status = $this->certificate_status;
|
|
|
|
|
- $this->certificateTmp->status = $this->certificate_status;
|
|
|
|
|
- // s $this->member_certificates[] = $certificateTmp;
|
|
|
|
|
- }*/
|
|
|
|
|
- session()->flash('success, Tesserato creato');
|
|
|
|
|
|
|
+
|
|
|
|
|
+ session()->flash('success', 'Certificato creato');
|
|
|
$this->resetCertificateFields();
|
|
$this->resetCertificateFields();
|
|
|
$this->addCertificate = false;
|
|
$this->addCertificate = false;
|
|
|
} catch (\Exception $ex) {
|
|
} catch (\Exception $ex) {
|
|
@@ -1818,28 +1958,23 @@ class Member extends Component
|
|
|
public function updateCertificate()
|
|
public function updateCertificate()
|
|
|
{
|
|
{
|
|
|
$this->validate(['certificate_expire_date' => 'required']);
|
|
$this->validate(['certificate_expire_date' => 'required']);
|
|
|
- try {
|
|
|
|
|
|
|
|
|
|
- $name = '';
|
|
|
|
|
- try {
|
|
|
|
|
-
|
|
|
|
|
- if ($this->certificate_filename) {
|
|
|
|
|
- $name = md5($this->certificate_filename . microtime()) . '.' . $this->certificate_filename->extension();
|
|
|
|
|
- $this->certificate_filename->storeAs('public', $name);
|
|
|
|
|
- }
|
|
|
|
|
- } catch (\Exception $ex) {
|
|
|
|
|
- //session()->flash('error','Errore (' . $ex->getMessage() . ')');
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ $certificatePath = $this->certificate_filename_old; // Keep existing if no new file
|
|
|
|
|
+ if ($this->certificate_filename) {
|
|
|
|
|
+ $certificatePath = $this->fileService->uploadCertificate($this->certificate_filename, $this->dataId);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
\App\Models\MemberCertificate::whereId($this->cardCertificateId)->update([
|
|
\App\Models\MemberCertificate::whereId($this->cardCertificateId)->update([
|
|
|
'member_id' => $this->dataId,
|
|
'member_id' => $this->dataId,
|
|
|
'type' => $this->certificate_type,
|
|
'type' => $this->certificate_type,
|
|
|
- 'filename' => $name != '' ? $name : $this->certificate_filename_old,
|
|
|
|
|
|
|
+ 'filename' => $certificatePath,
|
|
|
'expire_date' => $this->certificate_expire_date,
|
|
'expire_date' => $this->certificate_expire_date,
|
|
|
'status' => $this->certificate_status
|
|
'status' => $this->certificate_status
|
|
|
]);
|
|
]);
|
|
|
|
|
+
|
|
|
updateMemberData($this->dataId);
|
|
updateMemberData($this->dataId);
|
|
|
- session()->flash('success', 'Tesserato aggiornato');
|
|
|
|
|
|
|
+ session()->flash('success', 'Certificato aggiornato');
|
|
|
$this->resetCertificateFields();
|
|
$this->resetCertificateFields();
|
|
|
$this->updateCertificate = false;
|
|
$this->updateCertificate = false;
|
|
|
} catch (\Exception $ex) {
|
|
} catch (\Exception $ex) {
|
|
@@ -1847,6 +1982,15 @@ class Member extends Component
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ public function getFileUrl($filePath)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (!$filePath) {
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return $this->fileService->getFileUrl($filePath);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public function cancelCertificate()
|
|
public function cancelCertificate()
|
|
|
{
|
|
{
|
|
|
$this->addCertificate = false;
|
|
$this->addCertificate = false;
|