Skip to content
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
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Default reviewers for every change in this repo.
# Outside contributors: fork the repo and open a PR against the default branch
# Outside contributors: fork the repo and open a PR against the default branch,
# you do NOT need write access. A code owner below must approve before merge.
* @zerp-pk/maintainers
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ participating, you agree to abide by it.

## Security issues

Do not report security vulnerabilities via public issues see
Do not report security vulnerabilities via public issues - see
[SECURITY.md](SECURITY.md).
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ CRM module for the [Zerp](https://github.com/zerp-pk) ERP platform. CRM and lead
composer require zerp/lead
```

The package auto-registers via Laravel's package discovery no manual service provider registration needed.
The package auto-registers via Laravel's package discovery - no manual service provider registration needed.

## What it provides

- `Zerp\Lead\Providers\LeadServiceProvider` boots this module's routes, migrations, and settings
- `Zerp\Lead\Providers\LeadServiceProvider` - boots this module's routes, migrations, and settings
- Frontend pages/components under `src/Resources/js`

## License

MIT see [LICENSE](LICENSE).
MIT - see [LICENSE](LICENSE).
2 changes: 1 addition & 1 deletion src/Resources/js/Pages/Reports/DealReports.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export default function DealReports() {
<CardContent className="p-4">
<p className="text-xs font-medium text-amber-700">{t('Win Rate')}</p>
<p className="text-2xl font-bold text-amber-700">
{winLoss?.win_rate === null || winLoss?.win_rate === undefined ? '' : `${winLoss.win_rate}%`}
{winLoss?.win_rate === null || winLoss?.win_rate === undefined ? '-' : `${winLoss.win_rate}%`}
</p>
</CardContent>
</Card>
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/js/utils/forecast.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//
// Probability is stage-driven (0–100). Records with a null/blank price count 0.
// Pure module (no imports) so it bundles cleanly into the browser build.
// Self-check lives in forecast.selfcheck.mjs run `node forecast.selfcheck.mjs`.
// Self-check lives in forecast.selfcheck.mjs - run `node forecast.selfcheck.mjs`.

export function stageRevenue(records) {
return (records || []).reduce((sum, r) => sum + (Number(r?.price) || 0), 0);
Expand Down
6 changes: 3 additions & 3 deletions src/Support/LeadScoring.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* sum of matched rule points, normalized to 0–100 against the maximum achievable
* (sum of all active rule points). Signals include both lead attributes and
* engagement (activity/call counts), so the stored score must be recomputed
* whenever any of those change see recompute()/recomputeAll() call sites.
* whenever any of those change - see recompute()/recomputeAll() call sites.
*/
class LeadScoring
{
Expand All @@ -38,7 +38,7 @@ class LeadScoring
/**
* Pure evaluator. $signals: [field => scalar|array]. $rules: array of
* ['field','operator','value','points']. Returns total/max/percent.
* No DB, no models this is the unit under test.
* No DB, no models - this is the unit under test.
*/
public static function evaluate(array $signals, array $rules): array
{
Expand Down Expand Up @@ -113,7 +113,7 @@ public static function recompute(Lead $lead): void

/**
* Recompute every lead for a creator. Triggered when rules change.
* ponytail: O(leads) with per-lead count queries; fine at SMB scale move
* ponytail: O(leads) with per-lead count queries; fine at SMB scale - move
* to a queued job with grouped counts if lead volume grows large.
*/
public static function recomputeAll(int $creatorId): void
Expand Down
2 changes: 1 addition & 1 deletion src/Support/leadscoring_selfcheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function check(string $label, $actual, $expected): void
{
global $failures;
if ($actual !== $expected) {
fwrite(STDERR, "FAIL: $label got " . var_export($actual, true) . ", expected " . var_export($expected, true) . "\n");
fwrite(STDERR, "FAIL: $label - got " . var_export($actual, true) . ", expected " . var_export($expected, true) . "\n");
$failures++;
}
}
Expand Down
Loading