Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/composer/phpstan/phpstan-1.12.6
Browse files Browse the repository at this point in the history
  • Loading branch information
pierredup authored Oct 15, 2024
2 parents 5b1bb20 + 5329c44 commit d3e6fcf
Show file tree
Hide file tree
Showing 95 changed files with 5,009 additions and 859 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ APP_SECRET=47b97ece4477939b634285f38da2e0fc
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
#
DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8.0.32&charset=utf8mb4"
# DATABASE_URL="mysql://127.0.0.1:3306/SolidTrack?serverVersion=8.0.32&charset=utf8mb4"
# DATABASE_URL="mysql://app:[email protected]:3306/app?serverVersion=10.11.2-MariaDB&charset=utf8mb4"
# DATABASE_URL="postgresql://app:[email protected]:5432/app?serverVersion=15&charset=utf8"
###< doctrine/doctrine-bundle ###
Expand Down
10 changes: 1 addition & 9 deletions assets/app.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,2 @@
import './bootstrap.js';
/*
* Welcome to your app's main JavaScript file!
*
* This file will be included onto the page via the importmap() Twig function,
* which should already be in your base.html.twig.
*/
import './styles/app.css'

console.log('This log comes from assets/app.js - welcome to AssetMapper! 🎉')
import './styles/app.scss'
3 changes: 3 additions & 0 deletions assets/bootstrap.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import 'bootstrap';
import '@tabler/core';
import '@tabler/core/dist/libs/tom-select/dist/js/tom-select.complete';
import { startStimulusApp } from '@symfony/stimulus-bridge';

