Skip to content

Commit df3cbee

Browse files
committedAug 24, 2024
Added amount to board records
1 parent 7703234 commit df3cbee

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed
 

‎resources/views/livewire/kanban-board/record.blade.php

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
<div class="card mb-3 cursor-grab" id="{{ $record['id'] }}">
22
<div class="card-body p-3 text-wrap">
3-
<p class="mb-0">{{ $record['title'] }}</p>
3+
<h5 class="mb-1">{{ $record['title'] }}</h5>
44
@include('laravel-crm::partials.labels',[
55
'labels' => $record['labels'],
66
'limit' => 3
77
])
88
<div class="mt-2">
9-
<a href="{{ url(route('laravel-crm.'.\Illuminate\Support\Str::plural($model).'.show', $record['id'])) }}">{{ $record['number'] }}</a>
9+
<a href="{{ url(route('laravel-crm.'.\Illuminate\Support\Str::plural($model).'.show', $record['id'])) }}">{{ $record['number'] }}</a>
10+
</div>
11+
<div class="mt-2">
12+
@if($record['amount'])
13+
{{ money($record['amount'], $record['currency']) }}
14+
@endif
1015
<div class="mb-0 d-inline-block float-right"><i class="fa fa-user-circle" aria-hidden="true"></i></div>
1116
</div>
1217
</div>

‎src/Http/Livewire/LiveDealBoard.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ public function records(): Collection
3737
'title' => $deal->title,
3838
'labels' => $deal->labels,
3939
'stage' => $deal->pipelineStage->id ?? $this->firstStageId(),
40-
'number' => $deal->deal_id
40+
'number' => $deal->deal_id,
41+
'amount' => $deal->amount,
42+
'currency' => $deal->currency,
4143
];
4244
});
4345
}

‎src/Http/Livewire/LiveLeadBoard.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ public function records(): Collection
3636
'title' => $lead->title,
3737
'labels' => $lead->labels,
3838
'stage' => $lead->pipelineStage->id ?? $this->firstStageId(),
39-
'number' => $lead->lead_id
39+
'number' => $lead->lead_id,
40+
'amount' => $lead->amount,
41+
'currency' => $lead->currency,
4042
];
4143
});
4244
}

‎src/Http/Livewire/LiveQuoteBoard.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
class LiveQuoteBoard extends KanbanBoard
1111
{
12-
public $model = 'deal';
12+
public $model = 'quote';
1313

1414
public function stages(): Collection
1515
{
@@ -37,7 +37,9 @@ public function records(): Collection
3737
'title' => $quote->title,
3838
'labels' => $quote->labels,
3939
'stage' => $quote->pipelineStage->id ?? $this->firstStageId(),
40-
'number' => $quote->quote_id
40+
'number' => $quote->quote_id,
41+
'amount' => $quote->total,
42+
'currency' => $quote->currency,
4143
];
4244
});
4345
}

0 commit comments

Comments
 (0)