Compare commits

..

5 Commits

Author SHA1 Message Date
snyk-bot 272fe70d0f fix: upgrade @alpinejs/focus from 3.15.0 to 3.15.1
Snyk has created this PR to upgrade @alpinejs/focus from 3.15.0 to 3.15.1.

See this package in npm:
@alpinejs/focus

See this project in Snyk:
https://app.snyk.io/org/investbrain/project/6a72866f-936e-45fc-83bd-dd298e632086?utm_source=github&utm_medium=referral&page=upgrade-pr
2025-11-20 10:46:29 +00:00
hackerESQ 34223960f8 chore: Bump PHP version to 8.4
see #150
2025-11-06 21:10:53 -06:00
hackerESQ 5f583de857 fix: export daily change dates transposition
reference #148
2025-11-04 19:59:33 -06:00
hackerESQ bb0a0ef928 fix: date for transactions in api requests
references #148
2025-11-04 19:44:14 -06:00
Fexiven 2d4c7002a7 fix: Create nginx directory (#143)
fixes:

nginx: [emerg] open() "/run/nginx/nginx.pid" failed (2: No such file or directory)
2025-10-30 16:43:26 -05:00
7 changed files with 31 additions and 14 deletions
+18 -1
View File
@@ -33,7 +33,24 @@ class DailyChangesSheet implements FromCollection, WithHeadings, WithTitle
*/
public function collection()
{
return $this->empty ? collect() : DailyChange::myDailyChanges()->withDailyPerformance()->get();
if ($this->empty) {
return collect();
}
return DailyChange::myDailyChanges()
->withDailyPerformance()
->get()
->map(function ($daily_change) {
return [
'date' => date_format($daily_change->date, 'Y-m-d'),
'portfolio_id' => $daily_change->portfolio_id,
'total_market_value' => $daily_change->total_market_value,
'total_cost_basis' => $daily_change->total_cost_basis,
'realized_gains' => $daily_change->realized_gain_dollars,
'total_dividends_earned' => $daily_change->total_dividends_earned,
'annotation' => $daily_change->annotation,
];
});
}
public function title(): string
+1 -1
View File
@@ -58,7 +58,7 @@ class TransactionsSheet implements FromCollection, WithHeadings, WithTitle
'currency' => $transaction->market_data_currency,
'split' => $transaction->split,
'reinvested_dividend' => $transaction->reinvested_dividend,
'date' => $transaction->date,
'date' => date_format($transaction->date, 'Y-m-d'),
'created_at' => $transaction->created_at,
'updated_at' => $transaction->updated_at,
];
+1 -1
View File
@@ -27,7 +27,7 @@ class TransactionResource extends JsonResource
'sale_price' => $this->sale_price,
'split' => $this->split,
'reinvested_dividend' => $this->reinvested_dividend,
'date' => $this->date,
'date' => date_format($this->date, 'Y-m-d'),
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
];
+1 -1
View File
@@ -121,7 +121,7 @@ class DailyChange extends Model
->groupBy('portfolio_id', 'date');
return $query
->select(['daily_change.portfolio_id', 'daily_change.date'])
->select(['daily_change.date', 'daily_change.portfolio_id'])
->selectRaw('daily_change.total_market_value * COALESCE(cr.rate, 1) AS total_market_value')
->selectRaw('SUM(COALESCE(ccb.cumulative_cost_basis, 0)) AS total_cost_basis')
->selectRaw('daily_change.total_market_value * COALESCE(cr.rate, 1)
+4 -4
View File
@@ -1,5 +1,5 @@
# Stage 1: Build stage
FROM php:8.3-fpm AS builder
FROM php:8.4-fpm AS builder
ENV DEBIAN_FRONTEND=noninteractive
ENV APP_NAME=Investbrain
@@ -39,7 +39,7 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local
&& rm -rf node_modules
# Stage 2: Production stage
FROM php:8.5.0RC2-fpm-alpine
FROM php:8.4-fpm-alpine
# Set the working directory
WORKDIR /var/app
@@ -71,8 +71,8 @@ RUN apk add --no-cache \
RUN rm -rf /var/www/html \
&& ln -s /var/app /var/www/app
# Create required directories for supervisord
RUN mkdir -p /var/log/supervisor /var/run/supervisor
# Create required directories
RUN mkdir -p /var/log/supervisor /var/run/supervisor /var/run/nginx
# Copy over configs
COPY ./docker/nginx.conf /etc/nginx/http.d/default.conf
+5 -5
View File
@@ -1,11 +1,11 @@
{
"name": "investbrain",
"name": "relock-npm-lock-v2-E2dX8W",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"dependencies": {
"@alpinejs/focus": "^3.15.0",
"@alpinejs/focus": "^3.15.1",
"@alpinejs/persist": "^3.14.9",
"@alpinejs/resize": "^3.14.9",
"alpinejs": "^3.14.9",
@@ -25,9 +25,9 @@
}
},
"node_modules/@alpinejs/focus": {
"version": "3.15.0",
"resolved": "https://registry.npmjs.org/@alpinejs/focus/-/focus-3.15.0.tgz",
"integrity": "sha512-Cm9vop09oNFw7T9SEBcfijrTdSN1aBNHK3cN4mB52eKvi9z5pa+xcyN+6S3FmZ44MR/u81JXa6hi5CjX1iy6dA==",
"version": "3.15.1",
"resolved": "https://registry.npmjs.org/@alpinejs/focus/-/focus-3.15.1.tgz",
"integrity": "sha512-Svu8ILVafdJouRVAV/vAkw7i/5/RNi5USh/C1llOhmhpSlX+F8JI1FuVhlJHLMcNqNIV6fm9yoiUBjB2NLwwUQ==",
"license": "MIT",
"dependencies": {
"focus-trap": "^6.9.4",
+1 -1
View File
@@ -18,7 +18,7 @@
"vite": "^5.4"
},
"dependencies": {
"@alpinejs/focus": "^3.15.0",
"@alpinejs/focus": "^3.15.1",
"@alpinejs/persist": "^3.14.9",
"@alpinejs/resize": "^3.14.9",
"alpinejs": "^3.14.9",