Skip to content

Commit

Permalink
Added amount to board records
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdrake committed Aug 24, 2024
1 parent 7703234 commit df3cbee
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
9 changes: 7 additions & 2 deletions resources/views/livewire/kanban-board/record.blade.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
<div class="card mb-3 cursor-grab" id="{{ $record['id'] }}">
<div class="card-body p-3 text-wrap">
<p class="mb-0">{{ $record['title'] }}</p>
<h5 class="mb-1">{{ $record['title'] }}</h5>
@include('laravel-crm::partials.labels',[
'labels' => $record['labels'],
'limit' => 3
])
<div class="mt-2">
<a href="{{ url(route('laravel-crm.'.\Illuminate\Support\Str::plural($model).'.show', $record['id'])) }}">{{ $record['number'] }}</a>
<a href="{{ url(route('laravel-crm.'.\Illuminate\Support\Str::plural($model).'.show', $record['id'])) }}">{{ $record['number'] }}</a>
</div>
<div class="mt-2">
@if($record['amount'])
{{ money($record['amount'], $record['currency']) }}
@endif
<div class="mb-0 d-inline-block float-right"><i class="fa fa-user-circle" aria-hidden="true"></i></div>
</div>
</div>
Expand Down
4 changes: 3 additions & 1 deletion src/Http/Livewire/LiveDealBoard.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ public function records(): Collection
'title' => $deal->title,
'labels' => $deal->labels,
'stage' => $deal->pipelineStage->id ?? $this->firstStageId(),
'number' => $deal->deal_id
'number' => $deal->deal_id,
'amount' => $deal->amount,
'currency' => $deal->currency,
];
});
}
Expand Down
4 changes: 3 additions & 1 deletion src/Http/Livewire/LiveLeadBoard.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ public function records(): Collection
'title' => $lead->title,
'labels' => $lead->labels,
'stage' => $lead->pipelineStage->id ?? $this->firstStageId(),
'number' => $lead->lead_id
'number' => $lead->lead_id,
'amount' => $lead->amount,
'currency' => $lead->currency,
];
});
}
Expand Down
6 changes: 4 additions & 2 deletions src/Http/Livewire/LiveQuoteBoard.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class LiveQuoteBoard extends KanbanBoard
{
public $model = 'deal';
public $model = 'quote';

public function stages(): Collection
{
Expand Down Expand Up @@ -37,7 +37,9 @@ public function records(): Collection
'title' => $quote->title,
'labels' => $quote->labels,
'stage' => $quote->pipelineStage->id ?? $this->firstStageId(),
'number' => $quote->quote_id
'number' => $quote->quote_id,
'amount' => $quote->total,
'currency' => $quote->currency,
];
});
}
Expand Down

0 comments on commit df3cbee

Please sign in to comment.