cannotAddItems() ->addInput( InputSchema::make() ->key('no_register') ->label(__('domains/billing/field.invoice.detail.no_register')) ->type(InputType::TEXTLINE) ->rules(['required', 'string']) ) ->addInput( InputSchema::make() ->key('student_name') ->label(__('domains/billing/field.invoice.detail.student_name')) ->type(InputType::TEXTLINE) ->rules(['required', 'string']) ) ->addInput( InputSchema::make() ->key('admission_track') ->label(__('domains/billing/field.invoice.detail.admission_track')) ->type(InputType::SELECT) ->rules(['required', 'string']) ->select2() ->withLabel() ->options(fn() => AdmissionTrackLookup::fetch()) ) ->addInput( InputSchema::make() ->key('academic_program') ->label(__('domains/billing/field.invoice.detail.academic_program')) ->type(InputType::SELECT) ->rules(['required', 'string']) ->select2() ->withLabel() ->options(fn() => AcademicProgramLookup::fetch()) ) ->addInput( InputSchema::make() ->key('faculty') ->label(__('domains/billing/field.invoice.detail.faculty')) ->type(InputType::SELECT) ->rules(['required', 'string']) ->select2() ->live() ->withLabel() ->options(fn () => FacultyLookup::fetch()) ) ->addInput( InputSchema::make() ->key('study_program') ->label(__('domains/billing/field.invoice.detail.study_program')) ->type(InputType::SELECT) ->rules(['required', 'string']) ->select2() ->live() ->dependsOn('faculty') ->setContextKeys(['faculty']) ->withLabel() ->options(fn ($context) => StudyProgramLookup::fetch($context)) ) ->addInput( InputSchema::make() ->key('class_year') ->label(__('domains/billing/field.invoice.detail.class_year')) ->type(InputType::TEXTLINE) ->rules(['required', 'string']) ) ->addInput( InputSchema::make() ->key('term_entry') ->label(__('domains/billing/field.invoice.detail.term_entry')) ->type(InputType::SELECT) ->rules(['required']) ->select2() ->options(fn () => TermLookup::fetch()) ) ->addInput( InputSchema::make() ->key('semester') ->label(__('domains/billing/field.invoice.detail.semester')) ->type(InputType::SELECT) ->rules(['required']) ->select2() ->options(array_combine(range(1, 14), range(1, 14))) ) ->addInput( InputSchema::make() ->key('fee_type') ->label(__('domains/billing/field.invoice.detail.fee_type')) ->type(InputType::SELECT) ->rules(['required']) ->select2() ->withLabel() ->options(fn() => FeeTypeLookup::fetch()) ); } }