diff --git a/Modules/Internal/Http/Controllers/Api/CorporateController.php b/Modules/Internal/Http/Controllers/Api/CorporateController.php index abc66eb0..b06476c9 100755 --- a/Modules/Internal/Http/Controllers/Api/CorporateController.php +++ b/Modules/Internal/Http/Controllers/Api/CorporateController.php @@ -673,6 +673,7 @@ class CorporateController extends Controller $row['prorate_lookup'], // "Prorate Lookup", $row['max_days_for_disability'], // "Max Days for Disability", $row['max_period_for_disability'], // "Max Periode of Disability", + $row['limit_free_tc'], // "Currency", $row['currency'], // "Currency", $row['show_benefit_item'], // "Show Benefit Item", $row['show_benefit_value'], // "Show Benefit Value", diff --git a/app/Models/Corporate.php b/app/Models/Corporate.php index c53c7aed..acf73614 100755 --- a/app/Models/Corporate.php +++ b/app/Models/Corporate.php @@ -23,6 +23,7 @@ class Corporate extends Model 'help_text', 'active', 'linking_rules', + 'automatic_linking' ]; protected $casts = [ diff --git a/app/Models/CorporateBenefit.php b/app/Models/CorporateBenefit.php index fadf3470..03b6e177 100755 --- a/app/Models/CorporateBenefit.php +++ b/app/Models/CorporateBenefit.php @@ -69,6 +69,7 @@ class CorporateBenefit extends Model 'show_benefit_item', 'show_benefit_value', 'active', + 'limit_free_tc', 'reason' ]; @@ -127,6 +128,7 @@ class CorporateBenefit extends Model "Prorate Lookup" => 'prorate_lookup', "Max Days for Disability" => 'max_days_for_disability', "Max Periode of Disability" => 'max_period_for_disability', + "Limit Free TC" => 'limit_free_tc', "Currency" => 'currency', "Show Benefit Item" => 'show_benefit_item', "Show Benefit Value" => 'show_benefit_value', @@ -187,6 +189,7 @@ class CorporateBenefit extends Model "Prorate Lookup", "Max Days for Disability", "Max Periode of Disability", + "Limit Free TC", "Currency", "Show Benefit Item", "Show Benefit Value", diff --git a/database/migrations/2023_06_14_093535_add_coloumn_automatic_linking_to_corporates.php b/database/migrations/2023_06_14_093535_add_coloumn_automatic_linking_to_corporates.php new file mode 100644 index 00000000..fd07fedd --- /dev/null +++ b/database/migrations/2023_06_14_093535_add_coloumn_automatic_linking_to_corporates.php @@ -0,0 +1,33 @@ +integer('automatic_linking')->after('active')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('corporates', function (Blueprint $table) { + $table->dropColumn('automatic_linking'); + }); + } +}; diff --git a/database/migrations/2023_06_14_100127_add_coloumn_limit_free_tc_to_corporate_benefits.php b/database/migrations/2023_06_14_100127_add_coloumn_limit_free_tc_to_corporate_benefits.php new file mode 100644 index 00000000..dd606dec --- /dev/null +++ b/database/migrations/2023_06_14_100127_add_coloumn_limit_free_tc_to_corporate_benefits.php @@ -0,0 +1,33 @@ +integer('limit_free_tc')->after('active')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('corporate_benefits', function (Blueprint $table) { + $table->dropColumn('limit_free_tc'); + }); + } +}; diff --git a/frontend/dashboard/src/pages/Corporates/Form.tsx b/frontend/dashboard/src/pages/Corporates/Form.tsx index 014e1bfb..33e2e0af 100755 --- a/frontend/dashboard/src/pages/Corporates/Form.tsx +++ b/frontend/dashboard/src/pages/Corporates/Form.tsx @@ -231,6 +231,7 @@ export default function CorporateForm({ isEdit, currentCorporate }: Props) { welcome_message: currentCorporate?.welcome_message || '', help_text: currentCorporate?.help_text || '', active: currentCorporate?.id ? currentCorporate?.active === 1 : true, + automatic_linking: currentCorporate?.id ? currentCorporate?.automatic_linking === 1 : true, policy_id: currentCorporate?.current_policy?.id || '', policy_code: currentCorporate?.current_policy?.code || '', policy_total_premi: currentCorporate?.current_policy?.total_premi || 0, @@ -303,6 +304,7 @@ export default function CorporateForm({ isEdit, currentCorporate }: Props) { formData.append('name', data.name); formData.append('code', data.code); formData.append('active', data.active ? '1' : '0'); + formData.append('automatic_linking', data.automatic_linking ? 1 : 0); formData.append('type', data.type); formData.append('welcome_message', data.welcome_message); formData.append('reason', data.reason); @@ -575,6 +577,8 @@ export default function CorporateForm({ isEdit, currentCorporate }: Props) { {JSON.stringify(values.active)} + {JSON.stringify(values.automatic_linking)} + Company Logo {/*