-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor #172 Navigation via breadcrumbs between credit memo - Order …
…and refund page - order (Zales0123, AdamKasp) This PR was merged into the 1.0-dev branch. Discussion ---------- based on #171 I added breadcrumbs to Credit Memo, fixed breadcrumbs on refunds page, and I deleted redundant route with service from Credit memo index page refund page: ![Screenshot 2020-01-13 at 15 54 01](https://user-images.githubusercontent.com/29897151/72265592-0a1f5b00-361d-11ea-8f7e-7abf443d4601.png) credit memo page: ![Screenshot 2020-01-13 at 15 54 26](https://user-images.githubusercontent.com/29897151/72265610-13a8c300-361d-11ea-8c4b-e4636419e2b8.png) Commits ------- 63842d4 Change order number to order relation and use it 00c6a35 Add breadcrumb for credit memo, fix refund breadcrumb
- Loading branch information
Showing
34 changed files
with
202 additions
and
186 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace DoctrineMigrations; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
final class Version20191230121402 extends AbstractMigration | ||
{ | ||
public function up(Schema $schema): void | ||
{ | ||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); | ||
|
||
$this->addSql('DROP INDEX IDX_5C4F3331551F0F81 ON sylius_refund_credit_memo'); | ||
$this->addSql('ALTER TABLE sylius_refund_credit_memo ADD order_id INT DEFAULT NULL'); | ||
|
||
$this->addSql(' | ||
UPDATE sylius_refund_credit_memo AS cm | ||
INNER JOIN sylius_order o | ||
ON cm.order_number = o.number | ||
SET cm.order_id = o.id | ||
WHERE cm.order_number IS NOT NULL | ||
'); | ||
|
||
$this->addSql('ALTER TABLE sylius_refund_credit_memo DROP order_number'); | ||
$this->addSql('ALTER TABLE sylius_refund_credit_memo ADD CONSTRAINT FK_5C4F33318D9F6D38 FOREIGN KEY (order_id) REFERENCES sylius_order (id)'); | ||
$this->addSql('CREATE INDEX IDX_5C4F33318D9F6D38 ON sylius_refund_credit_memo (order_id)'); | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); | ||
|
||
$this->addSql('ALTER TABLE sylius_refund_credit_memo DROP FOREIGN KEY FK_5C4F33318D9F6D38'); | ||
$this->addSql('DROP INDEX IDX_5C4F33318D9F6D38 ON sylius_refund_credit_memo'); | ||
$this->addSql('ALTER TABLE sylius_refund_credit_memo ADD order_number VARCHAR(255) CHARACTER SET utf8 NOT NULL COLLATE `utf8_unicode_ci`'); | ||
|
||
$this->addSql(' | ||
UPDATE sylius_refund_credit_memo AS cm | ||
INNER JOIN sylius_order o | ||
ON cm.order_id = o.id | ||
SET cm.order_number = o.number | ||
WHERE cm.order_id IS NOT NULL | ||
'); | ||
|
||
$this->addSql('ALTER TABLE sylius_refund_credit_memo DROP order_id'); | ||
$this->addSql('CREATE INDEX IDX_5C4F3331551F0F81 ON sylius_refund_credit_memo (order_number)'); | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.