Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V1.1.0 #307

Merged
merged 8 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions app/Console/Commands/CheckMonthRollover.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

namespace App\Console\Commands;

use App\Domains\Budget\Services\BudgetRolloverService;
use App\Models\Team;
use Illuminate\Console\Command;

use Illuminate\Support\Facades\DB;

class MonthlyRollover extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'app:check-month-rollover';

/**
* The console command description.
*
* @var string
*/
protected $description = 'check month roll over for all teams';

/**
* Execute the console command.
*/
public function handle(BudgetRolloverService $rolloverService)
{

$teams = Team::with('timezone')->without(['settings'])->get();
dd($teams->toArray());

}
}
1 change: 1 addition & 0 deletions app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ protected function schedule(Schedule $schedule)

$schedule->command('app:automation-check')->everyMinute()->runInBackground();
$schedule->command('app:occurrence-reminders')->daily()->runInBackground();
$schedule->command('app:check-month-rollover')->daily()->runInBackground();
if (config('app.demo')) {
if ($scheduleTime) {
$schedule->command('app:demo-reset')->dailyAt($scheduleTime)->runInBackground();
Expand Down
2 changes: 2 additions & 0 deletions app/Domains/Automation/Services/LogerAutomationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ public static function run(Automation $automation, $eventData = null)
echo "starting $automation->name with $automation->id \n";
$tasks = $automation->tasks;
$trigger = $automation->triggerTask;
print_r([$tasks, $trigger]);

foreach ($tasks as $index => $task) {
if ($index == 0) {
$lastData = $eventData;
$previousTask = null;
}
$entity = $task->entity;
echo "hello>";
$lastData = $entity::handle($automation, $lastData, $task, $previousTask, $trigger);
if (! $lastData) {
break;
Expand Down
2 changes: 1 addition & 1 deletion app/Domains/Journal/Actions/AccountUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

use Illuminate\Foundation\Auth\User;
use Illuminate\Support\Facades\Gate;
use Insane\Journal\Contracts\AccountUpdates;
use Insane\Journal\Models\Core\Account;
use Insane\Journal\Contracts\AccountUpdates;

class AccountUpdate implements AccountUpdates
{
Expand Down
12 changes: 6 additions & 6 deletions app/Http/Controllers/Finance/FinanceAccountController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace App\Http\Controllers\Finance;

use App\Domains\Automation\Models\AutomationService;
use App\Domains\Transaction\Services\BHDService;
use App\Domains\Transaction\Services\ReportService;
use App\Models\Setting;
use Freesgen\Atmosphere\Http\InertiaController;
use Freesgen\Atmosphere\Http\Querify;
use Illuminate\Support\Facades\Gate;
use Freesgen\Atmosphere\Http\Querify;
use Insane\Journal\Models\Core\Account;
use Freesgen\Atmosphere\Http\InertiaController;
use App\Domains\Transaction\Services\BHDService;
use App\Domains\Transaction\Services\ReportService;
use App\Domains\Automation\Models\AutomationService;

class FinanceAccountController extends InertiaController
{
Expand Down Expand Up @@ -54,7 +54,7 @@ public function show(Account $account)
'resource' => $account,
'transactions' => $account->transactionSplits(50, $startDate, $endDate, request()->only(['search', 'page', 'limit', 'direction'])),
'stats' => $this->reportService->getAccountStats($account->id, $startDate, $endDate),
'serverSearchOptions' => $this->getServerParams(),
'serverSearchOptions' => [],
]);
}

Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Finance/FinanceTrendController.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function index(Request $request, $sectionName = 'groups')
$section = self::sections[$sectionName];
$data = $this->$section($request);

return inertia('Finance/Trends',
return inertia('Trends/Overview',
array_merge([
'serverSearchOptions' => $filters,
'section' => $sectionName,
Expand Down
10 changes: 5 additions & 5 deletions app/Http/Middleware/HandleInertiaRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

namespace App\Http\Middleware;

use Inertia\Middleware;
use Tightenco\Ziggy\Ziggy;
use Illuminate\Http\Request;
use App\Concerns\Facades\Menu;
use Insane\Journal\Models\Core\Account;
use App\Domains\AppCore\Models\Category;
use Illuminate\Http\Request;
use Inertia\Middleware;
use Insane\Journal\Models\Core\Account as CoreAccount;
use Insane\Journal\Models\Core\AccountDetailType;
use Tightenco\Ziggy\Ziggy;

class HandleInertiaRequests extends Middleware
{
Expand Down Expand Up @@ -63,7 +63,7 @@ public function share(Request $request)
},
'menu' => $menu,
'balance' => $team ? $team->balance() : 0,
'accounts' => $team ? CoreAccount::getByDetailTypes($team->id) : [],
'accounts' => $team ? Account::getByDetailTypes($team->id) : [],
'categories' => $team ? Category::where([
'categories.team_id' => $team->id,
'categories.resource_type' => 'transactions',
Expand Down
1 change: 1 addition & 0 deletions components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export {}

declare module 'vue' {
export interface GlobalComponents {
IClarityContractLine: typeof import('~icons/clarity/contract-line')['default']
IFluentFoodApple20Filled: typeof import('~icons/fluent/food-apple20-filled')['default']
IIcRoundQueryStats: typeof import('~icons/ic/round-query-stats')['default']
IIonEllipsisVertical: typeof import('~icons/ion/ellipsis-vertical')['default']
Expand Down
Loading