export const app = startStimulusApp(require.context(
Expand Down
26 changes: 26 additions & 0 deletions assets/controllers.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
{
"controllers": {
"@symfony/ux-autocomplete": {
"autocomplete": {
"enabled": true,
"fetch": "eager",
"autoimport": {
"tom-select/dist/css/tom-select.default.css": true,
"tom-select/dist/css/tom-select.bootstrap4.css": false,
"tom-select/dist/css/tom-select.bootstrap5.css": true
}
}
},
"@symfony/ux-chartjs": {
"chart": {
"enabled": true,
"fetch": "eager"
}
},
"@symfony/ux-live-component": {
"live": {
"enabled": true,
"fetch": "eager",
"autoimport": {
"@symfony/ux-live-component/dist/live.min.css": true
}
}
},
"@symfony/ux-turbo": {
"turbo-core": {
"enabled": true,
Expand Down
63 changes: 63 additions & 0 deletions assets/controllers/activity_controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import { Controller } from '@hotwired/stimulus';

export default class extends Controller {
connect() {
this.element.addEventListener('chartjs:pre-connect', this._onPreConnect);
this.element.addEventListener('chartjs:connect', this._onConnect);
}

disconnect() {
// You should always remove listeners when the controller is disconnected to avoid side effects
this.element.removeEventListener('chartjs:pre-connect', this._onPreConnect);
this.element.removeEventListener('chartjs:connect', this._onConnect);
}

_onPreConnect(event) {
// The chart is not yet created
// You can access the config that will be passed to "new Chart()"
console.log(event.detail.config);

// For instance you can format Y axis
// To avoid overriding existing config, you should distinguish 3 cases:
// # 1. No existing scales config => add a new scales config
event.detail.config.options.scales = {
y: {
ticks: {
callback: function (value, index, values) {
/* ... */
console.log({value, index, values})
},
},
},
};
// # 2. Existing scales config without Y axis config => add new Y axis config
event.detail.config.options.scales.y = {
ticks: {
callback: function (value, index, values) {
/* ... */
console.log({value, index, values})
},
},
};
// # 3. Existing Y axis config => update it
event.detail.config.options.scales.y.ticks = {
callback: function (value, index, values) {
/* ... */
console.log({value, index, values})
},
};
}

_onConnect(event) {
// The chart was just created
console.log(event.detail.chart); // You can access the chart instance using the event details

// For instance you can listen to additional events
event.detail.chart.options.onHover = (mouseEvent) => {
/* ... */
};
event.detail.chart.options.onClick = (mouseEvent) => {
/* ... */
};
}
}
44 changes: 44 additions & 0 deletions assets/controllers/time_tracker_controller.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { Controller } from '@hotwired/stimulus';

/* stimulusFetch: 'lazy' */
export default class extends Controller {
static targets = [ 'timer' ]

static values = {
time: Number
}

declare timerTarget: HTMLElement
declare timeValue: number

private timerInterval: any

private readonly MILLIS_PER_SECOND = 1000;

connect() {
this.start()
}

disconnect() {
clearInterval(this.timerInterval);
}

start() {
this.update();
this.timerInterval = setInterval(this.update.bind(this), this.MILLIS_PER_SECOND);
}

update() {
const currentTime = new Date().getTime(); // get current time in milliseconds
const elapsedTime = currentTime - this.timeValue; // calculate elapsed time in milliseconds
const seconds = Math.floor(elapsedTime / this.MILLIS_PER_SECOND) % 60; // calculate seconds
const minutes = Math.floor(elapsedTime / this.MILLIS_PER_SECOND / 60) % 60; // calculate minutes
const hours = Math.floor(elapsedTime / this.MILLIS_PER_SECOND / 60 / 60); // calculate hours

this.timerTarget.innerHTML = this.pad(hours) + ":" + this.pad(minutes) + ":" + this.pad(seconds); // update the display
}

pad(number: number) {
return (number < 10 ? "0" : "") + number;
}
}
1 change: 1 addition & 0 deletions assets/icons/symfony.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/tabler/arrow-back.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/tabler/brand-github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/tabler/chart-infographic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/tabler/clock-plus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/tabler/device-floppy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/tabler/eye.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/tabler/heart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/tabler/home.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/tabler/mist.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/tabler/pencil.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/tabler/player-play-filled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/tabler/player-stop-filled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/tabler/plus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/tabler/sitemap.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/tabler/text-plus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/tabler/trash.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/tabler/user-plus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/tabler/users-group.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/tabler/users.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions assets/styles/app.css

This file was deleted.

7 changes: 7 additions & 0 deletions assets/styles/app.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@import '@tabler/core';
@import '@tabler/core/src/scss/vendor/tom-select';

:root {
--tblr-font-sans-serif: 'Inter';
--tblr-nav-link-font-size: 1.2rem;
}
Binary file modified bun.lockb
Binary file not shown.
61 changes: 34 additions & 27 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,47 @@
"api-platform/core": "^3.2",
"doctrine/doctrine-bundle": "^2.11",
"doctrine/doctrine-migrations-bundle": "^3.3",
"doctrine/orm": "^2.17",
"doctrine/orm": "^3.2",
"nelmio/cors-bundle": "^2.4",
"nesbot/carbon": "^3.7",
"phpdocumentor/reflection-docblock": "^5.3",
"phpstan/phpdoc-parser": "^1.24",
"symfony/asset": "7.0.*",
"symfony/asset-mapper": "7.0.*",
"symfony/console": "7.0.*",
"symfony/doctrine-messenger": "7.0.*",
"symfony/dotenv": "7.0.*",
"symfony/expression-language": "7.0.*",
"symfony/asset": "7.1.*",
"symfony/asset-mapper": "7.1.*",
"symfony/console": "7.1.*",
"symfony/doctrine-messenger": "7.1.*",
"symfony/dotenv": "7.1.*",
"symfony/expression-language": "7.1.*",
"symfony/flex": "^2",
"symfony/form": "7.0.*",
"symfony/framework-bundle": "7.0.*",
"symfony/http-client": "7.0.*",
"symfony/intl": "7.0.*",
"symfony/mailer": "7.0.*",
"symfony/mime": "7.0.*",
"symfony/form": "7.1.*",
"symfony/framework-bundle": "7.1.*",
"symfony/http-client": "7.1.*",
"symfony/intl": "7.1.*",
"symfony/mailer": "7.1.*",
"symfony/mime": "7.1.*",
"symfony/monolog-bundle": "^3.0",
"symfony/notifier": "7.0.*",
"symfony/process": "7.0.*",
"symfony/property-access": "7.0.*",
"symfony/property-info": "7.0.*",
"symfony/runtime": "7.0.*",
"symfony/security-bundle": "7.0.*",
"symfony/serializer": "7.0.*",
"symfony/notifier": "7.1.*",
"symfony/process": "7.1.*",
"symfony/property-access": "7.1.*",
"symfony/property-info": "7.1.*",
"symfony/runtime": "7.1.*",
"symfony/security-bundle": "7.1.*",
"symfony/serializer": "7.1.*",
"symfony/stimulus-bundle": "^2.13",
"symfony/string": "7.0.*",
"symfony/translation": "7.0.*",
"symfony/twig-bundle": "7.0.*",
"symfony/string": "7.1.*",
"symfony/translation": "7.1.*",
"symfony/twig-bundle": "7.1.*",
"symfony/uid": "7.1.*",
"symfony/ux-autocomplete": "^2.18",
"symfony/ux-chartjs": "^2.18",
"symfony/ux-icons": "^2.18",
"symfony/ux-live-component": "^2.18",
"symfony/ux-turbo": "^2.13",
"symfony/validator": "7.0.*",
"symfony/web-link": "7.0.*",
"symfony/ux-twig-component": "^2.18",
"symfony/validator": "7.1.*",
"symfony/web-link": "7.1.*",
"symfony/webpack-encore-bundle": "^2.1",
"symfony/yaml": "7.0.*",
"symfony/yaml": "7.1.*",
"twig/extra-bundle": "^2.12|^3.0",
"twig/twig": "^2.12|^3.0"
},
Expand Down Expand Up @@ -96,7 +103,7 @@
"extra": {
"symfony": {
"allow-contrib": false,
"require": "7.0.*",
"require": "7.1.*",
"docker": true
}
},
Expand Down
Loading

0 comments on commit d3e6fcf

Please sign in to comment.