Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obsidian Event Registration - Fee options available when none remaining #5408

Closed
1 task done
gillcrockford opened this issue Apr 19, 2023 · 5 comments
Closed
1 task done
Labels
Fixed in v15.2 Fixed in v16.0 Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. Type: Bug Confirmed bugs or reports that are very likely to be bugs.

Comments

@gillcrockford
Copy link

gillcrockford commented Apr 19, 2023

Please go through all the tasks below

  • Check this box only after you have successfully completed both the above tasks

Please provide a brief description of the problem. Please do not forget to attach the relevant screenshots from your side.

The Obsidian Registration Block continues to allow fees to be selected after no more are available & where there is no actual fee displays ($0.00)
Screen Shot 2023-04-19 at 11 46 13 AM

This happens for single and multiple fee types & when hide when no more available is checked (& allow more than 1)

Expected Behavior

Expected Behavior as per the previous registration block where the fees are greyed out and unavailable when the maximum available has been reached. Also where there is no fee no $ amount should be shown.
Screen Shot 2023-04-19 at 11 47 03 AM

Actual Behavior

Actual Behavior
The Obsidian Registration Block continues to allow fees to be selected after no more are available & where there is no actual fee it displays ($0.00)
Screen Shot 2023-04-19 at 11 46 13 AM

Steps to Reproduce

On the demo site either create a registration event with optional fees, limit the fees so the maximum can be reached (eg 1) or set to 0 available, or use the summer camp event registration.
Duplicate the registration page (under CMS),set the page URL to eg regobsidian & replace the registration block with the Obsidian Registration Block
View the registration instance while using the Obsidian registration Entry block https://rock.rocksolidchurchdemo.com/regobsidian?RegistrationInstanceId=1 & also from the regular registraion block
https://rock.rocksolidchurchdemo.com/Registration?RegistrationInstanceId=1
Screen Shot 2023-04-19 at 12 03 24 PM

Rock Version

Rock McKinley 14.2 (1.14.2.1)

Client Culture Setting

en-US

@sparkdevnetwork-service sparkdevnetwork-service added the Type: Bug Confirmed bugs or reports that are very likely to be bugs. label Apr 27, 2023
@adamhann
Copy link
Contributor

I can confirm that his bug still exists in v15. We have had this issue for a while with Fees.

@sparkdevnetwork-service sparkdevnetwork-service added the Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. label Jun 6, 2023
@dataCollegechurch
Copy link

Note: Fee options remain available even after the maximum available quantity has been reached by existing registrations. The presence of this bug is not based the amount of the fee. It appears when the fee is $0 as well as when the fee is > $0.

@nlBayside
Copy link
Contributor

nlBayside commented Jul 20, 2023

Hello, we are also experiencing this issue in our Rock instance and we are on v15.1.

I did some investigating and it looks like the obsidian Registration Entry block is not filtering out any of the fees. The fees come from the viewModel property in the block.

<template v-for="fee in viewModel.fees" :key="fee.guid">

Screen Shot 2023-07-20 at 12 48 32 PM

So in this screenshot, you can see the fees property from viewModel. Since this property is being passed into feeField, then we're getting all the fees rather than ones where countRemaining is greater than 0. My guess is either another v-if would be nested in the for loop to check the value of countRemaining, or create a computed property like filteredFees and use that in the for loop.

<template v-for="fee in viewModel.fees" :key="fee.guid"> 
  <template v-if="fee.countRemaining > 0">
  ... same content
  </template>
</template>

or

computed: {
filteredFees() {
// something similar to this
    return this.viewModel.fees.filter(fee => fee.countRemaining > 0);
  }
}

<template v-for="fee in filteredFees" :key="fee.guid">
... same content
</template>

Keep in mind, this two solutions are targeting registrationEntry.ts, while it is also possible a solution could be made directly in feeField.partial.ts.

@robotman3000
Copy link

robotman3000 commented Jul 26, 2023

I was also looking into how to fix this myself and I went with the option of using feeField.partial.ts So far it only updates the dropdown version. It doesn't account for other possibilities where quantity is involved.

Example:

  dropDownListOptions(): ListItemBag[] {
      return this.fee.items.filter(i => { return i.countRemaining == undefined || i.countRemaining > 0 }).map(i => ({
          text: this.getItemLabel(i),
          value: i.guid
      }));
  },

I added .filter(i => { return i.countRemaining == undefined || i.countRemaining > 0 }) to this.fee.items. I did have to account for when there is no quantity on the fee. It seems to be undefined when that is the case.

@sparkdevnetwork-service sparkdevnetwork-service changed the title Obsidian Event Registration - Fee options available when non remaining Obsidian Event Registration - Fee options available when none remaining Aug 1, 2023
ethan-sparkdevnetwork added a commit that referenced this issue Aug 10, 2023
…tiple Quantity where the Maximum available property was not being used on registrations that occur after the registration that used up the remaining number of fees. (Partial fix for #5408)
@ethan-sparkdevnetwork
Copy link
Contributor

The issue is slightly different depending on the configuration of the fee.

Single Option
Control: Checkbox
Behavior: Works correctly

Single Option, Enable Quantity
Control: Number Up Down
Behavior:
Before the fee items are used the control restricts the amount selection to the number available.
However for fees that are already used up the control does not show any remaining info, and any number can be selected.
Fix: Use "??" instead of "||" when setting the max number. The "0" value is falsey and so the default is used instead of 0.

Multiple Option
Control: Single Select DDL
Behavior:
The control shows the number remaining correctly, but there isn't currently an option to "disable" an item in the Obsidian dropDownList.
This is an issue with the control and with the usage
Fix: Add the disable prop to the items in the dropdown list and implemnt in the feeField.

Multiple Option, Enable Quantity
Control: Number Up Down Group
Behavior: Before the fee items are used the control restricts the amount selection to the number available.
However, for fees that are already used up the control does not show any remaining info, and any number can be selected.
Fix: Use "??" instead of "||" when setting the max number. The "0" value is falsey and so the default is used instead of 0.

Hide When None Remaining
Problem: The feeField is configured to hide if there are no items to display. However the server side logic provides the items with their configuration.
Fix: Update the server-side logic to not send fee info that is not needed by the block.
Update RegistrationEntryBlockViewModel and add the prop "HideWhenNoneRemaining".
Update fee logic in RegistrationEntry.GetViewModel() to not include items that have 0 remaining and have HideWehnNoneRemaining set to true.

Fixed in commits:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in v15.2 Fixed in v16.0 Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. Type: Bug Confirmed bugs or reports that are very likely to be bugs.
Projects
None yet
Development

No branches or pull requests

8 participants