Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
11b0e34
Add matrix comparison as separate tab, introspected from csv
Jan 22, 2026
795dd7c
Add placeholder svgs, should later default to unpopulated
Jan 22, 2026
dafeb5b
Remove placeholder logos
Jan 28, 2026
283821d
Add searchbar
Jan 28, 2026
ddf2757
Skip searched company when computing best alternative
Jan 28, 2026
f286867
Use existing logos if able
Jan 28, 2026
1b0818b
Ensure controller accesses correct image_path attr
Jan 28, 2026
6123162
Fix header null count case and add abort
Jan 29, 2026
d1e48a7
Fix potential null case in percentage scoring
Jan 29, 2026
9cb92d9
Remove extra comparison to same key
Jan 29, 2026
43498f0
Move details to separate page
Feb 5, 2026
01eb5de
Update matrix index and details pages to reflect data
Feb 12, 2026
08bb69f
Clean commented code
Feb 14, 2026
20dd070
Delete old formatted csvs
Feb 14, 2026
5677912
Refactor inline php to Controller
Feb 14, 2026
cf3e5ce
Drop unnecessary formatting func
Feb 15, 2026
f09537c
Fix score sum
Feb 15, 2026
9841cbd
Bugfix #188: updated add_image_urls_to_notes function to prevent crea…
ashfaq1934 Feb 16, 2026
39041cf
#188: remove unnecessary if condition
ashfaq1934 Feb 17, 2026
6b4e75d
Swap suggestion
Feb 17, 2026
d932f17
Refactor for readability, re-fix score calculation to use all rows
Feb 17, 2026
b14c614
Delete old code
Feb 17, 2026
6214ec0
Remove hard-coded subheading dependence and remove deference to numbe…
Feb 17, 2026
961b987
Add Controller test and handle empty row
Feb 18, 2026
a8205ea
#188: Update notes field when importing images from folder
ashfaq1934 Feb 19, 2026
3f4cba8
Fix logos on show and details pages
Feb 25, 2026
94b8017
Add null guard to searched company on details page
Feb 25, 2026
045799e
Clean up logic for parsing and viewing
Mar 18, 2026
1bcb9cd
Remove stale test
Mar 18, 2026
f499523
fixed data issues while migrating to mariadb/mysql for dev server.
ashfaq1934 Apr 3, 2026
9259a74
- Altered companies table columns for valuations to be big integers w…
ashfaq1934 Apr 5, 2026
be2cff0
- updated env example file
ashfaq1934 Apr 5, 2026
eb0977c
- adding deployment script
ashfaq1934 Apr 6, 2026
6678da5
fix typo
ashfaq1934 Apr 6, 2026
e457a55
updated composer step
ashfaq1934 Apr 6, 2026
68fc276
- updated workflow file
ashfaq1934 Apr 6, 2026
e58752a
exclude env file
ashfaq1934 Apr 6, 2026
eec9f29
updated deploy script
ashfaq1934 Apr 6, 2026
c3d8d9f
updated deploy script
ashfaq1934 Apr 6, 2026
acb5a44
Merge pull request #2 from Json-To-String/add-matrix-tab
ashfaq1934 Apr 15, 2026
e48aa39
Upload CSVs
Apr 15, 2026
c3e9ea4
Merge pull request #3 from Json-To-String/add-matrix-tab
ashfaq1934 Apr 15, 2026
b1734bc
Merge pull request #4 from ashfaq1934/fix-188
ashfaq1934 Apr 15, 2026
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
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=sqlite
AUDIT_DB_CONNECTION=sqlite_audit
# DB_HOST=127.0.0.1
# DB_PORT=3306
# DB_DATABASE=laravel
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Deploy to Dev Server

