nhance/app/Config/RfqConfig.php
2026-03-23 18:33:11 +05:30

83 lines
2.6 KiB
PHP

<?php
namespace Config;
use CodeIgniter\Config\BaseConfig;
class RfqConfig extends BaseConfig
{
/**
* Google Drive parent folder IDs for RFQ and QCR sheets.
* Values are loaded from .env (RFQ_PARENT_FOLDER_ID).
*/
public string $rfqParentFolderId = '';
public string $qcrParentFolderId = '';
public function __construct()
{
parent::__construct();
$this->rfqParentFolderId = env('RFQ_PARENT_FOLDER_ID', '1MnYh5PTPDlc9mYMGsjmTv02y8EZ-BQf1');
$this->qcrParentFolderId = env('RFQ_PARENT_FOLDER_ID', '1MnYh5PTPDlc9mYMGsjmTv02y8EZ-BQf1');
}
/**
* Default permissions for created sheets.
* Copied from GoogleSheetController::$config.
*/
public array $permissions = [
'editors' => [
'vitvelz@gmail.com',
'velz1990@gmail.com',
'venkateshraman786@gmail.com',
],
'viewers' => [],
];
/**
* Default protections for RFQ sheets.
* Copied from GoogleSheetController::$config.
*/
public array $protections = [
[
'range' => 'RFQ Page!B12:C12',
'users' => [
'velz1990@gmail.com',
'vitvelz@gmail.com',
'firebase-adminsdk-mcdfe@nhance-ee8d1.iam.gserviceaccount.com',
],
'groups' => [],
],
[
'range' => 'Claims Page!A1',
'users' => [
'velz1990@gmail.com',
'venkateshraman786@gmail.com',
'firebase-adminsdk-mcdfe@nhance-ee8d1.iam.gserviceaccount.com',
],
'groups' => [],
],
];
/**
* Placeholder token for past 3 years claims table (written as multi-row values at that cell).
*/
public string $rfqClaimsPlaceholder = '{{CLAIMS_DETAILS}}';
/**
* Maps Google Sheet placeholder => internal key from buildRfqPlaceholderData().
* Add these exact strings in your RFQ templates (any sheet/tab).
*
* @var array<string, string>
*/
public array $rfqPlaceholders = [
'{{INSURED_NAME}}' => 'insured_name',
'{{COMMUNICATION_ADDRESS}}' => 'communication_address',
'{{GST}}' => 'gst',
'{{PAN}}' => 'pan',
'{{POLICY_PERIOD}}' => 'policy_period',
'{{OPPORTUNITY_TYPE}}' => 'opportunity_type',
'{{RISK_LOCATION}}' => 'risk_location',
'{{OCCUPANCY}}' => 'occupancy',
'{{CLAIMS_DETAILS}}' => 'claims_details',
];
}