@props([ // Component configuration: pass these from the host page 'id' => 'saveAndCreate', 'formId' => null, // required: the wrapping form element id that will be submitted 'actionInputId' => 'action-type', // Optional: name of a global callback run before submit; may return/resolve false to cancel 'beforeSubmitCallback' => null, // Feature switches for which actions to show/enable 'canSave' => false, // disables all save actions if false 'supportDrafts' => true, // show/hide "Save As Draft" 'showPrint' => true, // show/hide "Save And Print" // Styling hooks to preserve legacy visual styles 'itemClass' => '', // extra classes for all non-print items (e.g., 'save-font') 'printItemClass' => '', // extra classes for the print item // Print flow state (server indicates redirect back with print intent) 'isPrintOld' => old('is_print'), // preserve state across validation errors 'isPrintRequest' => request('isPrint'), // indicates server redirected back with print intent // Validation checks controlled by the page 'dateFieldName' => null, // required: form input[name] to check against fiscal year (e.g., payment_date) 'requireTypeSelection' => false, // set true to enforce a non-empty selection (e.g., invoice type) 'typeSelectorId' => null, // the select element id to validate when requireTypeSelection=true ]) {{-- USAGE (examples): Invoices: Expenses: Purchase Bills: --}} {{-- Local confirmation modal (namespaced by component id) Displayed when the selected date precedes the fiscal-year boundary; if user proceeds, the same action is submitted. --}} @push('extra_scripts') @endpush