|
1 | | -import { |
2 | | - includes, |
3 | | - isEmpty, |
4 | | - sortBy, |
5 | | - find, |
6 | | - camelCase, |
7 | | - groupBy, |
8 | | - orderBy, |
9 | | -} from 'lodash'; |
| 1 | +import { includes, isEmpty, find, camelCase, groupBy, orderBy } from 'lodash'; |
10 | 2 | import { Injectable } from '@nestjs/common'; |
11 | 3 | import { ENV_CONFIG } from 'src/config'; |
12 | 4 | import { Logger } from 'src/shared/global'; |
@@ -76,7 +68,7 @@ export class ChallengesService { |
76 | 68 | }; |
77 | 69 | } catch (e) { |
78 | 70 | this.logger.error( |
79 | | - `Challenge resources for challenge ${challengeId} couldn\'t be fetched!`, |
| 71 | + `Challenge resources for challenge ${challengeId} couldn't be fetched!`, |
80 | 72 | e, |
81 | 73 | ); |
82 | 74 | } |
@@ -164,10 +156,11 @@ export class ChallengesService { |
164 | 156 | handle: reviewer.memberHandle, |
165 | 157 | userId: reviewer.memberId.toString(), |
166 | 158 | amount: Math.round( |
167 | | - (challengeReviewer.basePayment ?? 0) + |
168 | | - ((challengeReviewer.incrementalPayment ?? 0) / 100) * |
169 | | - challenge.numOfSubmissions * |
170 | | - firstPlacePrize, |
| 159 | + (challengeReviewer.fixedAmount ?? 0) + |
| 160 | + (challengeReviewer.baseCoefficient ?? 0) * firstPlacePrize + |
| 161 | + (challengeReviewer.incrementalCoefficient ?? 0) * |
| 162 | + firstPlacePrize * |
| 163 | + challenge.numOfSubmissions, |
171 | 164 | ), |
172 | 165 | type: WinningsCategory.REVIEW_BOARD_PAYMENT, |
173 | 166 | }); |
@@ -200,7 +193,7 @@ export class ChallengesService { |
200 | 193 | billingAccountId: challenge.billing.billingAccountId, |
201 | 194 | payroll: includes( |
202 | 195 | TGBillingAccounts, |
203 | | - challenge.billing.billingAccountId, |
| 196 | + +challenge.billing.billingAccountId, |
204 | 197 | ), |
205 | 198 | }, |
206 | 199 | })); |
|
0 commit comments