Skip to content

Commit

Permalink
Select Dropdowns
Browse files Browse the repository at this point in the history
Console commands and schedulers
MorphTo
Refactor
  • Loading branch information
rxcod9 committed Jan 13, 2023
1 parent da62807 commit 491965f
Show file tree
Hide file tree
Showing 173 changed files with 5,486 additions and 1,231 deletions.
47 changes: 3 additions & 44 deletions config/voyager-crm.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
/*
* The config_key for voyager-crm package.
*/
'config_key' => env('VOYAGER_CRM_CONFIG_KEY', 'joy-voyager-crm'),
'config_key' => env('VOYAGER_CRM_CONFIG_KEY', 'joy-voyager-crm'),

/*
* The route_prefix for voyager-crm package.
*/
'route_prefix' => env('VOYAGER_CRM_ROUTE_PREFIX', 'joy-voyager-crm'),
'route_prefix' => env('VOYAGER_CRM_ROUTE_PREFIX', 'joy-voyager-crm'),

/*
|--------------------------------------------------------------------------
Expand All @@ -20,48 +20,7 @@
|
*/

'controllers' => [
'controllers' => [
'namespace' => 'Joy\\VoyagerCrm\\Http\\Controllers',
],

'default_status' => 'Active',
'statuses' => [
'Active' => 'Active',
'Inactive' => 'Inactive',
],

'currencies' => [
'default_status' => 'Active',
'statuses' => [
'Active' => 'Active',
'Inactive' => 'Inactive',
]
],

'surveys' => [
'default_status' => 'Published',
'statuses' => [
'Published' => 'Published',
'Draft' => 'Draft',
]
],

'bugs' => [
'default_type' => 'Type1',
'types' => [
'Type1' => 'Type1',
'Type2' => 'Type2',
],
'default_status' => 'Active',
'statuses' => [
'Active' => 'Active',
'Inactive' => 'Inactive',
],
'default_priority' => 'Low',
'priorities' => [
'Low' => 'Low',
'Medium' => 'Medium',
'High' => 'High',
]
]
];
53 changes: 47 additions & 6 deletions database/factories/AccountFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,54 @@ class AccountFactory extends Factory
public function definition()
{
return [
'name' => $this->faker->name(),
'description' => $this->faker->text(500),
'account_type' => $this->faker->randomElement([
'Type1',
'Type2',
'name' => $this->faker->name(),
'description' => $this->faker->text(500),
'account_type' => $this->faker->randomKey([
'' => 'None',
'Analyst' => 'Analyst',
'Competitor' => 'Competitor',
'Customer' => 'Customer',
'Integrator' => 'Integrator',
'Investor' => 'Investor',
'Partner' => 'Partner',
'Press' => 'Press',
'Prospect' => 'Prospect',
'Reseller' => 'Reseller',
'Other' => 'Other',
]),
'industry' => $this->faker->randomKey([
'' => 'None',
'Apparel' => 'Apparel',
'Banking' => 'Banking',
'Biotechnology' => 'Biotechnology',
'Chemicals' => 'Chemicals',
'Communications' => 'Communications',
'Construction' => 'Construction',
'Consulting' => 'Consulting',
'Education' => 'Education',
'Electronics' => 'Electronics',
'Energy' => 'Energy',
'Engineering' => 'Engineering',
'Entertainment' => 'Entertainment',
'Environmental' => 'Environmental',
'Finance' => 'Finance',
'Government' => 'Government',
'Healthcare' => 'Healthcare',
'Hospitality' => 'Hospitality',
'Insurance' => 'Insurance',
'Machinery' => 'Machinery',
'Manufacturing' => 'Manufacturing',
'Media' => 'Media',
'Not For Profit' => 'Not For Profit',
'Recreation' => 'Recreation',
'Retail' => 'Retail',
'Shipping' => 'Shipping',
'Technology' => 'Technology',
'Telecommunications' => 'Telecommunications',
'Transportation' => 'Transportation',
'Utilities' => 'Utilities',
'Other' => 'Other',
]),
'industry' => $this->faker->word(10),
'annual_revenue' => $this->faker->word(10),
'phone_fax' => $this->faker->phoneNumber(),
'billing_address_street' => $this->faker->streetName(),
Expand Down
5 changes: 1 addition & 4 deletions database/factories/AlertFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ public function definition()
'accounts',
'contacts',
]),
'type' => $this->faker->randomElement([
'Type1',
'Type2',
]),
'type' => $this->faker->word(),
'url_redirect' => $this->faker->url(),
// 'reminder_id' => null,
'created_at' => $this->faker->dateTime(),
Expand Down
16 changes: 9 additions & 7 deletions database/factories/AmProjecttemplateFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,16 @@ public function definition()
'name' => $this->faker->name(),
'description' => $this->faker->text(500),
'priority' => $this->faker->randomElement([
'Low',
'Medium',
'High',
'High' => 'High',
'Medium' => 'Medium',
'Low' => 'Low',
]),
'status' => $this->faker->randomElement([
'Draft',
'Active',
'Inactive',
'status' => $this->faker->randomKey([
'Draft' => 'Draft',
'In Review' => 'In Review',
'Underway' => 'Underway',
'On_Hold' => 'On Hold',
'Completed' => 'Completed',
]),
'override_business_hours' => $this->faker->boolean(),
'created_at' => $this->faker->dateTime(),
Expand Down
21 changes: 12 additions & 9 deletions database/factories/AmTasktemplateFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,28 @@ public function definition()
'name' => $this->faker->name(),
'description' => $this->faker->text(500),
'priority' => $this->faker->randomElement([
'Low',
'Medium',
'High',
'High' => 'High',
'Medium' => 'Medium',
'Low' => 'Low',
]),
'percent_complete' => $this->faker->numberBetween(1, 100),
'predecessors' => $this->faker->randomNumber(),
'milestone_flag' => $this->faker->boolean(),
'relationship_type' => $this->faker->randomElement([
'FS',
'relationship_type' => $this->faker->randomKey([
'FS' => 'Finish to Start',
'SS' => 'Start to Start',
]),
'task_number' => $this->faker->randomNumber(6),
'order_number' => $this->faker->randomNumber(6),
'estimated_effort' => $this->faker->numberBetween(1, 10),
'utilization' => $this->faker->text(10),
'duration' => $this->faker->numberBetween(1, 100),
'status' => $this->faker->randomElement([
'Not Started',
'Active',
'Inactive',
'status' => $this->faker->randomKey([
'Not Started' => 'Not Started',
'In Progress' => 'In Progress',
'Completed' => 'Completed',
'Pending Input' => 'Pending Input',
'Deferred' => 'Deferred',
]),
'created_at' => $this->faker->dateTime(),
'updated_at' => $this->faker->dateTime(),
Expand Down
27 changes: 25 additions & 2 deletions database/factories/AodIndexeventFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Illuminate\Database\Eloquent\Factories\Factory;
use Joy\VoyagerCrm\Models\AodIndexevent;
use TCG\Voyager\Facades\Voyager;

class AodIndexeventFactory extends Factory
{
Expand All @@ -21,13 +22,35 @@ class AodIndexeventFactory extends Factory
*/
public function definition()
{
$recordType = $this->faker->randomKey([
'' => 'None',
Voyager::modelClass('Account') => 'Account',
Voyager::modelClass('Opportunity') => 'Opportunity',
Voyager::modelClass('CrmCase') => 'Case',
Voyager::modelClass('Lead') => 'Lead',
Voyager::modelClass('Contact') => 'Contact', // cn (11/22/2005) added to support Emails

Voyager::modelClass('Bug') => 'Bug',
Voyager::modelClass('Project') => 'Project',

Voyager::modelClass('Prospect') => 'Target',
Voyager::modelClass('ProjectTask') => 'Project Task',

Voyager::modelClass('Task') => 'Task',

Voyager::modelClass('AosContract') => 'Contract',
Voyager::modelClass('AosInvoice') => 'Invoice',
Voyager::modelClass('AosQuote') => 'Quote',
Voyager::modelClass('AosProduct') => 'Product',
]);

return [
'name' => $this->faker->name(),
'description' => $this->faker->text(500),
'error' => $this->faker->text(50),
'success' => $this->faker->boolean(),
'record_id' => null,
'record_module' => $this->faker->word(),
'record_module' => $recordType,
'record_id' => optional($recordType)->factory(),
'created_at' => $this->faker->dateTime(),
'updated_at' => $this->faker->dateTime(),
// 'deleted_at' => $this->faker->dateTime(),
Expand Down
10 changes: 7 additions & 3 deletions database/factories/AorChartFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ public function definition()
'name' => $this->faker->name(),
'description' => $this->faker->text(500),
'aor_report_id' => null,
'type' => $this->faker->randomElement([
'Type1',
'Type2',
'type' => $this->faker->randomKey([
'bar' => 'Bar chart',
'line' => 'Line chart',
'pie' => 'Pie chart',
'radar' => 'Radar chart',
'stacked_bar' => 'Stacked bar',
'grouped_bar' => 'Grouped bar',
]),
'x_field' => $this->faker->numberBetween(1, 100),
'y_field' => $this->faker->numberBetween(1, 100),
Expand Down
40 changes: 24 additions & 16 deletions database/factories/AorConditionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,35 @@ public function definition()
'description' => $this->faker->text(500),
'aor_report_id' => null,
'condition_order' => $this->faker->numberBetween(1, 100),
'logic_op' => null,
'logic_op' => $this->faker->randomKey([
'And' => 'And',
'OR' => 'OR',
]),
'parenthesis' => null,
'module_path' => null,
'field' => $this->faker->word(),
'field' => $this->faker->randomKey([
'RegularUser' => 'Regular User',
'Administrator' => 'Administrator',
]),
'operator' => $this->faker->randomKey([
'equal_to' => 'equal_to',
'not_equal_to' => 'not_equal_to',
'contains' => 'contains',
'not_contains' => 'not_contains',
'starts_with' => 'starts_with',
'not_starts_with' => 'not_starts_with',
'ends_with' => 'ends_with',
'not_ends_with' => 'not_ends_with',
'is_null' => 'is_null',
'not_null' => 'not_null',
'in' => 'in',
'not_in' => 'not_in',
'Equal_To' => 'Equal To',
'Not_Equal_To' => 'Not Equal To',
'Greater_Than' => 'Greater Than',
'Less_Than' => 'Less Than',
'Greater_Than_or_Equal_To' => 'Greater Than or Equal To',
'Less_Than_or_Equal_To' => 'Less Than or Equal To',
'Contains' => 'Contains',
'Not_Contains' => 'Not Contains',
'Starts_With' => 'Starts With',
'Ends_With' => 'Ends With',
]),
'value_type' => $this->faker->randomKey([
'value' => 'value',
'field' => 'field',
'Value' => 'Value',
'Field' => 'Field',
'Date' => 'Date',
'Multi' => 'One of',
'Period' => 'Period',
'CurrentUserID' => 'Current User',
]),
'value' => $this->faker->text(50),
'parameter' => $this->faker->boolean(),
Expand Down
8 changes: 4 additions & 4 deletions database/factories/AosContractFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ public function definition()
'company_signed_date' => $this->faker->dateTimeBetween('-1month', 'now')->format('Y-m-d'),
'renewal_reminder_date' => $this->faker->dateTimeBetween('-1month', 'now'),
'contract_type' => $this->faker->randomKey([
'Type1' => 'Type1',
'Type2' => 'Type2',
'Type' => 'Type',
]),
'total_contract_value' => $this->faker->randomFloat(2),
'total_contract_value_usdollar' => $this->faker->randomFloat(2),
Expand All @@ -57,8 +56,9 @@ public function definition()
'total_amount' => $this->faker->randomFloat(2),
'total_amount_usdollar' => $this->faker->randomFloat(2),
'status' => $this->faker->randomKey([
'Active' => 'Active',
'Inactive' => 'Inactive',
'Not Started' => 'Not Started',
'In Progress' => 'In Progress',
'Signed' => 'Signed',
]),
'created_at' => $this->faker->dateTime(),
'updated_at' => $this->faker->dateTime(),
Expand Down
6 changes: 4 additions & 2 deletions database/factories/AosInvoiceFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ public function definition()
'due_date' => $this->faker->dateTimeBetween('-1month', 'now')->format('Y-m-d'),
'template_ddown_c' => null,
'status' => $this->faker->randomKey([
'Active' => 'Active',
'Inactive' => 'Inactive',
'' => 'None',
'Paid' => 'Paid',
'Unpaid' => 'Unpaid',
'Cancelled' => 'Cancelled',
]),
'created_at' => $this->faker->dateTime(),
'updated_at' => $this->faker->dateTime(),
Expand Down
12 changes: 10 additions & 2 deletions database/factories/AosLineItemGroupFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Illuminate\Database\Eloquent\Factories\Factory;
use Joy\VoyagerCrm\Models\AosLineItemGroup;
use TCG\Voyager\Facades\Voyager;

class AosLineItemGroupFactory extends Factory
{
Expand All @@ -21,6 +22,13 @@ class AosLineItemGroupFactory extends Factory
*/
public function definition()
{
$parentType = $this->faker->randomKey([
'' => 'None',
Voyager::modelClass('AosQuote') => 'Quote',
Voyager::modelClass('AosInvoice') => 'Invoice',
Voyager::modelClass('AosContract') => 'Contract',
]);

return [
'name' => $this->faker->name(),
'description' => $this->faker->text(500),
Expand All @@ -36,8 +44,8 @@ public function definition()
'subtotal_tax_amount_usdollar' => $this->faker->randomFloat(6),
'total_amount' => $this->faker->randomFloat(6),
'total_amount_usdollar' => $this->faker->randomFloat(6),
'parent_type' => null,
'parent_id' => null,
'parent_type' => $parentType,
'parent_id' => optional($parentType)->factory(),
'number' => $this->faker->numberBetween(1, 100),
'currency_id' => null,
'created_at' => $this->faker->dateTime(),
Expand Down
Loading

0 comments on commit 491965f

Please sign in to comment.