Skip to content

Commit

Permalink
capacity
Browse files Browse the repository at this point in the history
  • Loading branch information
AyushVChauhan committed Nov 25, 2023
1 parent 1826fec commit 01f2904
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Controller/PaymentController.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,16 @@ module.exports.getPaymentTimeslotCount = async (req, res) => {
// let sport = await SportsComplexModel.find({
// _id: "654a07e68d14ca1d77041c04",
// });
//capacity
let capacity = await SportsComplexModel.findOne({_id:sportsComplex}).lean();
let mycap = 0;
capacity.sports.forEach(ele=>{
if(ele.sport.toString() == sports)
{
mycap = ele.capacity;
}
})
// my cap maa capacity chhe
let paymentdata = [];
payment.forEach((ele) => {
let date = new Date(ele.from);
Expand Down

0 comments on commit 01f2904

Please sign in to comment.