on:
push:
branches:
- development
jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Deploy code changes
uses: appleboy/ssh-action@v0.1.6
with:
host: ${{ secrets.VPS_HOST }}
username: ${{ secrets.VPS_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
cd /home/t4p-admin/poykott
git reset --hard HEAD
git clean -df

- name: Setp PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_mysql, pdo_sqlite, sqlite3

- name: Install Composer Dependancies
run: composer install --optimize-autoloader --no-dev --prefer-dist --no-interaction --no-progress

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install NPM dependencies
run: npm ci

- name: Build Vite assets
run: npm run build

- name: Run Remote Artisan Commands
uses: appleboy/ssh-action@v0.1.6
with:
host: ${{ secrets.VPS_HOST }}
username: ${{ secrets.VPS_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
cd /home/t4p-admin/poykott
php artisan migrate --force
php artisan storage:link || true
php artisan config:cache
php artisan route:cache
php artisan view:cache
php artisan optimize

31 changes: 17 additions & 14 deletions app/Console/Commands/AttachCompaniesImagesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class AttachCompaniesImagesCommand extends Command
*
* @var string
*/
protected $signature = 'attach-images-companies';
protected $signature = 'import:attach-images-companies';

/**
* The console command description.
Expand Down Expand Up @@ -45,44 +45,47 @@ public function handle(): void
/** @var Collection $notes * */
$notes = $company->notes;

if ($notes->first() == 'image attached') {
if (isset($notes['notes']) && $notes['notes'] == 'image attached') {
return;
}

$url = $notes->groupBy('url')->keys()->first();

$imagePath = get_image_archive_path($url, 'companies');
if (! isset($notes['url'])) {
return;
}

$imagePath = get_image_archive_path($notes['url'], 'companies');
DB::beginTransaction();

try {
if (! add_image_for_model($imagePath, $company)) {
$this->info("Failed to add image from folder for company:$company->name");

if (Str::isUrl($url)) {
if (Str::isUrl($notes['url'])) {
$this->info('Try to Download it from Url..');

try {
$company->addMediaFromUrl($url)->toMediaCollection();
$this->info("Successfully add image from Url for person:$company->name");
$company->addMediaFromUrl($notes['url'])->toMediaCollection();
$this->info("Successfully add image from Url for company:$company->name");
$notes['notes'] = 'image attached';
$company->update(['notes' => $notes]);
$succeeded++;
} catch (Exception) {
$this->info("Failed to add image from url for person:$company->name");
} catch (Exception $e) {
$this->info("Failed to add image from url for company:$company->name");
$this->error($e->getMessage());
$failed++;
}
}
} else {
$notes['notes'] = 'image attached';
$company->update(['notes' => $notes]);
$this->info("Successfully add image from folder for company:$company->name");
$succeeded++;
}

$company->update(['notes' => 'image attached']);

DB::commit();
} catch (Exception $e) {
DB::rollback();
$this->error($e->getMessage());
}

});
// });

Expand Down
27 changes: 15 additions & 12 deletions app/Console/Commands/AttachPeopleImagesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class AttachPeopleImagesCommand extends Command
*
* @var string
*/
protected $signature = 'attach-images-people';
protected $signature = 'import:attach-images-people';

/**
* The console command description.
Expand Down Expand Up @@ -48,38 +48,41 @@ public function handle(): void
/** @var Collection $notes * */
$notes = $person->notes;

if ($notes->first() == 'image attached') {
if (isset($notes['notes']) && $notes['notes'] == 'image attached') {
return;
}

$url = $notes->groupBy('url')->keys()->first();

$imagePath = get_image_archive_path($url, 'people');
if (! isset($notes['url'])) {
return;
}

$imagePath = get_image_archive_path($notes['url'], 'people');
DB::beginTransaction();

try {
if (! add_image_for_model($imagePath, $person)) {
$this->info("Failed to add image from folder for person:$person->name");

if (Str::isUrl($url)) {
if (Str::isUrl($notes['url'])) {
$this->info('Try to Download it from Url..');

try {
$person->addMediaFromUrl($url)->toMediaCollection();
$person->addMediaFromUrl($notes['url'])->toMediaCollection();
$this->info("Successfully add image from Url for person:$person->name");
} catch (Exception) {
$notes['notes'] = 'image attached';
$person->update(['notes' => $notes]);
$succeeded++;
} catch (Exception $e) {
$this->info("Failed to add image from url for person:$person->name");
$this->error($e->getMessage());
$failed++;
}
}
} else {
$notes['notes'] = 'image attached';
$person->update(['notes' => $notes]);
$this->info("Successfully add image from folder for person:$person->name");
$succeeded++;
}

$person->update(['notes' => 'image attached']);

DB::commit();
} catch (Exception $e) {
DB::rollback();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ public function handle(): void
foreach ($allData as $data) {

$dataFields = [
'exit_valuation' => data_get($data, 'Valuation at Exit'),
'exit_valuation' => (int) str_replace('$', '', data_get($data, 'Valuation at Exit')) ?? 0,
'url' => data_get($data, 'Website'),
'total_funding' => data_get($data, 'Total Funding'),
'total_funding' => (int) str_replace('$', '', data_get($data, 'Total Funding')) ?? 0,
'headquarter' => data_get($data, 'HQ'),
'founded_at' => Carbon::createFromFormat('Y', data_get($data, 'Founded')),
'exit_strategy' => data_get($data, 'Exit'),
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Commands/ImportUnicornTechAvivCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ public function handle(): void
$company = Company::query()->whereRaw('Lower(name) = ?', [$lowerCompanyName])->first();

$dataFields = [
'valuation' => data_get($data, 'Valuation'),
'valuation' => (int) str_replace('$', '', data_get($data, 'Valuation')) ?? 0,
'url' => data_get($data, 'Website'),
'total_funding' => data_get($data, 'Total Funding'),
'total_funding' => (int) str_replace('$', '', data_get($data, 'Total Funding')) ?? 0,
'last_funding_date' => data_get($data, 'Last Funding'),
'headquarter' => data_get($data, 'HQ Location'),
'founded_at' => Carbon::createFromFormat('Y', data_get($data, 'Founded')),
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/CompanyController.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function index(SeoSetPageAction $seoSetPageAction)
},
])
->approved()
->simplePaginate(20, ['companies.id', 'name', 'description', 'short_description', 'slug', 'image_path']);
->simplePaginate(20, ['companies.id', 'name', 'description', 'short_description', 'slug']);

return view('companies.index', ['companies' => $companies]);
}
Expand Down
Loading