diff --git a/Applications/Pgan.PoracleWebNet.App/ClientApp/src/app/modules/quests/quest-add-dialog.component.scss b/Applications/Pgan.PoracleWebNet.App/ClientApp/src/app/modules/quests/quest-add-dialog.component.scss
index 7b8d7526..001181c2 100644
--- a/Applications/Pgan.PoracleWebNet.App/ClientApp/src/app/modules/quests/quest-add-dialog.component.scss
+++ b/Applications/Pgan.PoracleWebNet.App/ClientApp/src/app/modules/quests/quest-add-dialog.component.scss
@@ -23,23 +23,8 @@ mat-dialog-content {
:host ::ng-deep .alarm-tabs .mat-mdc-tab-body-wrapper {
padding: 0 24px;
}
-:host ::ng-deep .reward-tabs .mat-mdc-tab-labels {
- overflow-x: auto;
- -webkit-overflow-scrolling: touch;
- scrollbar-width: none;
-}
-:host ::ng-deep .reward-tabs .mat-mdc-tab-labels::-webkit-scrollbar {
- display: none;
-}
-:host ::ng-deep .reward-tabs .mat-mdc-tab-label-container {
- overflow: visible;
-}
-// Five reward types want 520px of Material's default tab padding in a 464px rail, so the group
-// paginated and put Stardust behind an arrow at every width. Trimming the padding fits all five on a
-// desktop dialog with room to spare; phone width still scrolls, as it did with four.
-:host ::ng-deep .reward-tabs .mdc-tab {
- min-width: 0;
- padding: 0 12px;
+.reward-kind-field {
+ margin-bottom: 4px;
}
@media (max-width: 599px) {
mat-dialog-content {
diff --git a/Applications/Pgan.PoracleWebNet.App/ClientApp/src/app/modules/quests/quest-add-dialog.component.spec.ts b/Applications/Pgan.PoracleWebNet.App/ClientApp/src/app/modules/quests/quest-add-dialog.component.spec.ts
index 8e911bad2..edcd4568 100644
--- a/Applications/Pgan.PoracleWebNet.App/ClientApp/src/app/modules/quests/quest-add-dialog.component.spec.ts
+++ b/Applications/Pgan.PoracleWebNet.App/ClientApp/src/app/modules/quests/quest-add-dialog.component.spec.ts
@@ -113,7 +113,7 @@ describe('QuestAddDialogComponent', () => {
it('creates a stardust rule from the amount alone', () => {
// PoracleNG matches stardust on the reward column, not the amount one, so the floor travels there.
- component.tabIndex = 4;
+ component.rewardKind = 4;
component.stardustForm.controls.reward.setValue(1500);
component.save();
@@ -124,7 +124,7 @@ describe('QuestAddDialogComponent', () => {
});
it('treats a stardust rule with no floor as every stardust quest', () => {
- component.tabIndex = 4;
+ component.rewardKind = 4;
component.save();
@@ -132,7 +132,7 @@ describe('QuestAddDialogComponent', () => {
});
it('sends the minimum amount with an item rule', () => {
- component.tabIndex = 1;
+ component.rewardKind = 1;
component.itemForm.controls.reward.setValue(1301);
component.itemForm.controls.amount.setValue(3);
@@ -144,7 +144,7 @@ describe('QuestAddDialogComponent', () => {
});
it('sends the minimum amount with a mega energy rule, on every selected pokemon', () => {
- component.tabIndex = 2;
+ component.rewardKind = 2;
component.selectedMegaPokemonIds.set([6, 9]);
component.megaForm.controls.amount.setValue(50);
@@ -157,7 +157,7 @@ describe('QuestAddDialogComponent', () => {
});
it('sends the minimum amount with a candy rule', () => {
- component.tabIndex = 3;
+ component.rewardKind = 3;
component.selectedCandyPokemonIds.set([133]);
component.candyForm.controls.amount.setValue(5);
diff --git a/Applications/Pgan.PoracleWebNet.App/ClientApp/src/app/modules/quests/quest-add-dialog.component.ts b/Applications/Pgan.PoracleWebNet.App/ClientApp/src/app/modules/quests/quest-add-dialog.component.ts
index 8dbab130..52b09db7 100644
--- a/Applications/Pgan.PoracleWebNet.App/ClientApp/src/app/modules/quests/quest-add-dialog.component.ts
+++ b/Applications/Pgan.PoracleWebNet.App/ClientApp/src/app/modules/quests/quest-add-dialog.component.ts
@@ -99,6 +99,23 @@ export class QuestAddDialogComponent {
/** Quest-relevant items (balls, berries, potions, revives, TMs, etc.) */
readonly questItems = signal<{ id: number; name: string }[]>([]);
+ /** Which reward the alarm is for. `save()` and `canSave()` switch on it. */
+ rewardKind = 0;
+
+ /**
+ * The reward types, with the numbers `save()` switches on written down rather than inferred from
+ * render order. Pokecoins is hidden on a PoracleNG that would refuse it (see `supportsPokecoins`);
+ * declaring its value keeps every other type where it was whether it renders or not.
+ */
+ readonly rewardKinds: { label: string; value: number }[] = [
+ { label: 'QUESTS.TAB_POKEMON', value: 0 },
+ { label: 'QUESTS.TAB_ITEMS', value: 1 },
+ { label: 'QUESTS.TAB_MEGA_ENERGY', value: 2 },
+ { label: 'QUESTS.TAB_CANDY', value: 3 },
+ { label: 'QUESTS.TAB_STARDUST', value: 4 },
+ { label: 'QUESTS.TAB_POKECOINS', value: 5 },
+ ];
+
saving = signal(false);
/**
@@ -118,6 +135,7 @@ export class QuestAddDialogComponent {
selectedCandyPokemonIds = signal