mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-04-23 07:34:07 -05:00
suggestion improvements
This commit is contained in:
parent
712966929e
commit
0344028f8e
|
|
@ -78,6 +78,9 @@ const PlusPage = () => {
|
|||
|
||||
return (
|
||||
<>
|
||||
<div style={{ float: "right" }}>
|
||||
<b>{userData.user.plus.plus_region}</b>
|
||||
</div>
|
||||
{!showSuggestionForm && (
|
||||
<>
|
||||
{data.plusInfo.plus_one_invite_link && (
|
||||
|
|
@ -95,9 +98,6 @@ const PlusPage = () => {
|
|||
/>
|
||||
</>
|
||||
)}
|
||||
<div style={{ float: "right" }}>
|
||||
<b>{userData.user.plus.plus_region}</b>
|
||||
</div>
|
||||
{data.plusInfo.plus_two_invite_link && (
|
||||
<>
|
||||
<div style={{ marginTop: "1em" }}>
|
||||
|
|
|
|||
|
|
@ -125,7 +125,8 @@ const SuggestionForm = ({
|
|||
</Form.Field>
|
||||
<Form.Field>
|
||||
<b>
|
||||
You can't edit or delete a suggestion after you have submitted it
|
||||
You can't edit or delete a suggestion after you have submitted it.
|
||||
One suggestion per month.
|
||||
</b>
|
||||
</Form.Field>
|
||||
<Form.Field>
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ const typeDef = gql`
|
|||
year: Int!
|
||||
"Average of all scores of the voters for the month 0% to 100%"
|
||||
score: Float!
|
||||
new: Boolean!
|
||||
}
|
||||
|
||||
type UsersForVoting {
|
||||
|
|
@ -232,7 +233,7 @@ const resolvers = {
|
|||
suggestions: (root, args, ctx) => {
|
||||
if (!ctx.user || !ctx.user.plus) return null
|
||||
const searchCriteria =
|
||||
ctx.user.plus.membership_status === "ONE" ? {} : { plus_region: "TWO" }
|
||||
ctx.user.plus.membership_status === "ONE" ? {} : { plus_server: "TWO" }
|
||||
return Suggested.find(searchCriteria)
|
||||
.populate("discord_user")
|
||||
.populate("suggester_discord_user")
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user