fix and update the functionality and the ui for accounting automation

This commit is contained in:
Omair Saleh
2023-04-18 12:07:27 +08:00
parent 6aa2ed53c7
commit 4a6ae598fa
38 changed files with 2088 additions and 566 deletions
@@ -28,7 +28,7 @@ class FileObject implements DataTransferObject
*/
public function getData()
{
return in_array($this->getExtension(), ['pdf', 'excel']) ? $this->data : (new imageManager())->make($this->data);
return in_array($this->getExtension(), ['pdf', 'excel', 'text']) ? $this->data : (new imageManager())->make($this->data);
}
/**
@@ -66,7 +66,7 @@ class FileObject implements DataTransferObject
*/
public function getDecodedData(): string
{
return in_array($this->getExtension(), ['pdf', 'excel']) ?
return in_array($this->getExtension(), ['pdf', 'excel', 'text']) ?
base64_decode((explode('base64,', $this->getData()))[1]):
$this->getData()->encode('data-url')->encoded;
}
@@ -83,4 +83,4 @@ class FileObject implements DataTransferObject
}
}