Skip to content

Commit b771bf4

Browse files
rajat1saxenaRajat
andauthored
Changed pricing data type from int to float (#704)
Co-authored-by: Rajat <[email protected]>
1 parent de7b8d2 commit b771bf4

File tree

4 files changed

+22
-22
lines changed

4 files changed

+22
-22
lines changed

apps/web/components/admin/payments/payment-plan-form.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,11 @@ export function PaymentPlanForm({
183183
$planId: String!
184184
$name: String
185185
$type: PaymentPlanType
186-
$oneTimeAmount: Int
187-
$emiAmount: Int
186+
$oneTimeAmount: Float
187+
$emiAmount: Float
188188
$emiTotalInstallments: Int
189-
$subscriptionMonthlyAmount: Int
190-
$subscriptionYearlyAmount: Int
189+
$subscriptionMonthlyAmount: Float
190+
$subscriptionYearlyAmount: Float
191191
$description: String
192192
$includedProducts: [String]
193193
) {
@@ -241,11 +241,11 @@ export function PaymentPlanForm({
241241
$type: PaymentPlanType!
242242
$entityId: String!
243243
$entityType: MembershipEntityType!
244-
$oneTimeAmount: Int
245-
$emiAmount: Int
244+
$oneTimeAmount: Float
245+
$emiAmount: Float
246246
$emiTotalInstallments: Int
247-
$subscriptionMonthlyAmount: Int
248-
$subscriptionYearlyAmount: Int
247+
$subscriptionMonthlyAmount: Float
248+
$subscriptionYearlyAmount: Float
249249
$description: String
250250
$includedProducts: [String]
251251
) {

apps/web/graphql/activities/types.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import {
22
GraphQLFloat,
3-
GraphQLInt,
43
GraphQLList,
54
GraphQLNonNull,
65
GraphQLObjectType,
@@ -11,14 +10,14 @@ const dataPoint = new GraphQLObjectType({
1110
name: "DataPoint",
1211
fields: {
1312
date: { type: new GraphQLNonNull(GraphQLString) },
14-
count: { type: new GraphQLNonNull(GraphQLInt) },
13+
count: { type: new GraphQLNonNull(GraphQLFloat) },
1514
},
1615
});
1716

1817
const activity = new GraphQLObjectType({
1918
name: "Activity",
2019
fields: {
21-
count: { type: new GraphQLNonNull(GraphQLInt) },
20+
count: { type: new GraphQLNonNull(GraphQLFloat) },
2221
points: { type: new GraphQLList(dataPoint) },
2322
growth: { type: GraphQLFloat },
2423
},

apps/web/graphql/paymentplans/mutation.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {
2+
GraphQLFloat,
23
GraphQLInt,
34
GraphQLList,
45
GraphQLNonNull,
@@ -27,11 +28,11 @@ const mutations = {
2728
entityType: {
2829
type: new GraphQLNonNull(userTypes.membershipEntityType),
2930
},
30-
oneTimeAmount: { type: GraphQLInt },
31-
emiAmount: { type: GraphQLInt },
31+
oneTimeAmount: { type: GraphQLFloat },
32+
emiAmount: { type: GraphQLFloat },
3233
emiTotalInstallments: { type: GraphQLInt },
33-
subscriptionMonthlyAmount: { type: GraphQLInt },
34-
subscriptionYearlyAmount: { type: GraphQLInt },
34+
subscriptionMonthlyAmount: { type: GraphQLFloat },
35+
subscriptionYearlyAmount: { type: GraphQLFloat },
3536
description: { type: GraphQLString },
3637
includedProducts: { type: new GraphQLList(GraphQLString) },
3738
},
@@ -85,11 +86,11 @@ const mutations = {
8586
planId: { type: new GraphQLNonNull(GraphQLString) },
8687
name: { type: GraphQLString },
8788
type: { type: types.paymentPlanType },
88-
oneTimeAmount: { type: GraphQLInt },
89-
emiAmount: { type: GraphQLInt },
89+
oneTimeAmount: { type: GraphQLFloat },
90+
emiAmount: { type: GraphQLFloat },
9091
emiTotalInstallments: { type: GraphQLInt },
91-
subscriptionMonthlyAmount: { type: GraphQLInt },
92-
subscriptionYearlyAmount: { type: GraphQLInt },
92+
subscriptionMonthlyAmount: { type: GraphQLFloat },
93+
subscriptionYearlyAmount: { type: GraphQLFloat },
9394
description: { type: GraphQLString },
9495
includedProducts: { type: new GraphQLList(GraphQLString) },
9596
},

apps/web/graphql/paymentplans/types.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ const paymentPlan = new GraphQLObjectType({
3232
type: new GraphQLNonNull(userTypes.membershipEntityType),
3333
},
3434
oneTimeAmount: { type: GraphQLFloat },
35-
emiAmount: { type: GraphQLInt },
35+
emiAmount: { type: GraphQLFloat },
3636
emiTotalInstallments: { type: GraphQLInt },
37-
subscriptionMonthlyAmount: { type: GraphQLInt },
38-
subscriptionYearlyAmount: { type: GraphQLInt },
37+
subscriptionMonthlyAmount: { type: GraphQLFloat },
38+
subscriptionYearlyAmount: { type: GraphQLFloat },
3939
description: { type: GraphQLString },
4040
includedProducts: { type: new GraphQLList(GraphQLString) },
4141
},

0 commit comments

Comments
 (0)