Skip to content

Commit

Permalink
Updated to SF6.4
Browse files Browse the repository at this point in the history
  • Loading branch information
amorebietakoUdala committed Jan 15, 2024
1 parent f6c05a4 commit 2f40458
Show file tree
Hide file tree
Showing 105 changed files with 7,203 additions and 5,750 deletions.
7 changes: 7 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ APP_ENV=dev
APP_SECRET=1829d05eac0acc9e86ee4109bbc00e7c
###< symfony/framework-bundle ###

###> symfony/messenger ###
# Choose one of the transports below
# MESSENGER_TRANSPORT_DSN=doctrine://default
# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages
###< symfony/messenger ###

###> symfony/mailer ###
# MAILER_DSN=null://null
###< symfony/mailer ###
Expand Down
21 changes: 11 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

###> symfony/framework-bundle ###
/.env.local
/.env.local.php
Expand All @@ -13,19 +12,21 @@
.phpunit.result.cache
/phpunit.xml
###< symfony/phpunit-bridge ###

###> symfony/webpack-encore-bundle ###
/node_modules/
/public/build/
npm-debug.log
yarn-error.log
###< symfony/webpack-encore-bundle ###

/sql/users.sql

###> willdurand/js-translation-bundle ###
# No need to save in git
/public/translations/
###> willdurand/js-translation-bundle ###

/.yarn/
/.yarn/
###> phpstan/phpstan ###
phpstan.neon
###< phpstan/phpstan ###

###> symfony/webpack-encore-bundle ###
/node_modules/
/public/build/
npm-debug.log
yarn-error.log
###< symfony/webpack-encore-bundle ###
Empty file modified assets/app.js
100644 → 100755
Empty file.
9 changes: 9 additions & 0 deletions assets/bootstrap.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { startStimulusApp } from '@symfony/stimulus-bridge';
import { locale } from '@amorebietakoudala/stimulus-controller-bundle/src/locale_controller';
import { table } from '@amorebietakoudala/stimulus-controller-bundle/src/table_controller';
import { datetimepicker } from '@amorebietakoudala/stimulus-controller-bundle/src/datetimepicker_controller';
import { select2 } from '@amorebietakoudala/stimulus-controller-bundle/src/select2_controller';

// Registers Stimulus controllers from controllers.json and in the controllers/ directory
export const app = startStimulusApp(require.context(
Expand All @@ -9,3 +13,8 @@ export const app = startStimulusApp(require.context(

// register any custom, 3rd party controllers here
// app.register('some_controller_name', SomeImportedController);
app.register('locale', locale );
app.register('table', table );
app.register('datetimepicker', datetimepicker );
app.register('select2', select2 );

Empty file modified assets/controllers.json
100644 → 100755
Empty file.
48 changes: 0 additions & 48 deletions assets/controllers/list_controller.js

This file was deleted.

32 changes: 3 additions & 29 deletions assets/controllers/loan-action_controller.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,48 +1,22 @@
import { Controller } from '@hotwired/stimulus';
import { useDispatch } from 'stimulus-use';
import Translator from 'bazinga-translator';
const translations = require('../../public/translations/'+Translator.locale+'.json');

import $ from 'jquery';

export default class extends Controller {
static targets = ['form', 'token'];
static values = {}

connect() {
useDispatch(this);
Translator.fromJSON(translations);
}

async deleteConfirmation(event) {
event.preventDefault();
const confirmationText=Translator.trans('message.deleteConfirmationText');
this.submit(confirmationText, event.currentTarget.dataset.return_url);
}

async loanConfirmation(event) {
event.preventDefault();
const confirmationText=Translator.trans('message.loanConfirmationText');
this.submitForm(event,confirmationText);
}

async returnConfirmation(event) {
event.preventDefault();
const confirmationText=Translator.trans('message.returnConfirmationText');
this.submitForm(event,confirmationText);
}

async submitForm(event, confirmationText) {
this.tokenTarget.value=event.currentTarget.dataset.csrf_token;
this.formTarget.action=event.currentTarget.dataset.url;
this.submit(confirmationText);
this.submit(event.currentTarget.dataset.return_url);
}

async submit(confirmationText, returnUrl = null) {
async submit(returnUrl = null) {
const Swal = await import ('sweetalert2');
Swal.default.fire({
template: '#confirmation-template',
html: confirmationText,
template: '#confirm',
}).then(async(result) => {
if (result.value) {
const $form = $(this.formTarget);
Expand Down
21 changes: 0 additions & 21 deletions assets/controllers/loan-form_controller.js

This file was deleted.

22 changes: 0 additions & 22 deletions assets/controllers/locale_controller.js

This file was deleted.

5 changes: 0 additions & 5 deletions assets/controllers/modal-form_controller.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Controller } from '@hotwired/stimulus';
import { Modal } from 'bootstrap';
import $ from 'jquery';

import { useDispatch } from 'stimulus-use';

export default class extends Controller {
static targets = ['modal', 'modalBody'];
Expand All @@ -11,10 +10,6 @@ export default class extends Controller {
}
modal = null;

connect() {
useDispatch(this, {debug: true});
}

async openModal(event) {
this.modalBodyTarget.innerHTML = 'Loading...';
this.modal = new Modal(this.modalTarget);
Expand Down
9 changes: 9 additions & 0 deletions assets/controllers/readonly-remove_controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Controller } from '@hotwired/stimulus';

export default class extends Controller {

connect() {
// We do this to avoid autocompletion from the browser. We put readonly by default on html and remove it here
this.element.removeAttribute('readonly');
}
}
Empty file modified assets/controllers/reload-content_controller.js
100644 → 100755
Empty file.
Empty file modified assets/images/default-avatar.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified assets/images/favicon.ico
100644 → 100755
Empty file.
Empty file modified assets/images/logo.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 0 additions & 32 deletions assets/js/common/alert.js

This file was deleted.

6 changes: 0 additions & 6 deletions assets/js/common/datepicker.js

This file was deleted.

8 changes: 0 additions & 8 deletions assets/js/common/list.js

This file was deleted.

5 changes: 0 additions & 5 deletions assets/js/common/select2.js

This file was deleted.

11 changes: 0 additions & 11 deletions assets/js/user/edit.js

This file was deleted.

45 changes: 0 additions & 45 deletions assets/js/user/list.js

This file was deleted.

Empty file modified assets/resources/datatables.es.json
100644 → 100755
Empty file.
Empty file modified assets/resources/datatables.eu.json
100644 → 100755
Empty file.
4 changes: 4 additions & 0 deletions assets/styles/app.css
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ a.icon:hover {
text-decoration: none;
}

td > a {
text-decoration: none;
}

@media (max-width: 767px) {
.logo {
height: 50px;
Expand Down
7 changes: 7 additions & 0 deletions assets/vendor/@hotwired/stimulus/stimulus.index.js

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions assets/vendor/@hotwired/turbo/turbo.index.js

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions assets/vendor/installed.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php return array (
'@hotwired/stimulus' =>
array (
'version' => '3.2.2',
'dependencies' =>
array (
),
'extraFiles' =>
array (
),
),
'@hotwired/turbo' =>
array (
'version' => '7.3.0',
'dependencies' =>
array (
),
'extraFiles' =>
array (
),
),
);
Empty file modified bin/console
100644 → 100755
Empty file.
Loading

0 comments on commit 2f40458

Please sign in to comment.