This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Route from '@ember/routing/route'; | |
| import { inject as service } from '@ember/service'; | |
| export default Route.extend({ | |
| store: service(), | |
| model() { | |
| alert(1); | |
| return this.get('store').createRecord('dossier/dossier', {dossierNumber: '123'}); | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ember -v | |
| ember-cli: 2.14.2 | |
| node: 8.9.2 | |
| os: darwin x64 | |
| npm uninstall -g ember-cli | |
| npm uninstall -g ember-cli | |
| removed 635 packages in 4.671s | |
| ember -v |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {{#bs-form submitOnEnter=true class="m-4 w-100" formLayout="inline" as |form|}} | |
| {{form.element size="sm" controlType="input"}} | |
| {{/bs-form}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {{#bs-dropdown direction="up" as |dd|}} | |
| {{#dd.button title=(t 'commands.copy') | |
| size="sm" type="secondary" | |
| disabled=(not (get model.addresses model.activeLabelId))}} | |
| {{fa-icon "copy"}} | |
| <span class="d-none d-lg-inline-block">{{t 'commands.copy'}}</span> | |
| {{/dd.button}} | |
| {{#dd.menu as |ddm|}} | |
| <p class="muted">Copy from existing address</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Mixin | |
| export default Mixin.create({ | |
| onSubmit() { | |
| console.log(this); // undefined ??? | |
| }, | |
| actions: { | |
| submit() { | |
| this.get('onSubmit')(); | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| protected function downloadFile(ServerRequestInterface $request, string $filePath) | |
| { | |
| $fileName = basename($filePath); | |
| $contentType = (new \finfo(FILEINFO_MIME))->file($filePath); | |
| if (! file_exists($filePath)) { | |
| throw new \Exception("File not found: $filePath"); | |
| } | |
| if (! is_readable($filePath)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // PROXYID either "" or "gjhgsd6tgk2j3rd" | |
| PROXYID=$(docker network ls -q -f 'name=proxy') | |
| if [ ! -n "$PROXYID" ]; then | |
| docker network create --opt=encrypted --driver=overlay proxy | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| declare(strict_types=1); | |
| namespace HF\Api\Tools\Console\Command\Queue; | |
| use SlmQueue\Controller\Exception\WorkerProcessException; | |
| use SlmQueue\Exception\ExceptionInterface; | |
| use SlmQueue\Queue\QueueInterface; | |
| use SlmQueue\Queue\QueuePluginManager; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // adapter/dossier/attachment | |
| import Adapter from "./../application"; | |
| export default Adapter.extend({ | |
| urlForQuery: function(query, modelName) { | |
| let dossier_id = query.dossier_id; | |
| delete query.dossier_id; | |
| return [this.host, this.namespace, 'dossier/dossiers', dossier_id, 'attachments'].filter(Boolean).join('/'); | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| added in prooph-event-store-mysql.global.php | |
| i'm using the interface | |
| // dependencies settings | |
| 'dependencies' => [ | |
| 'factories' => [ | |
| \Prooph\EventStore\EventStore::class => [MySqlEventStoreFactory::class, 'default'], | |
| \Prooph\EventStore\Projection\ProjectionManager::class => [\HF\Api\Infrastructure\Pdo\MySqlProjectionManagerFactory::class, 'default'], |