diff --git a/app/Jobs/Invoice/InjectSignature.php b/app/Jobs/Invoice/InjectSignature.php index db67ea2b223e..b296b43e6f6c 100644 --- a/app/Jobs/Invoice/InjectSignature.php +++ b/app/Jobs/Invoice/InjectSignature.php @@ -12,37 +12,17 @@ use Illuminate\Foundation\Bus\Dispatchable; class InjectSignature implements ShouldQueue { use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; - - /** - * @var \App\Models\Invoice | \App\Models\Quote | \App\Models\Credit | \App\Models\PurchaseOrder - */ - public $entity; - - /** - * @var string - */ - public $signature; - - public $contact_id; - - public $ip; - + /** * Create a new job instance. * - * @param $entity + * @param \App\Models\Invoice | \App\Models\Quote | \App\Models\Credit | \App\Models\PurchaseOrder $entity + * @param int $contact_id * @param string $signature + * @param string $ip */ - public function __construct($entity, $contact_id, string $signature, ?string $ip) + public function __construct(public \App\Models\Invoice | \App\Models\Quote | \App\Models\Credit | \App\Models\PurchaseOrder $entity, private int $contact_id, private string $signature, private ?string $ip) { - $this->entity = $entity; - - $this->contact_id = $contact_id; - - $this->signature = $signature; - - $this->ip = $ip; - } /** diff --git a/app/Transformers/DocumentTransformer.php b/app/Transformers/DocumentTransformer.php index 5e409a044810..1b167ae21691 100644 --- a/app/Transformers/DocumentTransformer.php +++ b/app/Transformers/DocumentTransformer.php @@ -51,6 +51,7 @@ class DocumentTransformer extends EntityTransformer 'archived_at' => (int) $document->deleted_at, 'created_at' => (int) $document->created_at, 'is_deleted' => (bool) false, + 'is_public' => (bool) $document->is_public, ]; } } diff --git a/database/migrations/2023_08_08_212710_add_signature_ip_address_to_purchase_order_invitations.php b/database/migrations/2023_08_08_212710_add_signature_ip_address_to_purchase_order_invitations.php new file mode 100644 index 000000000000..0146e22ef9fa --- /dev/null +++ b/database/migrations/2023_08_08_212710_add_signature_ip_address_to_purchase_order_invitations.php @@ -0,0 +1,29 @@ +text('signature_ip')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +};