Hi John,How to Choose the Perfect Shopify Theme and Build Your Online Store Fast! (keywords: how to create a shopify store, how to start selling on shopify)
Shopify Tutorials That Will Save You 5 Hours of Time and $150 A Month!
Can I Start My Own ECommerce Business Without Knowing How To Code?
The One Thing All Shopify Entrepreneurs Have in Common
Regrads,
Tommy Sicilia
',
- attachments: [
- {
- fileName: 'log.txt',
- thumbnail: '/images/icons/txt.png',
- url: '',
- size: '5mb'
- },
- {
- fileName: 'performance.xls',
- thumbnail: '/images/icons/xls.png',
- url: '',
- size: '10mb'
- }
- ],
- isStarred: false,
- labels: ['private'],
- time: 'Mon Dec 10 2018 07:46:00 GMT+0000 (GMT)',
- replies: [],
- folder: 'inbox',
- isRead: true
- },
- {
- id: 2,
- from: {
- email: 'tressag@mail.com',
- name: 'Tressa Gass',
- avatar: '/images/avatars/6.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@mail.com'
- }
- ],
- subject: 'Please find attached the latest Company Report',
- cc: [],
- bcc: ['menka@mail.com'],
- message:
- ' Hello John,
I hope you are doing well.
I am sending over a company report for company. It is a PDF file.
Please let me know if you want to schedule a call or any other questions.
Regrads
Tressa Gass
',
- attachments: [
- {
- fileName: 'company-report.pdf',
- thumbnail: '/images/icons/pdf.png',
- url: '',
- size: '32mb'
- }
- ],
- isStarred: true,
- labels: ['company', 'private'],
- time: 'Mon Dec 10 2018 07:55:00 GMT+0000 (GMT)',
- replies: [],
- folder: 'inbox',
- isRead: true
- },
- {
- id: 3,
- from: {
- email: 'hettiem@mail.com',
- name: 'Hettie Mcerlean',
- avatar: '/images/avatars/3.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@mail.com'
- }
- ],
- subject: 'Your order has been delivered',
- cc: [],
- bcc: [],
- message:
- 'Hello John,
Your order has just been delivered. Here is the delivery confirmation number: #569443
Regrads
If you have any questions, please feel free to reach out to our customer service team at customerService@email.com
Hettie Mcerlean
',
- attachments: [],
- isStarred: false,
- labels: ['company'],
- time: 'Mon Dec 10 2018 08:35:00 GMT+0000 (GMT)',
- replies: [],
- folder: 'spam',
- isRead: true
- },
- {
- id: 4,
- from: {
- email: 'louettae@mail.com',
- name: 'Louetta Esses',
- avatar: '/images/avatars/4.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@mail.com'
- }
- ],
- subject: 'Update Can Change Your Personal Life',
- cc: [],
- bcc: [],
- message:
- 'Hi John,
5 Biggest Ways in Which the Latest iOS Update Can Change Your Personal Life
1.Group FaceTime
2. Memoji & Animoji
3. Person to Person Payments
4. Screen Time
5. Shortcuts App on Macs
Regrads,
Louetta Esses
',
- attachments: [
- {
- fileName: 'update.doc',
- thumbnail: '/images/icons/doc.png',
- url: '',
- size: '32mb'
- }
- ],
- isStarred: false,
- labels: ['important'],
- time: 'Mon Dec 11 2018 09:04:10 GMT+0000 (GMT)',
- replies: [],
- folder: 'inbox',
- isRead: true
- },
- {
- id: 5,
- from: {
- email: 'bposvner0@zdnet.com',
- name: 'Bobbie Posvner',
- avatar: '/images/avatars/8.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@dot.gov'
- }
- ],
- subject: 'Your opinion matters to us. Tell us how you feel!',
- cc: [],
- bcc: [],
- message:
- "Hello John,
Recently you shopped with us and we know your order has been delivered to you.
Would you please write a review? It's really important to us.
Regards,
Bobbie Posvner
",
- attachments: [],
- isStarred: true,
- labels: ['private'],
- time: 'Tue Dec 12 2018 11:55:00 GMT+0000 (GMT)',
- replies: [],
- folder: 'spam',
- isRead: true
- },
- {
- id: 6,
- from: {
- email: 'rgilder1@illinois.edu',
- name: 'Rebecca Gilder',
- avatar: '/images/avatars/6.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@google.co.uk'
- }
- ],
- subject: 'World Tourism Day Event Invitation',
- cc: [],
- bcc: [],
- message:
- 'Hello John,
You have been invited to the World Tourism Day event on this weekend.
The event starts at 10:00 AM and ends at 5:00PM.
Regards
Rebecca Gilder
',
- attachments: [],
- isStarred: false,
- labels: ['personal'],
- time: 'Thu Dec 13 2018 08:25:00 GMT+0000 (GMT)',
- replies: [],
- folder: 'trash',
- isRead: true
- },
- {
- id: 7,
- from: {
- email: 'swilby2@yandex.ru',
- name: 'Shawn Wilby',
- avatar: '/images/avatars/1.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@altervista.org'
- }
- ],
- subject: 'Delivery Note',
- cc: [],
- bcc: [],
- message:
- 'Hello John,
Shipping Details:
Order Number: 82080
Delivered-to: John Doe
Email: johndoe@altervista.org
Address: 99 El ABCD San Francisco, CA. United States
Thank You for being with Us!
Regards
Shawn Wilby
',
- attachments: [],
- isStarred: false,
- labels: ['company'],
- time: 'Fri Dec 14 2018 04:49:23 GMT+0000 (GMT)',
- replies: [],
- folder: 'draft',
- isRead: true
- },
- {
- id: 8,
- from: {
- email: 'wmannering3@mozilla.org',
- name: 'Waldemar Mannering',
- avatar: '/images/avatars/5.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@sciencedaily.com'
- }
- ],
- subject: 'Refer friends. Get rewards.',
- cc: [],
- bcc: [],
- message:
- 'Hi John,
At Auto Sales, we understand that our customers are our greatest resource, and the only real way that an automotive dealership can grow is through word of mouth.
If you had a wonderful experience with us, the greatest thanks you can give is to pass along your praise and positive experience with Auto Sales to your family, friends, and colleagues.
As a reward for promoting us, we will pay you $200 for every referral you send our way who purchases a pre-owned vehicle of under $15,000. For every purchase over $15,000, we will pay you a referral of $300.
Regards
Waldemar Mannering
',
- attachments: [],
- isStarred: false,
- labels: ['private'],
- time: 'Tue Dec 15 2018 11:02:28 GMT+0000 (GMT)',
- replies: [],
- folder: 'inbox',
- isRead: false
- },
- {
- id: 9,
- from: {
- email: 'hfrostdyke4@scientificamerican.com',
- name: 'Heath Frostdyke',
- avatar: '/images/avatars/1.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@weibo.com'
- }
- ],
- subject: 'Good Hair Day!',
- cc: [],
- bcc: [],
- message:
- 'Hello John,
Good Hair Day is all about recognizing the significance a good hair day can have on your confidence, self-esteem, and overall happiness. A good hair day is different for everyone and this year we want to help you achieve your best hair!
Book with our stylist today to get 10% discount.
Regards
Heath Frostdyke
',
- attachments: [],
- isStarred: true,
- labels: ['personal'],
- time: 'Tue Jan 01 2018 18:31:19 GMT+0000 (GMT)',
- replies: [],
- folder: 'trash',
- isRead: false
- },
- {
- id: 10,
- from: {
- email: 'pjentzsch5@tamu.edu',
- name: 'Paulita Jentzsch',
- avatar: '/images/avatars/7.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@skype.com'
- }
- ],
- subject: 'Travel to Europe',
- cc: [],
- bcc: [],
- message:
- 'Hello John,
Use code WILD_TRAVELER to get 25% off on flight bookings to Europe.
Offer only valid till the weekends.
Regards
Paulita Jentzsch
',
- attachments: [],
- isStarred: true,
- labels: ['important'],
- time: 'Tue Jan 03 2018 08:05:33 GMT+0000 (GMT)',
- replies: [],
- folder: 'draft',
- isRead: false
- },
- {
- id: 11,
- from: {
- email: 'lminghetti6@yale.edu',
- name: 'Lowell Minghetti',
- avatar: '/images/avatars/4.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@fda.gov'
- }
- ],
- subject: 'Cyber Monday Sale!',
- cc: [],
- bcc: [],
- message:
- 'Hi John,
Take 30% Off Your Entire Purchase!
This monday you can take 30% off your entire purchase! Simply enter the promo code HGASNC18 during your checkout to activate your savings!
Regards
Lowell Minghetti
',
- attachments: [
- {
- fileName: 'ElementumLigula.js',
- thumbnail: '/images/icons/js.png',
- url: '',
- size: '29mb'
- }
- ],
- isStarred: false,
- labels: ['company'],
- time: 'Tue Jan 03 2018 01:05:20 GMT+0000 (GMT)',
- replies: [],
- folder: 'trash',
- isRead: true
- },
- {
- id: 12,
- from: {
- email: 'efinessy7@sbwire.com',
- name: 'Eugenie Finessy',
- avatar: '/images/avatars/2.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@odnoklassniki.ru'
- }
- ],
- subject: "BOOK LOVER'S DAY",
- cc: [],
- bcc: [],
- message:
- 'Hello John,
Whenever you read a good book, you are making efforts to open a new door to let more light come in.
May you are blessed with more and more books. Happy National Book Lover’s Day to you.
Regards
Eugenie Finessy
',
- attachments: [],
- isStarred: false,
- labels: ['personal'],
- time: 'Tue Jan 04 2018 21:26:54 GMT+0000 (GMT)',
- replies: [],
- folder: 'sent',
- isRead: true
- },
- {
- id: 13,
- from: {
- email: 'tmckeurton8@163.com',
- name: 'Tadio McKeurton',
- avatar: '/images/avatars/3.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@nifty.com'
- }
- ],
- subject: 'Handmade Goods',
- cc: [],
- bcc: [],
- message:
- 'Hey John,
Painted wood blocks, stackable wood blocks
Fall is almost here and these little blocks are the perfect décor to begin your fall decorating! These stacked blocks say Count Your Blessings and are in beautiful fall colors.
Regards
Tadio McKeurton
',
- attachments: [],
- isStarred: false,
- labels: ['important'],
- time: 'Tue Jan 05 2018 19:00:00 GMT+0000 (GMT)',
- replies: [],
- folder: 'draft',
- isRead: true
- },
- {
- id: 14,
- from: {
- email: 'ebegg9@wikia.com',
- name: 'Eb Begg',
- avatar: '/images/avatars/8.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@51.la'
- }
- ],
- subject: 'App Update',
- cc: [],
- bcc: [],
- message:
- 'Hello John,
We have released the update 8.6.1 for the app
Update your application. Don’t miss our new Feature
Regards
Eb Begg
',
- attachments: [],
- isStarred: false,
- labels: ['company'],
- time: 'Tue Jan 06 2018 23:12:13 GMT+0000 (GMT)',
- replies: [],
- folder: 'inbox',
- isRead: true
- },
- {
- id: 15,
- from: {
- email: 'mspata@sina.com.cn',
- name: 'Modestine Spat',
- avatar: '/images/avatars/3.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@oracle.com'
- }
- ],
- subject: 'Password Reset',
- cc: [],
- bcc: [],
- message:
- 'Hey John,
I just wanted to let you know that your password has been changed. You can safely ignore this email if you requested this change.
Otherwise, please do let us know and we will be here to help.
Regards
Modestine Spat
',
- attachments: [],
- isStarred: false,
- labels: ['company'],
- time: 'Tue Jan 07 2018 12:25:03 GMT+0000 (GMT)',
- replies: [],
- folder: 'inbox',
- isRead: false
- },
- {
- id: 16,
- from: {
- email: 'cprandob@rambler.ru',
- name: 'Chase Prando',
- avatar: '/images/avatars/4.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@vistaprint.com'
- }
- ],
- subject: 'Course Update',
- cc: [],
- bcc: [],
- message:
- 'Hey John,
You have completed more than 68% of the course
We noticed that you have not attended or advanced the course for over a week.
It is very important for us that you finish your studies, as regular classes are a guarantee of knowledge and successful completion!
For help, we have allocated a free opportunity to contact the course teacher within 2 days
Regards
Chase Prando
',
- attachments: [],
- isStarred: false,
- labels: ['company'],
- time: 'Tue Jan 08 2018 00:36:40 GMT+0000 (GMT)',
- replies: [],
- folder: 'sent',
- isRead: true
- },
- {
- id: 17,
- from: {
- email: 'nbartlesc@merriam-webster.com',
- name: 'Normand Bartles',
- avatar: '/images/avatars/8.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@si.edu'
- }
- ],
- subject: 'Earth Hour',
- cc: [],
- bcc: [],
- message:
- 'Hey John,
Earth Hour has always drawn its power from the people - and this year was no exception. We showed that despite the physical distance, we were still able to unite digitally to speak up for nature louder than ever.
You can still take part in the earth hour virtual spotlight.
Regards
Normand Bartles
',
- attachments: [],
- isStarred: false,
- labels: ['personal'],
- time: 'Tue Jan 09 2018 22:06:50 GMT+0000 (GMT)',
- replies: [],
- folder: 'spam',
- isRead: true
- },
- {
- id: 18,
- from: {
- email: 'rgennd@dedecms.com',
- name: 'Robin Genn',
- avatar: '/images/avatars/6.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@about.com'
- }
- ],
- subject: "Happy Teacher's Day!",
- cc: [],
- bcc: [],
- message:
- "Happy Teacher's Day John,
Teachers have to lead by example, and you have always been an excellent example to follow. As a student, I feel very grateful to have such a great mentor in my life. Happy Teacher’s Day!
Especially for Teacher's Day, we held a postcard competition for students. We invite you to enjoy this creativity. The kids tried very hard!
Regards
Robin Genn
",
- attachments: [],
- isStarred: true,
- labels: ['personal'],
- time: 'Tue Jan 10 2018 01:51:24 GMT+0000 (GMT)',
- replies: [],
- folder: 'spam',
- isRead: true
- },
- {
- id: 19,
- from: {
- email: 'eramelote@webeden.co.uk',
- name: 'Emmalynn Ramelot',
- avatar: '/images/avatars/8.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@tinypic.com'
- }
- ],
- subject: 'Newly Improved Product',
- cc: [],
- bcc: [],
- message:
- 'Hey John,
The Newly Improved Product is Here!
What is New in Finance?
1. Dual Authentication
2. Transparent System
3. Beta Test
Regards
Emmalynn Ramelot
',
- attachments: [],
- isStarred: true,
- labels: ['personal'],
- time: 'Tue Jan 11 2018 14:25:46 GMT+0000 (GMT)',
- replies: [],
- folder: 'spam',
- isRead: false
- },
- {
- id: 20,
- from: {
- email: 'pcuzenf@mediafire.com',
- name: 'Penni Cuzen',
- avatar: '/images/avatars/8.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@google.es'
- }
- ],
- subject: 'Meet your new banker.',
- cc: [],
- bcc: [],
- message:
- "Hey John,
Having a direct human contact that understands the finance industry can take your project to the next level.
Amelia is that person for you. She's happy to help with any of your project needs.
Regards
Penni Cuzen
",
- attachments: [
- {
- fileName: 'bank-statement.pdf',
- thumbnail: '/images/icons/pdf.png',
- url: '',
- size: '4mb'
- }
- ],
- isStarred: false,
- labels: ['private'],
- time: 'Tue Jan 12 2018 04:16:10 GMT+0000 (GMT)',
- replies: [
- {
- id: 101,
- from: {
- email: 'johndoe@mail.com',
- name: 'John Doe',
- avatar: '/images/avatars/6.png'
- },
- to: [
- {
- name: 'me',
- email: 'hettiem@mail.com'
- }
- ],
- subject: 'It was the best sandcastle he had ever seen.',
- cc: [],
- bcc: [],
- message:
- 'Hello Hettie,
Marshmallow cookie jelly liquorice. Powder macaroon cake pastry biscuit. Cotton candy cotton candy jelly chocolate bar. Sesame snaps candy gummi bears cake cookie jujubes. Sweet I love sweet roll. Sesame snaps I love marzipan. Jelly powder tootsie roll. Marshmallow pudding cookie fruitcake liquorice powder. I love I love cookie chupa chups fruitcake ice cream I love biscuit I love. Tiramisu apple pie candy canes cookie gummies. Donut toffee bear claw topping jelly-o. Cupcake icing muffin. Cookie brownie wafer pie sweet. Icing sesame snaps halvah toffee marshmallow lemon drops jelly.
Tiramisu candy canes powder. Powder chocolate bar halvah liquorice cake I love danish. Cake wafer apple pie. Bear claw fruitcake I love marzipan dessert marzipan lollipop. Halvah gingerbread jelly chupa chups tiramisu I love wafer gummi bears. Candy powder caramels candy gummies. Tart tart cupcake brownie. Bear claw gummies toffee. Tiramisu donut cake chocolate bar. Halvah chocolate bar donut jelly-o. Icing candy brownie chocolate. Pastry bear claw halvah gummies chocolate bar chocolate. Apple pie danish wafer I love biscuit.
Regrads,
John Doe
',
- attachments: [],
- isStarred: false,
- labels: [],
- time: 'Mon Dec 15 2018 10:56:00 GMT+0000 (GMT)',
- replies: [],
- folder: 'inbox',
- isRead: false
- },
- {
- id: 102,
- from: {
- email: 'hettiem@mail.com',
- name: 'Hettie Mcerlean',
- avatar: '/images/avatars/1.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@mail.com'
- }
- ],
- subject: 'I’m a living furnace.',
- cc: [],
- bcc: [],
- message:
- 'Oat cake tart danish jelly beans brownie I love. Liquorice I love lollipop chocolate cake carrot cake toffee. Tart muffin candy canes croissant sugar plum lollipop. Macaroon cheesecake marshmallow powder sweet roll bonbon candy apple pie candy canes.
Regrads,
Hettie Mcerlean
',
- attachments: [],
- isStarred: false,
- labels: [],
- time: 'Mon Dec 16 2018 11:25:00 GMT+0000 (GMT)',
- replies: [],
- folder: 'inbox',
- isRead: false
- }
- ],
- folder: 'spam',
- isRead: false
- },
- {
- id: 21,
- from: {
- email: 'abaldersong@utexas.edu',
- name: 'Ardis Balderson',
- avatar: '/images/avatars/2.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@ow.ly'
- }
- ],
- subject: 'Bank transfer initiated.',
- cc: [],
- bcc: [],
- message:
- 'Hey John,
Bank transfers initiated before 7 PM ET on business days will typically be available in your bank account the next business day. Business days are Mon-Fri, excluding bank holidays.
Transfers are reviewed which may result in delays or funds being frozen or removed from your account. Learn more
Regards
Ardis Balderson
',
- attachments: [],
- isStarred: true,
- labels: ['company'],
- time: new Date(new Date().getTime() - 7 * 60 * 60 * 1000),
- replies: [],
- folder: 'inbox',
- isRead: false
- },
- {
- id: 22,
- from: {
- email: 'dmallallh@ask.com',
- name: 'Dagmar Mallall',
- avatar: '/images/avatars/8.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@furl.net'
- }
- ],
- subject: 'Accounting software',
- cc: [],
- bcc: [],
- message:
- 'Hey John,
Take on the market with our powerful platforms.
Log in online anytime, anywhere on your Mac, PC, tablet or phone and see up-to-date financials. Accounting software with all the time-saving tools you need to grow your business.
Regards
Dagmar Mallall
',
- attachments: [],
- isStarred: false,
- labels: ['company'],
- time: new Date(new Date().getTime() - 5 * 20 * 60 * 1000),
- replies: [],
- folder: 'draft',
- isRead: false
- },
- {
- id: 23,
- from: {
- email: 'nmacgaughyi@aol.com',
- name: 'Nada MacGaughy',
- avatar: '/images/avatars/3.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@cnet.com'
- }
- ],
- subject: 'Labor Day Sale',
- cc: [],
- bcc: [],
- message:
- 'Hey John,
There is a time for business and a time for pleasure. There is a time to work and a time to rest. Labor Day is your time for pleasure and rest. Enjoy!
Sale starting today! Save up to 25% off for all lessons.
Regards
Nada MacGaughy
',
- attachments: [],
- isStarred: false,
- labels: ['private'],
- time: new Date(new Date().getTime() - 2 * 60 * 60 * 1000),
- replies: [],
- folder: 'trash',
- isRead: false
- },
- {
- id: 24,
- from: {
- email: 'douldcottj@yellowpages.com',
- name: 'Dalila Ouldcott',
- avatar: '/images/avatars/1.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@github.io'
- }
- ],
- subject: 'Order Feedback',
- cc: [],
- bcc: [],
- message:
- "Hey John,
What did you think o your recent purchase?
We'd love to hear your feedback on your recent order. Please share your experience in a review to help other pet parents just like you.
Regards
Dalila Ouldcott
",
- attachments: [
- {
- fileName: 'example.doc',
- thumbnail: '/images/icons/doc.png',
- url: '',
- size: '21mb'
- }
- ],
- isStarred: false,
- labels: ['personal'],
- time: new Date(new Date().getTime() - 1 * 30 * 60 * 1000),
- replies: [
- {
- id: 103,
- from: {
- email: 'johndoe@mail.com',
- name: 'John Doe',
- avatar: '/images/avatars/1.png'
- },
- to: [
- {
- name: 'me',
- email: 'hettiem@mail.com'
- }
- ],
- subject: '🎯 Focused impactful open system',
- cc: [],
- bcc: [],
- message:
- 'Hello Hettie,
Marshmallow cookie jelly liquorice. Powder macaroon cake pastry biscuit. Cotton candy cotton candy jelly chocolate bar. Sesame snaps candy gummi bears cake cookie jujubes. Sweet I love sweet roll. Sesame snaps I love marzipan. Jelly powder tootsie roll. Marshmallow pudding cookie fruitcake liquorice powder. I love I love cookie chupa chups fruitcake ice cream I love biscuit I love. Tiramisu apple pie candy canes cookie gummies. Donut toffee bear claw topping jelly-o. Cupcake icing muffin. Cookie brownie wafer pie sweet. Icing sesame snaps halvah toffee marshmallow lemon drops jelly.
Tiramisu candy canes powder. Powder chocolate bar halvah liquorice cake I love danish. Cake wafer apple pie. Bear claw fruitcake I love marzipan dessert marzipan lollipop. Halvah gingerbread jelly chupa chups tiramisu I love wafer gummi bears. Candy powder caramels candy gummies. Tart tart cupcake brownie. Bear claw gummies toffee. Tiramisu donut cake chocolate bar. Halvah chocolate bar donut jelly-o. Icing candy brownie chocolate. Pastry bear claw halvah gummies chocolate bar chocolate. Apple pie danish wafer I love biscuit.
Regrads,
John Doe
',
- attachments: [],
- isStarred: false,
- labels: [],
- time: 'Mon Dec 10 2018 10:56:00 GMT+0000 (GMT)',
- replies: [],
- folder: 'inbox',
- isRead: false
- },
- {
- id: 104,
- from: {
- email: 'hettiem@mail.com',
- name: 'Hettie Mcerlean',
- avatar: '/images/avatars/3.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@mail.com'
- }
- ],
- subject: 'Profound systemic alliance 🎉 🎊',
- cc: [],
- bcc: [],
- message:
- 'Oat cake tart danish jelly beans brownie I love. Liquorice I love lollipop chocolate cake carrot cake toffee. Tart muffin candy canes croissant sugar plum lollipop. Macaroon cheesecake marshmallow powder sweet roll bonbon candy apple pie candy canes.
Regrads,
Hettie Mcerlean
',
- attachments: [],
- isStarred: false,
- labels: [],
- time: 'Mon Dec 10 2018 11:25:00 GMT+0000 (GMT)',
- replies: [],
- folder: 'inbox',
- isRead: false
- }
- ],
- folder: 'inbox',
- isRead: true
- },
- {
- id: 25,
- from: {
- email: 'lkubicek0@cdbaby.com',
- name: 'Lockwood Kubicek',
- avatar: '/images/avatars/2.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@github.io'
- }
- ],
- subject: 'Finally Start Running',
- cc: [],
- bcc: [],
- message:
- 'Hey John,
How TO Finally Start Running
Order an individual training and nutrition program from our specialists! Only now there is a 20% discount!
Regards
Lockwood Kubicek
',
- attachments: [],
- isStarred: false,
- labels: ['private'],
- time: new Date(new Date().getTime() - 1 * 30 * 60 * 1000),
- replies: [],
- folder: 'inbox',
- isRead: true
- },
- {
- id: 26,
- from: {
- email: 'mosgarby1@accuweather.com',
- name: 'Milena Osgarby',
- avatar: '/images/avatars/3.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@github.io'
- }
- ],
- subject: 'Eco Food',
- cc: [],
- bcc: [],
- message:
- 'Hey John,
Hey! We replenish our assortment with healthy eco food. On this occasion, we really want to play the same game with you! Can you guess what category of new products we are adding?🍯🍓🍵
Test your intuition, answer the letter!🔮 All members will receive a discount 20% on purchases in the next email!💌
Regards
Milena Osgarby
',
- attachments: [],
- isStarred: false,
- labels: ['important'],
- time: new Date(new Date().getTime() - 1 * 30 * 60 * 1000),
- replies: [
- {
- id: 105,
- from: {
- email: 'johndoe@mail.com',
- name: 'John Doe',
- avatar: '/images/avatars/6.png'
- },
- to: [
- {
- name: 'me',
- email: 'hettiem@mail.com'
- }
- ],
- subject: 'It was the best sandcastle he had ever seen.',
- cc: [],
- bcc: [],
- message:
- 'Hello Hettie,
Marshmallow cookie jelly liquorice. Powder macaroon cake pastry biscuit. Cotton candy cotton candy jelly chocolate bar. Sesame snaps candy gummi bears cake cookie jujubes. Sweet I love sweet roll. Sesame snaps I love marzipan. Jelly powder tootsie roll. Marshmallow pudding cookie fruitcake liquorice powder. I love I love cookie chupa chups fruitcake ice cream I love biscuit I love. Tiramisu apple pie candy canes cookie gummies. Donut toffee bear claw topping jelly-o. Cupcake icing muffin. Cookie brownie wafer pie sweet. Icing sesame snaps halvah toffee marshmallow lemon drops jelly.
Tiramisu candy canes powder. Powder chocolate bar halvah liquorice cake I love danish. Cake wafer apple pie. Bear claw fruitcake I love marzipan dessert marzipan lollipop. Halvah gingerbread jelly chupa chups tiramisu I love wafer gummi bears. Candy powder caramels candy gummies. Tart tart cupcake brownie. Bear claw gummies toffee. Tiramisu donut cake chocolate bar. Halvah chocolate bar donut jelly-o. Icing candy brownie chocolate. Pastry bear claw halvah gummies chocolate bar chocolate. Apple pie danish wafer I love biscuit.
Regrads,
John Doe
',
- attachments: [],
- isStarred: false,
- labels: [],
- time: 'Mon Dec 15 2018 10:56:00 GMT+0000 (GMT)',
- replies: [],
- folder: 'inbox',
- isRead: false
- },
- {
- id: 106,
- from: {
- email: 'hettiem@mail.com',
- name: 'Hettie Mcerlean',
- avatar: '/images/avatars/1.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@mail.com'
- }
- ],
- subject: 'I’m a living furnace.',
- cc: [],
- bcc: [],
- message:
- 'Oat cake tart danish jelly beans brownie I love. Liquorice I love lollipop chocolate cake carrot cake toffee. Tart muffin candy canes croissant sugar plum lollipop. Macaroon cheesecake marshmallow powder sweet roll bonbon candy apple pie candy canes.
Regrads,
Hettie Mcerlean
',
- attachments: [],
- isStarred: false,
- labels: [],
- time: 'Mon Dec 16 2018 11:25:00 GMT+0000 (GMT)',
- replies: [],
- folder: 'inbox',
- isRead: false
- }
- ],
- folder: 'inbox',
- isRead: true
- },
- {
- id: 27,
- from: {
- email: 'pBuffay@email.com',
- name: 'Pheoebe Buffay',
- avatar: '/images/avatars/6.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@github.io'
- }
- ],
- subject: 'Personal Insurance',
- cc: [],
- bcc: [],
- message:
- 'Hey John,
Your personal insurance agent
If you have any problems with questions about your insurance, you can contact your personal agent.
Regards
Pheoebe Buffay
',
- attachments: [],
- isStarred: false,
- labels: ['personal'],
- time: new Date(new Date().getTime() - 1 * 30 * 60 * 1000),
- replies: [],
- folder: 'inbox',
- isRead: true
- },
- {
- id: 28,
- from: {
- email: 'gabramow2@elegantthemes.com',
- name: 'Gabriel Abramow',
- avatar: '/images/avatars/4.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@github.io'
- }
- ],
- subject: 'Forgot your password?',
- cc: [],
- bcc: [],
- message:
- 'Hey John,
There was a request to change your password!
If did not make this request, just ignore this email. Otherwise, please click the button below to change your password:
Regards
Gabriel Abramow
',
- attachments: [],
- isStarred: false,
- labels: ['company'],
- time: new Date(new Date().getTime() - 1 * 30 * 60 * 1000),
- replies: [],
- folder: 'inbox',
- isRead: true
- },
- {
- id: 29,
- from: {
- email: 'tolrenshaw3@twitpic.com',
- name: 'Temple Olrenshaw',
- avatar: '/images/avatars/5.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@github.io'
- }
- ],
- subject: 'April Fools Day Movies',
- cc: [],
- bcc: [],
- message:
- 'Hey John,
The Best Movies on April Fool’s Day
Finding any genuine April Fool’s moments in movies is kind of like trying to peek through a wheat field to find individual stalks, but at the very least there are a few movies that seem to have the spirit of April Fool’s Day down when it comes to their sense of humor.
So instead of finding individual scenes about the day in question it seems like more fun to go ahead and treat the reader to a few films that might be great to watch this coming Sunday when the day of fools is upon us.
Regards
Temple Olrenshaw
',
- attachments: [],
- isStarred: false,
- labels: ['company'],
- time: new Date(new Date().getTime() - 1 * 30 * 60 * 1000),
- replies: [
- {
- id: 107,
- from: {
- email: 'johndoe@mail.com',
- name: 'John Doe',
- avatar: '/images/avatars/1.png'
- },
- to: [
- {
- name: 'me',
- email: 'hettiem@mail.com'
- }
- ],
- subject: 'The underground bunker was filled with chips and candy.',
- cc: [],
- bcc: [],
- message:
- 'Hello Hettie,
Marshmallow cookie jelly liquorice. Powder macaroon cake pastry biscuit. Cotton candy cotton candy jelly chocolate bar. Sesame snaps candy gummi bears cake cookie jujubes. Sweet I love sweet roll. Sesame snaps I love marzipan. Jelly powder tootsie roll. Marshmallow pudding cookie fruitcake liquorice powder. I love I love cookie chupa chups fruitcake ice cream I love biscuit I love. Tiramisu apple pie candy canes cookie gummies. Donut toffee bear claw topping jelly-o. Cupcake icing muffin. Cookie brownie wafer pie sweet. Icing sesame snaps halvah toffee marshmallow lemon drops jelly.
Tiramisu candy canes powder. Powder chocolate bar halvah liquorice cake I love danish. Cake wafer apple pie. Bear claw fruitcake I love marzipan dessert marzipan lollipop. Halvah gingerbread jelly chupa chups tiramisu I love wafer gummi bears. Candy powder caramels candy gummies. Tart tart cupcake brownie. Bear claw gummies toffee. Tiramisu donut cake chocolate bar. Halvah chocolate bar donut jelly-o. Icing candy brownie chocolate. Pastry bear claw halvah gummies chocolate bar chocolate. Apple pie danish wafer I love biscuit.
Regrads,
John Doe
',
- attachments: [],
- isStarred: false,
- labels: [],
- time: 'Mon Jan 5 2019 10:56:00 GMT+0000 (GMT)',
- replies: [],
- folder: 'inbox',
- isRead: false
- },
- {
- id: 108,
- from: {
- email: 'hettiem@mail.com',
- name: 'Hettie Mcerlean',
- avatar: '/images/avatars/1.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@mail.com'
- }
- ],
- subject: 'The truth is that you pay for your lifestyle in hours.',
- cc: [],
- bcc: [],
- message:
- 'Oat cake tart danish jelly beans brownie I love. Liquorice I love lollipop chocolate cake carrot cake toffee. Tart muffin candy canes croissant sugar plum lollipop. Macaroon cheesecake marshmallow powder sweet roll bonbon candy apple pie candy canes.
Regrads,
Hettie Mcerlean
',
- attachments: [],
- isStarred: false,
- labels: [],
- time: 'Mon Jan 8 2019 11:25:00 GMT+0000 (GMT)',
- replies: [],
- folder: 'inbox',
- isRead: false
- }
- ],
- folder: 'inbox',
- isRead: true
- },
- {
- id: 30,
- from: {
- email: 'peterwill@mail.com',
- name: 'Peter Williamson',
- avatar: '/images/avatars/1.png'
- },
- to: [
- {
- name: 'me',
- email: 'johndoe@mail.com'
- }
- ],
- subject: 'Meeting with the client',
- cc: [],
- bcc: [],
- message:
- 'Hi John,
Biscuit lemon drops marshmallow. Cotton candy marshmallow bear claw. Dragée tiramisu cookie cotton candy. Carrot cake sweet roll I love macaroon wafer jelly soufflé I love dragée. Jujubes jelly I love carrot cake topping I love. Sweet candy I love chupa chups dragée. Tart I love gummies. Chocolate bar carrot cake candy wafer candy canes oat cake I love. Sesame snaps icing pudding sweet roll marshmallow. Cupcake brownie sweet roll chocolate bar I love gummies. Biscuit biscuit macaroon sesame snaps macaroon icing I love soufflé caramels. Apple pie candy jelly. I love icing gummi bears jelly-o pie muffin apple pie.
Marshmallow halvah brownie cake marzipan ice cream marshmallow. I love lollipop toffee croissant liquorice wafer muffin. Lollipop jelly beans caramels lollipop tootsie roll pudding pie macaroon tootsie roll. Oat cake jujubes gummies cake cake powder cupcake soufflé muffin. Chocolate caramels muffin tart. Jelly beans caramels dessert cotton candy liquorice chocolate cake. Chupa chups muffin bear claw I love. Biscuit jujubes soufflé tart caramels pie sugar plum. Croissant jelly beans cake. Ice cream chocolate liquorice dessert cookie chocolate cake. Powder tart sweet roll macaroon croissant. Sweet tootsie roll macaroon gummi bears macaroon. Gingerbread cake tart.
Regrads,
Kristeen Sicilia
',
- attachments: [],
- isStarred: true,
- labels: ['private'],
- time: 'Mon Dec 10 2018 07:46:00 GMT+0000 (GMT)',
- replies: [],
- folder: 'inbox',
- isRead: true
- }
- ]
-}
diff --git a/src/fake-db/apps/invoice.ts b/src/fake-db/apps/invoice.ts
deleted file mode 100644
index aa85378..0000000
--- a/src/fake-db/apps/invoice.ts
+++ /dev/null
@@ -1,826 +0,0 @@
-// Type Imports
-import type { InvoiceType } from '@/types/apps/invoiceTypes'
-
-const now = new Date()
-const currentMonth = now.toLocaleString('default', { month: 'short' })
-
-export const db: InvoiceType[] = [
- {
- id: '4987',
- issuedDate: `13 ${currentMonth} ${now.getFullYear()}`,
- address: '7777 Mendez Plains',
- company: 'Hall-Robbins PLC',
- companyEmail: 'don85@johnson.com',
- country: 'USA',
- contact: '(616) 865-4180',
- name: 'Jordan Stevenson',
- service: 'Software Development',
- total: 3428,
- avatar: '',
- avatarColor: 'primary',
- invoiceStatus: 'Paid',
- balance: '$724',
- dueDate: `23 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '4988',
- issuedDate: `17 ${currentMonth} ${now.getFullYear()}`,
- address: '04033 Wesley Wall Apt. 961',
- company: 'Mccann LLC and Sons',
- companyEmail: 'brenda49@taylor.info',
- country: 'Haiti',
- contact: '(226) 204-8287',
- name: 'Stephanie Burns',
- service: 'UI/UX Design & Development',
- total: 5219,
- avatar: '/images/avatars/1.png',
- invoiceStatus: 'Downloaded',
- balance: 0,
- dueDate: `15 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '4989',
- issuedDate: `19 ${currentMonth} ${now.getFullYear()}`,
- address: '5345 Robert Squares',
- company: 'Leonard-Garcia and Sons',
- companyEmail: 'smithtiffany@powers.com',
- country: 'Denmark',
- contact: '(955) 676-1076',
- name: 'Tony Herrera',
- service: 'Unlimited Extended License',
- total: 3719,
- avatar: '/images/avatars/2.png',
- invoiceStatus: 'Paid',
- balance: 0,
- dueDate: `03 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '4990',
- issuedDate: `06 ${currentMonth} ${now.getFullYear()}`,
- address: '19022 Clark Parks Suite 149',
- company: 'Smith, Miller and Henry LLC',
- companyEmail: 'mejiageorge@lee-perez.com',
- country: 'Cambodia',
- contact: '(832) 323-6914',
- name: 'Kevin Patton',
- service: 'Software Development',
- total: 4749,
- avatar: '/images/avatars/3.png',
- invoiceStatus: 'Sent',
- balance: 0,
- dueDate: `11 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '4991',
- issuedDate: `08 ${currentMonth} ${now.getFullYear()}`,
- address: '8534 Saunders Hill Apt. 583',
- company: 'Garcia-Cameron and Sons',
- companyEmail: 'brandon07@pierce.com',
- country: 'Martinique',
- contact: '(970) 982-3353',
- name: 'Mrs. Julie Donovan MD',
- service: 'UI/UX Design & Development',
- total: 4056,
- avatar: '/images/avatars/4.png',
- invoiceStatus: 'Draft',
- balance: '$815',
- dueDate: `30 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '4992',
- issuedDate: `26 ${currentMonth} ${now.getFullYear()}`,
- address: '661 Perez Run Apt. 778',
- company: 'Burnett-Young PLC',
- companyEmail: 'guerrerobrandy@beasley-harper.com',
- country: 'Botswana',
- contact: '(511) 938-9617',
- name: 'Amanda Phillips',
- service: 'UI/UX Design & Development',
- total: 2771,
- avatar: '',
- avatarColor: 'secondary',
- invoiceStatus: 'Paid',
- balance: 0,
- dueDate: `24 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '4993',
- issuedDate: `17 ${currentMonth} ${now.getFullYear()}`,
- address: '074 Long Union',
- company: 'Wilson-Lee LLC',
- companyEmail: 'williamshenry@moon-smith.com',
- country: 'Montserrat',
- contact: '(504) 859-2893',
- name: 'Christina Collier',
- service: 'UI/UX Design & Development',
- total: 2713,
- avatar: '',
- avatarColor: 'success',
- invoiceStatus: 'Draft',
- balance: '$407',
- dueDate: `22 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '4994',
- issuedDate: `11 ${currentMonth} ${now.getFullYear()}`,
- address: '5225 Ford Cape Apt. 840',
- company: 'Schwartz, Henry and Rhodes Group',
- companyEmail: 'margaretharvey@russell-murray.com',
- country: 'Oman',
- contact: '(758) 403-7718',
- name: 'David Flores',
- service: 'Template Customization',
- total: 4309,
- avatar: '/images/avatars/5.png',
- invoiceStatus: 'Paid',
- balance: '-$205',
- dueDate: `10 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '4995',
- issuedDate: `26 ${currentMonth} ${now.getFullYear()}`,
- address: '23717 James Club Suite 277',
- company: 'Henderson-Holder PLC',
- companyEmail: 'dianarodriguez@villegas.com',
- country: 'Cambodia',
- contact: '(292) 873-8254',
- name: 'Valerie Perez',
- service: 'Software Development',
- total: 3367,
- avatar: '/images/avatars/6.png',
- invoiceStatus: 'Downloaded',
- balance: 0,
- dueDate: `24 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '4996',
- issuedDate: `15 ${currentMonth} ${now.getFullYear()}`,
- address: '4528 Myers Gateway',
- company: 'Page-Wise PLC',
- companyEmail: 'bwilson@norris-brock.com',
- country: 'Guam',
- contact: '(956) 803-2008',
- name: 'Susan Dickerson',
- service: 'Software Development',
- total: 4776,
- avatar: '/images/avatars/7.png',
- invoiceStatus: 'Downloaded',
- balance: '$305',
- dueDate: `02 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '4997',
- issuedDate: `27 ${currentMonth} ${now.getFullYear()}`,
- address: '4234 Mills Club Suite 107',
- company: 'Turner PLC Inc',
- companyEmail: 'markcampbell@bell.info',
- country: 'United States Virgin Islands',
- contact: '(716) 962-8635',
- name: 'Kelly Smith',
- service: 'Unlimited Extended License',
- total: 3789,
- avatar: '/images/avatars/8.png',
- invoiceStatus: 'Partial Payment',
- balance: '$666',
- dueDate: `18 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '4998',
- issuedDate: `31 ${currentMonth} ${now.getFullYear()}`,
- address: '476 Keith Meadow',
- company: 'Levine-Dorsey PLC',
- companyEmail: 'mary61@rosario.com',
- country: 'Syrian Arab Republic',
- contact: '(523) 449-0782',
- name: 'Jamie Jones',
- service: 'Unlimited Extended License',
- total: 5200,
- avatar: '/images/avatars/1.png',
- invoiceStatus: 'Partial Payment',
- balance: 0,
- dueDate: `17 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '4999',
- issuedDate: `14 ${currentMonth} ${now.getFullYear()}`,
- address: '56381 Ashley Village Apt. 332',
- company: 'Hall, Thompson and Ramirez LLC',
- companyEmail: 'sean22@cook.com',
- country: 'Ukraine',
- contact: '(583) 470-8356',
- name: 'Ruben Garcia',
- service: 'Software Development',
- total: 4558,
- avatar: '/images/avatars/2.png',
- invoiceStatus: 'Paid',
- balance: 0,
- dueDate: `01 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5000',
- issuedDate: `21 ${currentMonth} ${now.getFullYear()}`,
- address: '6946 Gregory Plaza Apt. 310',
- company: 'Lambert-Thomas Group',
- companyEmail: 'mccoymatthew@lopez-jenkins.net',
- country: 'Vanuatu',
- contact: '(366) 906-6467',
- name: 'Ryan Meyer',
- service: 'Template Customization',
- total: 3503,
- avatar: '/images/avatars/3.png',
- invoiceStatus: 'Paid',
- balance: 0,
- dueDate: `22 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5001',
- issuedDate: `30 ${currentMonth} ${now.getFullYear()}`,
- address: '64351 Andrew Lights',
- company: 'Gregory-Haynes PLC',
- companyEmail: 'novakshannon@mccarty-murillo.com',
- country: 'Romania',
- contact: '(320) 616-3915',
- name: 'Valerie Valdez',
- service: 'Unlimited Extended License',
- total: 5285,
- avatar: '/images/avatars/4.png',
- invoiceStatus: 'Partial Payment',
- balance: '-$202',
- dueDate: `02 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5002',
- issuedDate: `21 ${currentMonth} ${now.getFullYear()}`,
- address: '5702 Sarah Heights',
- company: 'Wright-Schmidt LLC',
- companyEmail: 'smithrachel@davis-rose.net',
- country: 'Costa Rica',
- contact: '(435) 899-1963',
- name: 'Melissa Wheeler',
- service: 'UI/UX Design & Development',
- total: 3668,
- avatar: '/images/avatars/5.png',
- invoiceStatus: 'Downloaded',
- balance: '$731',
- dueDate: `15 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5003',
- issuedDate: `30 ${currentMonth} ${now.getFullYear()}`,
- address: '668 Robert Flats',
- company: 'Russell-Abbott Ltd',
- companyEmail: 'scott96@mejia.net',
- country: 'Congo',
- contact: '(254) 399-4728',
- name: 'Alan Jimenez',
- service: 'Unlimited Extended License',
- total: 4372,
- avatar: '',
- avatarColor: 'warning',
- invoiceStatus: 'Sent',
- balance: '-$344',
- dueDate: `17 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5004',
- issuedDate: `27 ${currentMonth} ${now.getFullYear()}`,
- address: '55642 Chang Extensions Suite 373',
- company: 'Williams LLC Inc',
- companyEmail: 'cramirez@ross-bass.biz',
- country: 'Saint Pierre and Miquelon',
- contact: '(648) 500-4338',
- name: 'Jennifer Morris',
- service: 'Template Customization',
- total: 3198,
- avatar: '/images/avatars/6.png',
- invoiceStatus: 'Partial Payment',
- balance: '-$253',
- dueDate: `16 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5005',
- issuedDate: `30 ${currentMonth} ${now.getFullYear()}`,
- address: '56694 Eric Orchard',
- company: 'Hudson, Bell and Phillips PLC',
- companyEmail: 'arielberg@wolfe-smith.com',
- country: 'Uruguay',
- contact: '(896) 544-3796',
- name: 'Timothy Stevenson',
- service: 'Unlimited Extended License',
- total: 5293,
- avatar: '',
- avatarColor: 'error',
- invoiceStatus: 'Past Due',
- balance: 0,
- dueDate: `01 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5006',
- issuedDate: `10 ${currentMonth} ${now.getFullYear()}`,
- address: '3727 Emma Island Suite 879',
- company: 'Berry, Gonzalez and Heath Inc',
- companyEmail: 'yrobinson@nichols.com',
- country: 'Israel',
- contact: '(236) 784-5142',
- name: 'Erik Hayden',
- service: 'Template Customization',
- total: 5612,
- avatar: '/images/avatars/7.png',
- invoiceStatus: 'Downloaded',
- balance: '$883',
- dueDate: `12 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5007',
- issuedDate: `01 ${currentMonth} ${now.getFullYear()}`,
- address: '953 Miller Common Suite 580',
- company: 'Martinez, Fuller and Chavez and Sons',
- companyEmail: 'tatejennifer@allen.net',
- country: 'Cook Islands',
- contact: '(436) 717-2419',
- name: 'Katherine Kennedy',
- service: 'Software Development',
- total: 2230,
- avatar: '/images/avatars/8.png',
- invoiceStatus: 'Sent',
- balance: 0,
- dueDate: `19 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5008',
- issuedDate: `22 ${currentMonth} ${now.getFullYear()}`,
- address: '808 Sullivan Street Apt. 135',
- company: 'Wilson and Sons LLC',
- companyEmail: 'gdurham@lee.com',
- country: 'Nepal',
- contact: '(489) 946-3041',
- name: 'Monica Fuller',
- service: 'Unlimited Extended License',
- total: 2032,
- avatar: '/images/avatars/1.png',
- invoiceStatus: 'Partial Payment',
- balance: 0,
- dueDate: `30 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5009',
- issuedDate: `30 ${currentMonth} ${now.getFullYear()}`,
- address: '25135 Christopher Creek',
- company: 'Hawkins, Johnston and Mcguire PLC',
- companyEmail: 'jenny96@lawrence-thompson.com',
- country: 'Kiribati',
- contact: '(274) 246-3725',
- name: 'Stacey Carter',
- service: 'UI/UX Design & Development',
- total: 3128,
- avatar: '/images/avatars/2.png',
- invoiceStatus: 'Paid',
- balance: 0,
- dueDate: `10 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5010',
- issuedDate: `06 ${currentMonth} ${now.getFullYear()}`,
- address: '81285 Rebecca Estates Suite 046',
- company: 'Huynh-Mills and Sons',
- companyEmail: 'jgutierrez@jackson.com',
- country: 'Swaziland',
- contact: '(258) 211-5970',
- name: 'Chad Davis',
- service: 'Software Development',
- total: 2060,
- avatar: '/images/avatars/3.png',
- invoiceStatus: 'Downloaded',
- balance: 0,
- dueDate: `08 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5011',
- issuedDate: `01 ${currentMonth} ${now.getFullYear()}`,
- address: '3102 Briggs Dale Suite 118',
- company: 'Jones-Cooley and Sons',
- companyEmail: 'hunter14@jones.com',
- country: 'Congo',
- contact: '(593) 965-4100',
- name: 'Chris Reyes',
- service: 'UI/UX Design & Development',
- total: 4077,
- avatar: '',
- avatarColor: 'info',
- invoiceStatus: 'Draft',
- balance: 0,
- dueDate: `01 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5012',
- issuedDate: `30 ${currentMonth} ${now.getFullYear()}`,
- address: '811 Jill Skyway',
- company: 'Jones PLC Ltd',
- companyEmail: 'pricetodd@johnson-jenkins.com',
- country: 'Brazil',
- contact: '(585) 829-2603',
- name: 'Laurie Summers',
- service: 'Template Customization',
- total: 2872,
- avatar: '/images/avatars/4.png',
- invoiceStatus: 'Partial Payment',
- balance: 0,
- dueDate: `18 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5013',
- issuedDate: `05 ${currentMonth} ${now.getFullYear()}`,
- address: '2223 Brandon Inlet Suite 597',
- company: 'Jordan, Gomez and Ross Group',
- companyEmail: 'perrydavid@chapman-rogers.com',
- country: 'Congo',
- contact: '(527) 351-5517',
- name: 'Lindsay Wilson',
- service: 'Software Development',
- total: 3740,
- avatar: '/images/avatars/5.png',
- invoiceStatus: 'Draft',
- balance: 0,
- dueDate: `01 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5014',
- issuedDate: `01 ${currentMonth} ${now.getFullYear()}`,
- address: '08724 Barry Causeway',
- company: 'Gonzalez, Moody and Glover LLC',
- companyEmail: 'leahgriffin@carpenter.com',
- country: 'Equatorial Guinea',
- contact: '(628) 903-0132',
- name: 'Jenna Castro',
- service: 'Unlimited Extended License',
- total: 3623,
- avatar: '',
- avatarColor: 'primary',
- invoiceStatus: 'Downloaded',
- balance: 0,
- dueDate: `23 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5015',
- issuedDate: `16 ${currentMonth} ${now.getFullYear()}`,
- address: '073 Holt Ramp Apt. 755',
- company: 'Ashley-Pacheco Ltd',
- companyEmail: 'esparzadaniel@allen.com',
- country: 'Seychelles',
- contact: '(847) 396-9904',
- name: 'Wendy Weber',
- service: 'Software Development',
- total: 2477,
- avatar: '/images/avatars/6.png',
- invoiceStatus: 'Draft',
- balance: 0,
- dueDate: `01 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5016',
- issuedDate: `24 ${currentMonth} ${now.getFullYear()}`,
- address: '984 Sherry Trail Apt. 953',
- company: 'Berry PLC Group',
- companyEmail: 'todd34@owens-morgan.com',
- country: 'Ireland',
- contact: '(852) 249-4539',
- name: 'April Yates',
- service: 'Unlimited Extended License',
- total: 3904,
- avatar: '',
- avatarColor: 'secondary',
- invoiceStatus: 'Paid',
- balance: '$951',
- dueDate: `30 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5017',
- issuedDate: `24 ${currentMonth} ${now.getFullYear()}`,
- address: '093 Jonathan Camp Suite 953',
- company: 'Allen Group Ltd',
- companyEmail: 'roydavid@bailey.com',
- country: 'Netherlands',
- contact: '(917) 984-2232',
- name: 'Daniel Marshall PhD',
- service: 'UI/UX Design & Development',
- total: 3102,
- avatar: '/images/avatars/7.png',
- invoiceStatus: 'Partial Payment',
- balance: '-$153',
- dueDate: `25 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5018',
- issuedDate: `29 ${currentMonth} ${now.getFullYear()}`,
- address: '4735 Kristie Islands Apt. 259',
- company: 'Chapman-Schneider LLC',
- companyEmail: 'baldwinjoel@washington.com',
- country: 'Cocos (Keeling) Islands',
- contact: '(670) 409-3703',
- name: 'Randy Rich',
- service: 'UI/UX Design & Development',
- total: 2483,
- avatar: '/images/avatars/8.png',
- invoiceStatus: 'Draft',
- balance: 0,
- dueDate: `10 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5019',
- issuedDate: `07 ${currentMonth} ${now.getFullYear()}`,
- address: '92218 Andrew Radial',
- company: 'Mcclure, Hernandez and Simon Ltd',
- companyEmail: 'psmith@morris.info',
- country: 'Macao',
- contact: '(646) 263-0257',
- name: 'Mrs. Jodi Chapman',
- service: 'Unlimited Extended License',
- total: 2825,
- avatar: '/images/avatars/1.png',
- invoiceStatus: 'Partial Payment',
- balance: '-$459',
- dueDate: `14 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5020',
- issuedDate: `10 ${currentMonth} ${now.getFullYear()}`,
- address: '2342 Michelle Valley',
- company: 'Hamilton PLC and Sons',
- companyEmail: 'lori06@morse.com',
- country: 'Somalia',
- contact: '(751) 213-4288',
- name: 'Steven Myers',
- service: 'Unlimited Extended License',
- total: 2029,
- avatar: '/images/avatars/2.png',
- invoiceStatus: 'Past Due',
- balance: 0,
- dueDate: `28 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5021',
- issuedDate: `02 ${currentMonth} ${now.getFullYear()}`,
- address: '16039 Brittany Terrace Apt. 128',
- company: 'Silva-Reeves LLC',
- companyEmail: 'zpearson@miller.com',
- country: 'Slovakia (Slovak Republic)',
- contact: '(655) 649-7872',
- name: 'Charles Alexander',
- service: 'Software Development',
- total: 3208,
- avatar: '',
- avatarColor: 'success',
- invoiceStatus: 'Sent',
- balance: 0,
- dueDate: `06 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5022',
- issuedDate: `02 ${currentMonth} ${now.getFullYear()}`,
- address: '37856 Olsen Lakes Apt. 852',
- company: 'Solis LLC Ltd',
- companyEmail: 'strongpenny@young.net',
- country: 'Brazil',
- contact: '(402) 935-0735',
- name: 'Elizabeth Jones',
- service: 'Software Development',
- total: 3077,
- avatar: '',
- avatarColor: 'error',
- invoiceStatus: 'Sent',
- balance: 0,
- dueDate: `09 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5023',
- issuedDate: `23 ${currentMonth} ${now.getFullYear()}`,
- address: '11489 Griffin Plaza Apt. 927',
- company: 'Munoz-Peters and Sons',
- companyEmail: 'carrietorres@acosta.com',
- country: 'Argentina',
- contact: '(915) 448-6271',
- name: 'Heidi Walton',
- service: 'Software Development',
- total: 5578,
- avatar: '/images/avatars/3.png',
- invoiceStatus: 'Draft',
- balance: 0,
- dueDate: `23 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5024',
- issuedDate: `28 ${currentMonth} ${now.getFullYear()}`,
- address: '276 Michael Gardens Apt. 004',
- company: 'Shea, Velez and Garcia LLC',
- companyEmail: 'zjohnson@nichols-powers.com',
- country: 'Philippines',
- contact: '(817) 700-2984',
- name: 'Christopher Allen',
- service: 'Software Development',
- total: 2787,
- avatar: '/images/avatars/4.png',
- invoiceStatus: 'Partial Payment',
- balance: 0,
- dueDate: `25 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5025',
- issuedDate: `21 ${currentMonth} ${now.getFullYear()}`,
- address: '633 Bell Well Apt. 057',
- company: 'Adams, Simmons and Brown Group',
- companyEmail: 'kayla09@thomas.com',
- country: 'Martinique',
- contact: '(266) 611-9482',
- name: 'Joseph Oliver',
- service: 'UI/UX Design & Development',
- total: 5591,
- avatar: '',
- avatarColor: 'warning',
- invoiceStatus: 'Downloaded',
- balance: 0,
- dueDate: `07 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5026',
- issuedDate: `24 ${currentMonth} ${now.getFullYear()}`,
- address: '1068 Lopez Fall',
- company: 'Williams-Lawrence and Sons',
- companyEmail: 'melvindavis@allen.info',
- country: 'Mexico',
- contact: '(739) 745-9728',
- name: 'Megan Roberts',
- service: 'Template Customization',
- total: 2783,
- avatar: '/images/avatars/5.png',
- invoiceStatus: 'Draft',
- balance: 0,
- dueDate: `22 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5027',
- issuedDate: `13 ${currentMonth} ${now.getFullYear()}`,
- address: '86691 Mackenzie Light Suite 568',
- company: 'Deleon Inc LLC',
- companyEmail: 'gjordan@fernandez-coleman.com',
- country: 'Costa Rica',
- contact: '(682) 804-6506',
- name: 'Mary Garcia',
- service: 'Template Customization',
- total: 2719,
- avatar: '',
- avatarColor: 'info',
- invoiceStatus: 'Sent',
- balance: 0,
- dueDate: `04 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5028',
- issuedDate: `18 ${currentMonth} ${now.getFullYear()}`,
- address: '86580 Sarah Bridge',
- company: 'Farmer, Johnson and Anderson Group',
- companyEmail: 'robertscott@garcia.com',
- country: 'Cameroon',
- contact: '(775) 366-0411',
- name: 'Crystal Mays',
- service: 'Template Customization',
- total: 3325,
- avatar: '',
- avatarColor: 'primary',
- invoiceStatus: 'Paid',
- balance: '$361',
- dueDate: `02 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5029',
- issuedDate: `29 ${currentMonth} ${now.getFullYear()}`,
- address: '49709 Edwin Ports Apt. 353',
- company: 'Sherman-Johnson PLC',
- companyEmail: 'desiree61@kelly.com',
- country: 'Macedonia',
- contact: '(510) 536-6029',
- name: 'Nicholas Tanner',
- service: 'Template Customization',
- total: 3851,
- avatar: '',
- avatarColor: 'secondary',
- invoiceStatus: 'Paid',
- balance: 0,
- dueDate: `25 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5030',
- issuedDate: `07 ${currentMonth} ${now.getFullYear()}`,
- address: '3856 Mathis Squares Apt. 584',
- company: 'Byrd LLC PLC',
- companyEmail: 'jeffrey25@martinez-hodge.com',
- country: 'Congo',
- contact: '(253) 230-4657',
- name: 'Mr. Justin Richardson',
- service: 'Template Customization',
- total: 5565,
- avatar: '',
- avatarColor: 'success',
- invoiceStatus: 'Draft',
- balance: 0,
- dueDate: `06 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5031',
- issuedDate: `21 ${currentMonth} ${now.getFullYear()}`,
- address: '141 Adrian Ridge Suite 550',
- company: 'Stone-Zimmerman Group',
- companyEmail: 'john77@anderson.net',
- country: 'Falkland Islands (Malvinas)',
- contact: '(612) 546-3485',
- name: 'Jennifer Summers',
- service: 'Template Customization',
- total: 3313,
- avatar: '/images/avatars/6.png',
- invoiceStatus: 'Partial Payment',
- balance: 0,
- dueDate: `09 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5032',
- issuedDate: `31 ${currentMonth} ${now.getFullYear()}`,
- address: '01871 Kristy Square',
- company: 'Yang, Hansen and Hart PLC',
- companyEmail: 'ywagner@jones.com',
- country: 'Germany',
- contact: '(203) 601-8603',
- name: 'Richard Payne',
- service: 'Template Customization',
- total: 5181,
- avatar: '',
- avatarColor: 'error',
- invoiceStatus: 'Past Due',
- balance: 0,
- dueDate: `22 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5033',
- issuedDate: `12 ${currentMonth} ${now.getFullYear()}`,
- address: '075 Smith Views',
- company: 'Jenkins-Rosales Inc',
- companyEmail: 'calvin07@joseph-edwards.org',
- country: 'Colombia',
- contact: '(895) 401-4255',
- name: 'Lori Wells',
- service: 'Template Customization',
- total: 2869,
- avatar: '/images/avatars/7.png',
- invoiceStatus: 'Partial Payment',
- balance: 0,
- dueDate: `22 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5034',
- issuedDate: `10 ${currentMonth} ${now.getFullYear()}`,
- address: '2577 Pearson Overpass Apt. 314',
- company: 'Mason-Reed PLC',
- companyEmail: 'eric47@george-castillo.com',
- country: 'Paraguay',
- contact: '(602) 336-9806',
- name: 'Tammy Sanchez',
- service: 'Unlimited Extended License',
- total: 4836,
- avatar: '',
- avatarColor: 'warning',
- invoiceStatus: 'Paid',
- balance: 0,
- dueDate: `22 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5035',
- issuedDate: `20 ${currentMonth} ${now.getFullYear()}`,
- address: '1770 Sandra Mountains Suite 636',
- company: 'Foster-Pham PLC',
- companyEmail: 'jamesjoel@chapman.net',
- country: 'Western Sahara',
- contact: '(936) 550-1638',
- name: 'Dana Carey',
- service: 'UI/UX Design & Development',
- total: 4263,
- avatar: '',
- avatarColor: 'info',
- invoiceStatus: 'Draft',
- balance: '$762',
- dueDate: `12 ${currentMonth} ${now.getFullYear()}`
- },
- {
- id: '5036',
- issuedDate: `19 ${currentMonth} ${now.getFullYear()}`,
- address: '78083 Laura Pines',
- company: 'Richardson and Sons LLC',
- companyEmail: 'pwillis@cross.org',
- country: 'Bhutan',
- contact: '(687) 660-2473',
- name: 'Andrew Burns',
- service: 'Unlimited Extended License',
- total: 3171,
- avatar: '/images/avatars/8.png',
- invoiceStatus: 'Paid',
- balance: '-$205',
- dueDate: `25 ${currentMonth} ${now.getFullYear()}`
- }
-]
diff --git a/src/fake-db/apps/kanban.ts b/src/fake-db/apps/kanban.ts
deleted file mode 100644
index 0bdad4f..0000000
--- a/src/fake-db/apps/kanban.ts
+++ /dev/null
@@ -1,97 +0,0 @@
-import type { KanbanType } from '@/types/apps/kanbanTypes'
-
-export const db: KanbanType = {
- columns: [
- {
- id: 1,
- title: 'In Progress',
- taskIds: [1, 2]
- },
- {
- id: 2,
- title: 'In Review',
- taskIds: [3, 4]
- },
- {
- id: 3,
- title: 'Done',
- taskIds: [5, 6]
- }
- ],
- tasks: [
- {
- id: 1,
- title: 'Research FAQ page UX',
- badgeText: ['UX'],
- attachments: 4,
- comments: 12,
- assigned: [
- { src: '/images/avatars/1.png', name: 'John Doe' },
- { src: '/images/avatars/2.png', name: 'Jane Smith' },
- { src: '/images/avatars/3.png', name: 'Robert Johnson' }
- ],
- dueDate: new Date(new Date().getFullYear(), 11, 30)
- },
- {
- id: 2,
- title: 'Review Javascript code',
- badgeText: ['Code Review'],
- attachments: 2,
- comments: 8,
- assigned: [
- { src: '/images/avatars/4.png', name: 'Emily Davis' },
- { src: '/images/avatars/5.png', name: ' Tom Smith' }
- ],
- dueDate: new Date(new Date().getFullYear(), 5, 30)
- },
- {
- id: 3,
- title: 'Review completed Apps',
- badgeText: ['Dashboard'],
- attachments: 8,
- comments: 17,
- assigned: [
- { src: '/images/avatars/6.png', name: 'David Smith' },
- { src: '/images/avatars/2.png', name: 'Jane Smith' }
- ],
- dueDate: new Date(new Date().getFullYear(), 8, 15)
- },
- {
- id: 4,
- title: 'Find new images for pages',
- badgeText: ['Images'],
- attachments: 10,
- comments: 18,
- assigned: [
- { src: '/images/avatars/6.png', name: 'David Smit' },
- { src: '/images/avatars/1.png', name: 'John Doe' },
- { src: '/images/avatars/5.png', name: 'Tom Smith' },
- { src: '/images/avatars/4.png', name: 'Emily Davis' }
- ],
- image: '/images/apps/kanban/plant.png',
- dueDate: new Date(new Date().getFullYear(), 9, 20)
- },
- {
- id: 5,
- title: 'Forms & tables section',
- badgeText: ['App'],
- attachments: 5,
- comments: 14,
- assigned: [
- { src: '/images/avatars/3.png', name: 'Robert Johnson' },
- { src: '/images/avatars/2.png', name: 'Jane Smith' },
- { src: '/images/avatars/1.png', name: 'John Doe' }
- ],
- dueDate: new Date(new Date().getFullYear(), 10, 10)
- },
- {
- id: 6,
- title: 'Complete charts & maps',
- badgeText: ['Charts & Map'],
- attachments: 6,
- comments: 21,
- assigned: [{ src: '/images/avatars/1.png', name: 'John Doe' }],
- dueDate: new Date(new Date().getFullYear(), 11, 5)
- }
- ]
-}
diff --git a/src/fake-db/apps/logistics.ts b/src/fake-db/apps/logistics.ts
deleted file mode 100644
index 9fb2808..0000000
--- a/src/fake-db/apps/logistics.ts
+++ /dev/null
@@ -1,256 +0,0 @@
-import type { logisticsType } from '@/types/apps/logisticsTypes'
-
-export const db: logisticsType = {
- vehicles: [
- {
- id: 1,
- location: 468031,
- startCity: 'Cagnes-sur-Mer',
- startCountry: 'France',
- endCity: 'Catania',
- endCountry: 'Italy',
- warnings: 'No Warnings',
- progress: 49
- },
- {
- id: 2,
- location: 302781,
- startCity: 'Köln',
- startCountry: 'Germany',
- endCity: 'Laspezia',
- endCountry: 'Italy',
- warnings: 'Ecu Not Responding',
- progress: 24
- },
- {
- id: 3,
- location: 715822,
- startCity: 'Chambray-lès-Tours',
- startCountry: 'France',
- endCity: 'Hamm',
- endCountry: 'Germany',
- warnings: 'Oil Leakage',
- progress: 7
- },
- {
- id: 4,
- location: 451430,
- startCity: 'Berlin',
- startCountry: 'Germany',
- endCity: 'Gelsenkirchen',
- endCountry: 'Germany',
- warnings: 'No Warnings',
- progress: 95
- },
- {
- id: 5,
- location: 921577,
- startCity: 'Cergy-Pontoise',
- startCountry: 'France',
- endCity: 'Berlin',
- endCountry: 'Germany',
- warnings: 'No Warnings',
- progress: 65
- },
- {
- id: 6,
- location: 480957,
- startCity: 'Villefranche-sur-Saône',
- startCountry: 'France',
- endCity: 'Halle',
- endCountry: 'Germany',
- warnings: 'Ecu Not Responding',
- progress: 55
- },
- {
- id: 7,
- location: 330178,
- startCity: 'Mâcon',
- startCountry: 'France',
- endCity: 'Bochum',
- endCountry: 'Germany',
- warnings: 'Fuel Problems',
- progress: 74
- },
- {
- id: 8,
- location: 595525,
- startCity: 'Fullerton',
- startCountry: 'USA',
- endCity: 'Lübeck',
- endCountry: 'Germany',
- warnings: 'No Warnings',
- progress: 100
- },
- {
- id: 9,
- location: 182964,
- startCity: 'Saintes',
- startCountry: 'France',
- endCity: 'Roma',
- endCountry: 'Italy',
- warnings: 'Oil Leakage',
- progress: 82
- },
- {
- id: 10,
- location: 706085,
- startCity: 'Fort Wayne',
- startCountry: 'USA',
- endCity: 'Mülheim an der Ruhr',
- endCountry: 'Germany',
- warnings: 'Oil Leakage',
- progress: 49
- },
- {
- id: 11,
- location: 523708,
- startCity: 'Albany',
- startCountry: 'USA',
- endCity: 'Wuppertal',
- endCountry: 'Germany',
- warnings: 'Temperature Not Optimal',
- progress: 66
- },
- {
- id: 12,
- location: 676485,
- startCity: 'Toledo',
- startCountry: 'USA',
- endCity: 'Magdeburg',
- endCountry: 'Germany',
- warnings: 'Temperature Not Optimal',
- progress: 7
- },
- {
- id: 13,
- location: 514437,
- startCity: 'Houston',
- startCountry: 'USA',
- endCity: 'Wiesbaden',
- endCountry: 'Germany',
- warnings: 'Fuel Problems',
- progress: 27
- },
- {
- id: 14,
- location: 300198,
- startCity: 'West Palm Beach',
- startCountry: 'USA',
- endCity: 'Dresden',
- endCountry: 'Germany',
- warnings: 'Temperature Not Optimal',
- progress: 90
- },
- {
- id: 15,
- location: 960090,
- startCity: 'Fort Lauderdale',
- startCountry: 'USA',
- endCity: 'Kiel',
- endCountry: 'Germany',
- warnings: 'No Warnings',
- progress: 81
- },
- {
- id: 16,
- location: 878423,
- startCity: 'Schaumburg',
- startCountry: 'USA',
- endCity: 'Berlin',
- endCountry: 'Germany',
- warnings: 'Fuel Problems',
- progress: 21
- },
- {
- id: 17,
- location: 318119,
- startCity: 'Mundolsheim',
- startCountry: 'France',
- endCity: 'München',
- endCountry: 'Germany',
- warnings: 'No Warnings',
- progress: 26
- },
- {
- id: 18,
- location: 742500,
- startCity: 'Fargo',
- startCountry: 'USA',
- endCity: 'Salerno',
- endCountry: 'Italy',
- warnings: 'Temperature Not Optimal',
- progress: 80
- },
- {
- id: 19,
- location: 469399,
- startCity: 'München',
- startCountry: 'Germany',
- endCity: 'Ath',
- endCountry: 'Belgium',
- warnings: 'Ecu Not Responding',
- progress: 50
- },
- {
- id: 20,
- location: 411175,
- startCity: 'Chicago',
- startCountry: 'USA',
- endCity: 'Neuss',
- endCountry: 'Germany',
- warnings: 'Oil Leakage',
- progress: 44
- },
- {
- id: 21,
- location: 753525,
- startCity: 'Limoges',
- startCountry: 'France',
- endCity: 'Messina',
- endCountry: 'Italy',
- warnings: 'Temperature Not Optimal',
- progress: 55
- },
- {
- id: 22,
- location: 882341,
- startCity: 'Cesson-Sévigné',
- startCountry: 'France',
- endCity: 'Napoli',
- endCountry: 'Italy',
- warnings: 'No Warnings',
- progress: 48
- },
- {
- id: 23,
- location: 408270,
- startCity: 'Leipzig',
- startCountry: 'Germany',
- endCity: 'Tournai',
- endCountry: 'Belgium',
- warnings: 'Ecu Not Responding',
- progress: 73
- },
- {
- id: 24,
- location: 276904,
- startCity: 'Aulnay-sous-Bois',
- startCountry: 'France',
- endCity: 'Torino',
- endCountry: 'Italy',
- warnings: 'Fuel Problems',
- progress: 30
- },
- {
- id: 25,
- location: 159145,
- startCity: 'Paris 19',
- startCountry: 'France',
- endCity: 'Dresden',
- endCountry: 'Germany',
- warnings: 'No Warnings',
- progress: 60
- }
- ]
-}
diff --git a/src/fake-db/apps/permissions.ts b/src/fake-db/apps/permissions.ts
deleted file mode 100644
index 7036bdd..0000000
--- a/src/fake-db/apps/permissions.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-// Type Imports
-import type { PermissionRowType } from '@/types/apps/permissionTypes'
-
-export const db: PermissionRowType[] = [
- {
- id: 1,
- name: 'Management',
- assignedTo: 'administrator',
- createdDate: '14 Apr 2021, 8:43 PM'
- },
- {
- id: 2,
- assignedTo: 'administrator',
- name: 'Manage Billing & Roles',
- createdDate: '16 Sep 2021, 5:20 PM'
- },
- {
- id: 3,
- name: 'Add & Remove Users',
- createdDate: '14 Oct 2021, 10:20 AM',
- assignedTo: ['administrator', 'manager']
- },
- {
- id: 4,
- name: 'Project Planning',
- createdDate: '14 Oct 2021, 10:20 AM',
- assignedTo: ['administrator', 'users', 'support']
- },
- {
- id: 5,
- name: 'Manage Email Sequences',
- createdDate: '23 Aug 2021, 2:00 PM',
- assignedTo: ['administrator', 'users', 'support']
- },
- {
- id: 6,
- name: 'Client Communication',
- createdDate: '15 Apr 2021, 11:30 AM',
- assignedTo: ['administrator', 'manager']
- },
- {
- id: 7,
- name: 'Only View',
- createdDate: '04 Dec 2021, 8:15 PM',
- assignedTo: ['administrator', 'restricted-user']
- },
- {
- id: 8,
- name: 'Financial Management',
- createdDate: '25 Feb 2021, 10:30 AM',
- assignedTo: ['administrator', 'manager']
- },
- {
- id: 9,
- name: 'Manage Others’ Tasks',
- createdDate: '04 Nov 2021, 11:45 AM',
- assignedTo: ['administrator', 'support']
- }
-]
diff --git a/src/fake-db/apps/userList.ts b/src/fake-db/apps/userList.ts
deleted file mode 100644
index 2e43eb5..0000000
--- a/src/fake-db/apps/userList.ts
+++ /dev/null
@@ -1,723 +0,0 @@
-// Type Imports
-import type { UsersType } from '@/types/apps/userTypes'
-
-export const db: UsersType[] = [
- {
- id: 1,
- fullName: 'Galen Slixby',
- company: 'Yotz PVT LTD',
- role: 'editor',
- username: 'gslixby0',
- country: 'El Salvador',
- contact: '(479) 232-9151',
- email: 'gslixby0@abc.net.au',
- currentPlan: 'enterprise',
- status: 'inactive',
- avatar: '',
- avatarColor: 'primary',
- billing: 'Auto Debit'
- },
- {
- id: 2,
- fullName: 'Halsey Redmore',
- company: 'Skinder PVT LTD',
- role: 'author',
- username: 'hredmore1',
- country: 'Albania',
- contact: '(472) 607-9137',
- email: 'hredmore1@imgur.com',
- currentPlan: 'team',
- status: 'pending',
- avatar: '/images/avatars/3.png',
- billing: 'Auto Debit'
- },
- {
- id: 3,
- fullName: 'Marjory Sicely',
- company: 'Oozz PVT LTD',
- role: 'maintainer',
- username: 'msicely2',
- country: 'Russia',
- contact: '(321) 264-4599',
- email: 'msicely2@who.int',
- currentPlan: 'enterprise',
- status: 'active',
- avatar: '/images/avatars/1.png',
- billing: 'Auto Debit'
- },
- {
- id: 4,
- fullName: 'Cyrill Risby',
- company: 'Oozz PVT LTD',
- role: 'maintainer',
- username: 'crisby3',
- country: 'China',
- contact: '(923) 690-6806',
- email: 'crisby3@wordpress.com',
- currentPlan: 'team',
- status: 'inactive',
- avatar: '/images/avatars/3.png',
- billing: 'Manual Paypal'
- },
- {
- id: 5,
- fullName: 'Maggy Hurran',
- company: 'Aimbo PVT LTD',
- role: 'subscriber',
- username: 'mhurran4',
- country: 'Pakistan',
- contact: '(669) 914-1078',
- email: 'mhurran4@yahoo.co.jp',
- currentPlan: 'enterprise',
- status: 'pending',
- avatar: '/images/avatars/1.png',
- billing: 'Manual Cash'
- },
- {
- id: 6,
- fullName: 'Silvain Halstead',
- company: 'Jaxbean PVT LTD',
- role: 'author',
- username: 'shalstead5',
- country: 'China',
- contact: '(958) 973-3093',
- email: 'shalstead5@shinystat.com',
- currentPlan: 'company',
- status: 'active',
- avatar: '',
- avatarColor: 'error',
- billing: 'Manual Cash'
- },
- {
- id: 7,
- fullName: 'Breena Gallemore',
- company: 'Jazzy PVT LTD',
- role: 'subscriber',
- username: 'bgallemore6',
- country: 'Canada',
- contact: '(825) 977-8152',
- email: 'bgallemore6@boston.com',
- currentPlan: 'company',
- status: 'pending',
- avatar: '',
- avatarColor: 'warning',
- billing: 'Auto Debit'
- },
- {
- id: 8,
- fullName: 'Kathryne Liger',
- company: 'Pixoboo PVT LTD',
- role: 'author',
- username: 'kliger7',
- country: 'France',
- contact: '(187) 440-0934',
- email: 'kliger7@vinaora.com',
- currentPlan: 'enterprise',
- status: 'pending',
- avatar: '/images/avatars/4.png',
- billing: 'Manual Paypal'
- },
- {
- id: 9,
- fullName: 'Franz Scotfurth',
- company: 'Tekfly PVT LTD',
- role: 'subscriber',
- username: 'fscotfurth8',
- country: 'China',
- contact: '(978) 146-5443',
- email: 'fscotfurth8@dailymotion.com',
- currentPlan: 'team',
- status: 'pending',
- avatar: '/images/avatars/2.png',
- billing: 'Auto Debit'
- },
- {
- id: 10,
- fullName: 'Jillene Bellany',
- company: 'Gigashots PVT LTD',
- role: 'maintainer',
- username: 'jbellany9',
- country: 'Jamaica',
- contact: '(589) 284-6732',
- email: 'jbellany9@kickstarter.com',
- currentPlan: 'company',
- status: 'inactive',
- avatar: '/images/avatars/5.png',
- billing: 'Manual Cash'
- },
- {
- id: 11,
- fullName: 'Jonah Wharlton',
- company: 'Eare PVT LTD',
- role: 'subscriber',
- username: 'jwharltona',
- country: 'United States',
- contact: '(176) 532-6824',
- email: 'jwharltona@oakley.com',
- currentPlan: 'team',
- status: 'inactive',
- avatar: '/images/avatars/4.png',
- billing: 'Auto Debit'
- },
- {
- id: 12,
- fullName: 'Seth Hallam',
- company: 'Yakitri PVT LTD',
- role: 'subscriber',
- username: 'shallamb',
- country: 'Peru',
- contact: '(234) 464-0600',
- email: 'shallamb@hugedomains.com',
- currentPlan: 'team',
- status: 'pending',
- avatar: '/images/avatars/5.png',
- billing: 'Manual Paypal'
- },
- {
- id: 13,
- fullName: 'Yoko Pottie',
- company: 'Leenti PVT LTD',
- role: 'subscriber',
- username: 'ypottiec',
- country: 'Philippines',
- contact: '(907) 284-5083',
- email: 'ypottiec@privacy.gov.au',
- currentPlan: 'basic',
- status: 'inactive',
- avatar: '/images/avatars/7.png',
- billing: 'Manual Paypal'
- },
- {
- id: 14,
- fullName: 'Maximilianus Krause',
- company: 'Digitube PVT LTD',
- role: 'author',
- username: 'mkraused',
- country: 'Democratic Republic of the Congo',
- contact: '(167) 135-7392',
- email: 'mkraused@stanford.edu',
- currentPlan: 'team',
- status: 'active',
- avatar: '/images/avatars/6.png',
- billing: 'Auto Debit'
- },
- {
- id: 15,
- fullName: 'Zsazsa McCleverty',
- company: 'Kaymbo PVT LTD',
- role: 'maintainer',
- username: 'zmcclevertye',
- country: 'France',
- contact: '(317) 409-6565',
- email: 'zmcclevertye@soundcloud.com',
- currentPlan: 'enterprise',
- status: 'active',
- avatar: '/images/avatars/2.png',
- billing: 'Auto Debit'
- },
- {
- id: 16,
- fullName: 'Bentlee Emblin',
- company: 'Yambee PVT LTD',
- role: 'author',
- username: 'bemblinf',
- country: 'Spain',
- contact: '(590) 606-1056',
- email: 'bemblinf@wired.com',
- currentPlan: 'company',
- status: 'active',
- avatar: '/images/avatars/6.png',
- billing: 'Manual Cash'
- },
- {
- id: 17,
- fullName: 'Brockie Myles',
- company: 'Wikivu PVT LTD',
- role: 'maintainer',
- username: 'bmylesg',
- country: 'Poland',
- contact: '(553) 225-9905',
- email: 'bmylesg@amazon.com',
- currentPlan: 'basic',
- status: 'active',
- avatar: '',
- avatarColor: 'success',
- billing: 'Auto Debit'
- },
- {
- id: 18,
- fullName: 'Bertha Biner',
- company: 'Twinte PVT LTD',
- role: 'editor',
- username: 'bbinerh',
- country: 'Yemen',
- contact: '(901) 916-9287',
- email: 'bbinerh@mozilla.com',
- currentPlan: 'team',
- status: 'active',
- avatar: '/images/avatars/7.png',
- billing: 'Manual Cash'
- },
- {
- id: 19,
- fullName: 'Travus Bruntjen',
- company: 'Cogidoo PVT LTD',
- role: 'admin',
- username: 'tbruntjeni',
- country: 'France',
- contact: '(524) 586-6057',
- email: 'tbruntjeni@sitemeter.com',
- currentPlan: 'enterprise',
- status: 'active',
- avatar: '',
- avatarColor: 'primary',
- billing: 'Manual Cash'
- },
- {
- id: 20,
- fullName: 'Wesley Burland',
- company: 'Bubblemix PVT LTD',
- role: 'editor',
- username: 'wburlandj',
- country: 'Honduras',
- contact: '(569) 683-1292',
- email: 'wburlandj@uiuc.edu',
- currentPlan: 'team',
- status: 'inactive',
- avatar: '/images/avatars/6.png',
- billing: 'Manual paypal'
- },
- {
- id: 21,
- fullName: 'Selina Kyle',
- company: 'Wayne Enterprises',
- role: 'admin',
- username: 'catwomen1940',
- country: 'USA',
- contact: '(829) 537-0057',
- email: 'irena.dubrovna@wayne.com',
- currentPlan: 'team',
- status: 'active',
- avatar: '/images/avatars/1.png',
- billing: 'Manual paypal'
- },
- {
- id: 22,
- fullName: 'Jameson Lyster',
- company: 'Quaxo PVT LTD',
- role: 'editor',
- username: 'jlysterl',
- country: 'Ukraine',
- contact: '(593) 624-0222',
- email: 'jlysterl@guardian.co.uk',
- currentPlan: 'company',
- status: 'inactive',
- avatar: '/images/avatars/8.png',
- billing: 'Auto Debit'
- },
- {
- id: 23,
- fullName: 'Kare Skitterel',
- company: 'Ainyx PVT LTD',
- role: 'maintainer',
- username: 'kskitterelm',
- country: 'Poland',
- contact: '(254) 845-4107',
- email: 'kskitterelm@ainyx.com',
- currentPlan: 'basic',
- status: 'pending',
- avatar: '/images/avatars/3.png',
- billing: 'Manual Cash'
- },
- {
- id: 24,
- fullName: 'Cleavland Hatherleigh',
- company: 'Flipopia PVT LTD',
- role: 'admin',
- username: 'chatherleighn',
- country: 'Brazil',
- contact: '(700) 783-7498',
- email: 'chatherleighn@washington.edu',
- currentPlan: 'team',
- status: 'pending',
- avatar: '/images/avatars/2.png',
- billing: 'Auto Debit'
- },
- {
- id: 25,
- fullName: 'Adeline Micco',
- company: 'Topicware PVT LTD',
- role: 'admin',
- username: 'amiccoo',
- country: 'France',
- contact: '(227) 598-1841',
- email: 'amiccoo@whitehouse.gov',
- currentPlan: 'enterprise',
- status: 'pending',
- avatar: '',
- avatarColor: 'error',
- billing: 'Manual Cash'
- },
- {
- id: 26,
- fullName: 'Hugh Hasson',
- company: 'Skinix PVT LTD',
- role: 'admin',
- username: 'hhassonp',
- country: 'China',
- contact: '(582) 516-1324',
- email: 'hhassonp@bizjournals.com',
- currentPlan: 'basic',
- status: 'inactive',
- avatar: '/images/avatars/4.png',
- billing: 'Manual Paypal'
- },
- {
- id: 27,
- fullName: 'Germain Jacombs',
- company: 'Youopia PVT LTD',
- role: 'editor',
- username: 'gjacombsq',
- country: 'Zambia',
- contact: '(137) 467-5393',
- email: 'gjacombsq@jigsy.com',
- currentPlan: 'enterprise',
- status: 'active',
- avatar: '/images/avatars/5.png',
- billing: 'Auto Debit'
- },
- {
- id: 28,
- fullName: 'Bree Kilday',
- company: 'Jetpulse PVT LTD',
- role: 'maintainer',
- username: 'bkildayr',
- country: 'Portugal',
- contact: '(412) 476-0854',
- email: 'bkildayr@mashable.com',
- currentPlan: 'team',
- status: 'active',
- avatar: '',
- avatarColor: 'warning',
- billing: 'Manual Cash'
- },
- {
- id: 29,
- fullName: 'Candice Pinyon',
- company: 'Kare PVT LTD',
- role: 'maintainer',
- username: 'cpinyons',
- country: 'Sweden',
- contact: '(170) 683-1520',
- email: 'cpinyons@behance.net',
- currentPlan: 'team',
- status: 'active',
- avatar: '/images/avatars/7.png',
- billing: 'Auto Debit'
- },
- {
- id: 30,
- fullName: 'Isabel Mallindine',
- company: 'Voomm PVT LTD',
- role: 'subscriber',
- username: 'imallindinet',
- country: 'Slovenia',
- contact: '(332) 803-1983',
- email: 'imallindinet@shinystat.com',
- currentPlan: 'team',
- status: 'pending',
- avatar: '',
- avatarColor: 'info',
- billing: 'Manual Cash'
- },
- {
- id: 31,
- fullName: 'Gwendolyn Meineken',
- company: 'Oyondu PVT LTD',
- role: 'admin',
- username: 'gmeinekenu',
- country: 'Moldova',
- contact: '(551) 379-7460',
- email: 'gmeinekenu@hc360.com',
- currentPlan: 'basic',
- status: 'pending',
- avatar: '/images/avatars/1.png',
- billing: 'Auto Debit'
- },
- {
- id: 32,
- fullName: 'Rafaellle Snowball',
- company: 'Fivespan PVT LTD',
- role: 'editor',
- username: 'rsnowballv',
- country: 'Philippines',
- contact: '(974) 829-0911',
- email: 'rsnowballv@indiegogo.com',
- currentPlan: 'basic',
- status: 'pending',
- avatar: '/images/avatars/5.png',
- billing: 'Manual Cash'
- },
- {
- id: 33,
- fullName: 'Rochette Emer',
- company: 'Thoughtworks PVT LTD',
- role: 'admin',
- username: 'remerw',
- country: 'North Korea',
- contact: '(841) 889-3339',
- email: 'remerw@blogtalkradio.com',
- currentPlan: 'basic',
- status: 'active',
- avatar: '/images/avatars/8.png',
- billing: 'Manual Cash'
- },
- {
- id: 34,
- fullName: 'Ophelie Fibbens',
- company: 'Jaxbean PVT LTD',
- role: 'subscriber',
- username: 'ofibbensx',
- country: 'Indonesia',
- contact: '(764) 885-7351',
- email: 'ofibbensx@booking.com',
- currentPlan: 'company',
- status: 'active',
- avatar: '/images/avatars/4.png',
- billing: 'Manual Cash'
- },
- {
- id: 35,
- fullName: 'Stephen MacGilfoyle',
- company: 'Browseblab PVT LTD',
- role: 'maintainer',
- username: 'smacgilfoyley',
- country: 'Japan',
- contact: '(350) 589-8520',
- email: 'smacgilfoyley@bigcartel.com',
- currentPlan: 'company',
- status: 'pending',
- avatar: '',
- avatarColor: 'error',
- billing: 'Auto Debit'
- },
- {
- id: 36,
- fullName: 'Bradan Rosebotham',
- company: 'Agivu PVT LTD',
- role: 'subscriber',
- username: 'brosebothamz',
- country: 'Belarus',
- contact: '(882) 933-2180',
- email: 'brosebothamz@tripadvisor.com',
- currentPlan: 'team',
- status: 'inactive',
- avatar: '',
- avatarColor: 'success',
- billing: 'Auto Debit'
- },
- {
- id: 37,
- fullName: 'Skip Hebblethwaite',
- company: 'Katz PVT LTD',
- role: 'admin',
- username: 'shebblethwaite10',
- country: 'Canada',
- contact: '(610) 343-1024',
- email: 'shebblethwaite10@arizona.edu',
- currentPlan: 'company',
- status: 'inactive',
- avatar: '/images/avatars/1.png',
- billing: 'Manual Paypal'
- },
- {
- id: 38,
- fullName: 'Moritz Piccard',
- company: 'Twitternation PVT LTD',
- role: 'maintainer',
- username: 'mpiccard11',
- country: 'Croatia',
- contact: '(365) 277-2986',
- email: 'mpiccard11@vimeo.com',
- currentPlan: 'enterprise',
- status: 'inactive',
- avatar: '/images/avatars/1.png',
- billing: 'Manual Paypal'
- },
- {
- id: 39,
- fullName: 'Tyne Widmore',
- company: 'Yombu PVT LTD',
- role: 'subscriber',
- username: 'twidmore12',
- country: 'Finland',
- contact: '(531) 731-0928',
- email: 'twidmore12@bravesites.com',
- currentPlan: 'team',
- status: 'pending',
- avatar: '',
- avatarColor: 'primary',
- billing: 'Manual Paypal'
- },
- {
- id: 40,
- fullName: 'Florenza Desporte',
- company: 'Kamba PVT LTD',
- role: 'author',
- username: 'fdesporte13',
- country: 'Ukraine',
- contact: '(312) 104-2638',
- email: 'fdesporte13@omniture.com',
- currentPlan: 'company',
- status: 'active',
- avatar: '/images/avatars/6.png',
- billing: 'Auto Debit'
- },
- {
- id: 41,
- fullName: 'Edwina Baldetti',
- company: 'Dazzlesphere PVT LTD',
- role: 'maintainer',
- username: 'ebaldetti14',
- country: 'Haiti',
- contact: '(315) 329-3578',
- email: 'ebaldetti14@theguardian.com',
- currentPlan: 'team',
- status: 'pending',
- avatar: '',
- avatarColor: 'info',
- billing: 'Auto Debit'
- },
- {
- id: 42,
- fullName: 'Benedetto Rossiter',
- company: 'Mybuzz PVT LTD',
- role: 'editor',
- username: 'brossiter15',
- country: 'Indonesia',
- contact: '(323) 175-6741',
- email: 'brossiter15@craigslist.org',
- currentPlan: 'team',
- status: 'inactive',
- avatar: '',
- avatarColor: 'warning',
- billing: 'Auto Debit'
- },
- {
- id: 43,
- fullName: 'Micaela McNirlan',
- company: 'Tambee PVT LTD',
- role: 'admin',
- username: 'mmcnirlan16',
- country: 'Indonesia',
- contact: '(242) 952-0916',
- email: 'mmcnirlan16@hc360.com',
- currentPlan: 'basic',
- status: 'inactive',
- avatar: '',
- avatarColor: 'error',
- billing: 'Manual Cash'
- },
- {
- id: 44,
- fullName: 'Vladamir Koschek',
- company: 'Centimia PVT LTD',
- role: 'author',
- username: 'vkoschek17',
- country: 'Guatemala',
- contact: '(531) 758-8335',
- email: 'vkoschek17@abc.net.au',
- currentPlan: 'team',
- status: 'active',
- avatar: '',
- avatarColor: 'success',
- billing: 'Manual Cash'
- },
- {
- id: 45,
- fullName: 'Corrie Perot',
- company: 'Flipopia PVT LTD',
- role: 'subscriber',
- username: 'cperot18',
- country: 'China',
- contact: '(659) 385-6808',
- email: 'cperot18@goo.ne.jp',
- currentPlan: 'team',
- status: 'pending',
- avatar: '/images/avatars/3.png',
- billing: 'Manual Cash'
- },
- {
- id: 46,
- fullName: 'Saunder Offner',
- company: 'Skalith PVT LTD',
- role: 'maintainer',
- username: 'soffner19',
- country: 'Poland',
- contact: '(200) 586-2264',
- email: 'soffner19@mac.com',
- currentPlan: 'enterprise',
- status: 'pending',
- avatar: '',
- avatarColor: 'primary',
- billing: 'Manual Paypal'
- },
- {
- id: 47,
- fullName: 'Karena Courtliff',
- company: 'Feedfire PVT LTD',
- role: 'admin',
- username: 'kcourtliff1a',
- country: 'China',
- contact: '(478) 199-0020',
- email: 'kcourtliff1a@bbc.co.uk',
- currentPlan: 'basic',
- status: 'active',
- avatar: '/images/avatars/1.png',
- billing: 'Auto Debit'
- },
- {
- id: 48,
- fullName: 'Onfre Wind',
- company: 'Thoughtmix PVT LTD',
- role: 'admin',
- username: 'owind1b',
- country: 'Ukraine',
- contact: '(344) 262-7270',
- email: 'owind1b@yandex.ru',
- currentPlan: 'basic',
- status: 'pending',
- avatar: '',
- avatarColor: 'error',
- billing: 'Auto Debit'
- },
- {
- id: 49,
- fullName: 'Paulie Durber',
- company: 'Babbleblab PVT LTD',
- role: 'subscriber',
- username: 'pdurber1c',
- country: 'Sweden',
- contact: '(694) 676-1275',
- email: 'pdurber1c@gov.uk',
- currentPlan: 'team',
- status: 'inactive',
- avatar: '',
- avatarColor: 'warning',
- billing: 'Manual Cash'
- },
- {
- id: 50,
- fullName: 'Beverlie Krabbe',
- company: 'Kaymbo PVT LTD',
- role: 'editor',
- username: 'bkrabbe1d',
- country: 'China',
- contact: '(397) 294-5153',
- email: 'bkrabbe1d@home.pl',
- currentPlan: 'company',
- status: 'active',
- avatar: '/images/avatars/2.png',
- billing: 'Auto Debit'
- }
-]
diff --git a/src/fake-db/pages/faq.ts b/src/fake-db/pages/faq.ts
deleted file mode 100644
index 17e69aa..0000000
--- a/src/fake-db/pages/faq.ts
+++ /dev/null
@@ -1,153 +0,0 @@
-// Type Imports
-import type { FaqType } from '@/types/pages/faqTypes'
-
-export const db: FaqType[] = [
- {
- id: 'payment',
- title: 'Payment',
- icon: 'tabler-credit-card',
- subtitle: 'Get help with payment',
- questionsAnswers: [
- {
- id: 'order-payment',
- question: 'When is payment taken for my order?',
- answer:
- 'Payment is taken during the checkout process when you pay for your order. The order number that appears on the confirmation screen indicates payment has been successfully processed.'
- },
- {
- id: 'order',
- question: 'How do I pay for my order?',
- answer:
- 'We accept Visa®, MasterCard®, American Express®, and PayPal®. Our servers encrypt all information submitted to them, so you can be confident that your credit card information will be kept safe and secure.'
- },
- {
- id: 'placing-order',
- question: "What should I do if I'm having trouble placing an order?",
- answer:
- 'For any technical difficulties you are experiencing with our website, please contact us at our support portal, or you can call us toll-free at 1-000-000-000, or email us at order@companymail.com'
- },
- {
- id: 'users-license',
- question: 'Which license do I need for an end product that is only accessible to paying users?',
- answer:
- 'If you have paying users or you are developing any SaaS products then you need an Extended License. For each products, you need a license. You can get free lifetime updates as well.'
- },
- {
- id: 'subscription-review',
- question: 'Does my subscription automatically renew?',
- answer:
- 'No, This is not subscription based item.Pastry pudding cookie toffee bonbon jujubes jujubes powder topping. Jelly beans gummi bears sweet roll bonbon muffin liquorice. Wafer lollipop sesame snaps.'
- }
- ]
- },
-
- // delivery
- {
- id: 'delivery',
- title: 'Delivery',
- icon: 'tabler-briefcase',
- subtitle: 'Get help with delivery',
- questionsAnswers: [
- {
- id: 'ship-order',
- question: 'How would you ship my order?',
- answer:
- 'For large products, we deliver your product via a third party logistics company offering you the “room of choice” scheduled delivery service. For small products, we offer free parcel delivery.'
- },
- {
- id: 'delivery-cost',
- question: 'What is the delivery cost of my order?',
- answer:
- 'The cost of scheduled delivery is $69 or $99 per order, depending on the destination postal code. The parcel delivery is free.'
- },
- {
- id: 'product-damaged',
- question: 'What to do if my product arrives damaged?',
- answer:
- 'We will promptly replace any product that is damaged in transit. Just contact our support team, to notify us of the situation within 48 hours of product arrival.'
- }
- ]
- },
-
- // cancellation and return
- {
- icon: 'tabler-refresh',
- id: 'cancellation-return',
- title: 'Cancellation & Return',
- subtitle: 'Get help with cancellation & return',
- questionsAnswers: [
- {
- id: 'cancel-order',
- question: 'Can I cancel my order?',
- answer:
- 'Scheduled delivery orders can be cancelled 72 hours prior to your selected delivery date for full refund. Parcel delivery orders cannot be cancelled, however a free return label can be provided upon request.'
- },
- {
- id: 'product-return',
- question: 'Can I return my product?',
- answer:
- 'You can return your product within 15 days of delivery, by contacting our support team, All merchandise returned must be in the original packaging with all original items.'
- },
- {
- id: 'return-status',
- question: 'Where can I view status of return?',
- answer: 'Locate the item from Your Orders. Select Return/Refund status'
- }
- ]
- },
-
- // my orders
- {
- id: 'my-orders',
- title: 'My Orders',
- icon: 'tabler-box',
- subtitle: 'Order details',
- questionsAnswers: [
- {
- id: 'order-success',
- question: 'Has my order been successful?',
- answer:
- 'All successful order transactions will receive an order confirmation email once the order has been processed. If you have not received your order confirmation email within 24 hours, check your junk email or spam folder. Alternatively, log in to your account to check your order summary. If you do not have a account, you can contact our Customer Care Team on 1-000-000-000.'
- },
- {
- id: 'promo-code',
- question: 'My Promotion Code is not working, what can I do?',
- answer: 'If you are having issues with a promotion code, please contact us at 1 000 000 000 for assistance.'
- },
- {
- id: 'track-orders',
- question: 'How do I track my Orders?',
- answer:
- 'If you have an account just sign into your account from here and select “My Orders”. If you have a a guest account track your order from here using the order number and the email address.'
- }
- ]
- },
-
- // product and services
- {
- icon: 'tabler-settings',
- id: 'product-services',
- title: 'Product & Services',
- subtitle: 'Get help with product & services',
- questionsAnswers: [
- {
- id: 'shipping-notification',
- question: 'Will I be notified once my order has shipped?',
- answer:
- 'Yes, We will send you an email once your order has been shipped. This email will contain tracking and order information.'
- },
- {
- id: 'warranty-notification',
- question: 'Where can I find warranty information?',
- answer:
- 'We are committed to quality products. For information on warranty period and warranty services, visit our Warranty section here.'
- },
- {
- id: 'warranty-coverage',
- question: 'How can I purchase additional warranty coverage?',
- answer:
- 'For the peace of your mind, we offer extended warranty plans that add additional year(s) of protection to the standard manufacturer’s warranty provided by us. To purchase or find out more about the extended warranty program, visit Extended Warranty section here.'
- }
- ]
- }
-]
diff --git a/src/fake-db/pages/pricing.ts b/src/fake-db/pages/pricing.ts
deleted file mode 100644
index 3be7f0e..0000000
--- a/src/fake-db/pages/pricing.ts
+++ /dev/null
@@ -1,65 +0,0 @@
-// Type Imports
-import type { PricingPlanType } from '@/types/pages/pricingTypes'
-
-export const db: PricingPlanType[] = [
- {
- title: 'Basic',
- monthlyPrice: 0,
- currentPlan: true,
- popularPlan: false,
- subtitle: 'A simple start for everyone',
- imgSrc: '/images/illustrations/objects/pricing-basic.png',
- imgHeight: 120,
- yearlyPlan: {
- monthly: 0,
- annually: 0
- },
- planBenefits: [
- '100 responses a month',
- 'Unlimited forms and surveys',
- 'Unlimited fields',
- 'Basic form creation tools',
- 'Up to 2 subdomains'
- ]
- },
- {
- monthlyPrice: 49,
- title: 'Standard',
- popularPlan: true,
- currentPlan: false,
- subtitle: 'For small to medium businesses',
- imgSrc: '/images/illustrations/objects/pricing-standard.png',
- imgHeight: 120,
- yearlyPlan: {
- monthly: 40,
- annually: 480
- },
- planBenefits: [
- 'Unlimited responses',
- 'Unlimited forms and surveys',
- 'Instagram profile page',
- 'Google Docs integration',
- 'Custom “Thank you” page'
- ]
- },
- {
- monthlyPrice: 99,
- popularPlan: false,
- currentPlan: false,
- title: 'Enterprise',
- subtitle: 'Solution for big organizations',
- imgSrc: '/images/illustrations/objects/pricing-enterprise.png',
- imgHeight: 120,
- yearlyPlan: {
- monthly: 80,
- annually: 960
- },
- planBenefits: [
- 'PayPal payments',
- 'Logic Jumps',
- 'File upload with 5GB storage',
- 'Custom domain support',
- 'Stripe integration'
- ]
- }
-]
diff --git a/src/fake-db/pages/userProfile.ts b/src/fake-db/pages/userProfile.ts
deleted file mode 100644
index 5fc8397..0000000
--- a/src/fake-db/pages/userProfile.ts
+++ /dev/null
@@ -1,688 +0,0 @@
-// Type Imports
-import type { ProfileHeaderType, DataType } from '@/types/pages/profileTypes'
-
-type DB = {
- users: DataType
- profileHeader: ProfileHeaderType
-}
-
-export const db: DB = {
- users: {
- profile: {
- about: [
- { property: 'Full Name', value: 'John Doe', icon: 'tabler-user' },
- { property: 'Status', value: 'active', icon: 'tabler-check' },
- { property: 'Role', value: 'Developer', icon: 'tabler-crown' },
- { property: 'Country', value: 'USA', icon: 'tabler-flag' },
- { property: 'Language', value: 'English', icon: 'tabler-language' }
- ],
- contacts: [
- { property: 'Contact', value: '(123) 456-7890', icon: 'tabler-phone-call' },
- { property: 'Skype', value: 'john.doe', icon: 'tabler-messages' },
- { property: 'Email', value: 'john.doe@example.com', icon: 'tabler-mail' }
- ],
- teams: [
- { property: 'Backend Developer', value: '(126 Members)' },
- { property: 'React Developer', value: '(98 Members)' }
- ],
- overview: [
- { property: 'Task Compiled', value: '13.5k', icon: 'tabler-check' },
- { property: 'Connections', value: '897', icon: 'tabler-users' },
- { property: 'Projects Compiled', value: '146', icon: 'tabler-layout-grid' }
- ],
- connections: [
- {
- isFriend: true,
- connections: '45',
- name: 'Cecilia Payne',
- avatar: '/images/avatars/2.png'
- },
- {
- isFriend: false,
- connections: '1.32k',
- name: 'Curtis Fletcher',
- avatar: '/images/avatars/3.png'
- },
- {
- isFriend: false,
- connections: '125',
- name: 'Alice Stone',
- avatar: '/images/avatars/4.png'
- },
- {
- isFriend: true,
- connections: '456',
- name: 'Darrell Barnes',
- avatar: '/images/avatars/5.png'
- },
- {
- isFriend: true,
- connections: '1.2k',
- name: 'Eugenia Moore',
- avatar: '/images/avatars/8.png'
- }
- ],
- teamsTech: [
- {
- members: 72,
- ChipColor: 'error',
- chipText: 'Developer',
- title: 'React Developers',
- avatar: '/images/logos/react-bg.png'
- },
- {
- members: 122,
- chipText: 'Support',
- ChipColor: 'primary',
- title: 'Support Team',
- avatar: '/images/icons/support-bg.png'
- },
- {
- members: 7,
- ChipColor: 'info',
- chipText: 'Designer',
- title: 'UI Designer',
- avatar: '/images/logos/figma-bg.png'
- },
- {
- members: 289,
- ChipColor: 'error',
- chipText: 'Developer',
- title: 'Vue.js Developers',
- avatar: '/images/logos/vue-bg.png'
- },
- {
- members: 24,
- chipText: 'Marketing',
- ChipColor: 'secondary',
- title: 'Digital Marketing',
- avatar: '/images/logos/twitter-bg.png'
- }
- ],
- projectTable: [
- {
- id: 1,
- title: 'BGC eCommerce App',
- subtitle: 'React Project',
- leader: 'Eileen',
- avatar: '/images/logos/react-bg.png',
- avatarGroup: [
- '/images/avatars/1.png',
- '/images/avatars/2.png',
- '/images/avatars/3.png',
- '/images/avatars/4.png'
- ],
- status: 78
- },
- {
- id: 2,
- leader: 'Owen',
- title: 'Falcon Logo Design',
- subtitle: 'Figma Project',
- avatar: '/images/logos/figma-bg.png',
- avatarGroup: ['/images/avatars/5.png', '/images/avatars/6.png'],
- status: 18
- },
- {
- id: 3,
- title: 'Dashboard Design',
- subtitle: 'VueJs Project',
- leader: 'Keith',
- avatar: '/images/logos/vue-bg.png',
- avatarGroup: [
- '/images/avatars/7.png',
- '/images/avatars/8.png',
- '/images/avatars/1.png',
- '/images/avatars/2.png'
- ],
- status: 62
- },
- {
- id: 4,
- title: 'Foodista Mobile App',
- subtitle: 'Xamarin Project',
- leader: 'Merline',
- avatar: '/images/icons/mobile-bg.png',
- avatarGroup: [
- '/images/avatars/3.png',
- '/images/avatars/4.png',
- '/images/avatars/5.png',
- '/images/avatars/6.png'
- ],
- status: 8
- },
- {
- id: 5,
- leader: 'Harmonia',
- title: 'Dojo React Project',
- subtitle: 'Python Project',
- avatar: '/images/logos/python-bg.png',
- avatarGroup: ['/images/avatars/7.png', '/images/avatars/8.png', '/images/avatars/1.png'],
- status: 36
- },
- {
- id: 6,
- leader: 'Allyson',
- title: 'Blockchain Website',
- subtitle: 'Sketch Project',
- avatar: '/images/logos/sketch-bg.png',
- avatarGroup: [
- '/images/avatars/2.png',
- '/images/avatars/3.png',
- '/images/avatars/4.png',
- '/images/avatars/5.png'
- ],
- status: 92
- },
- {
- id: 7,
- title: 'Hoffman Website',
- subtitle: 'HTML Project',
- leader: 'Georgie',
- avatar: '/images/logos/html-bg.png',
- avatarGroup: [
- '/images/avatars/6.png',
- '/images/avatars/7.png',
- '/images/avatars/8.png',
- '/images/avatars/1.png'
- ],
- status: 88
- },
- {
- id: 8,
- title: 'eCommerce Website',
- subtitle: 'React Project',
- leader: 'Eileen',
- avatar: '/images/logos/react-bg.png',
- avatarGroup: [
- '/images/avatars/1.png',
- '/images/avatars/2.png',
- '/images/avatars/3.png',
- '/images/avatars/4.png'
- ],
- status: 78
- },
- {
- id: 9,
- leader: 'Owen',
- title: 'Retro Logo Design',
- subtitle: 'Figma Project',
- avatar: '/images/logos/figma-bg.png',
- avatarGroup: ['/images/avatars/5.png', '/images/avatars/6.png'],
- status: 18
- },
- {
- id: 10,
- title: 'Admin Dashboard',
- subtitle: 'VueJs Project',
- leader: 'Keith',
- avatar: '/images/logos/vue-bg.png',
- avatarGroup: [
- '/images/avatars/7.png',
- '/images/avatars/8.png',
- '/images/avatars/1.png',
- '/images/avatars/2.png'
- ],
- status: 62
- }
- ]
- },
- teams: [
- {
- extraMembers: 9,
- title: 'React Developers',
- avatar: '/images/logos/react-bg.png',
- avatarGroup: [
- { avatar: '/images/avatars/1.png', name: 'Vinnie Mostowy' },
- { avatar: '/images/avatars/2.png', name: 'Allen Rieske' },
- { avatar: '/images/avatars/3.png', name: 'Julee Rossignol' }
- ],
- description:
- 'We don’t make assumptions about the rest of your technology stack, so you can develop new features.',
- chips: [
- {
- title: 'React',
- color: 'primary'
- },
- {
- title: 'MUI',
- color: 'info'
- }
- ]
- },
- {
- extraMembers: 4,
- title: 'Vue.js Dev Team',
- avatar: '/images/logos/vue-bg.png',
- avatarGroup: [
- { avatar: '/images/avatars/5.png', name: "Kaith D'souza" },
- { avatar: '/images/avatars/6.png', name: 'John Doe' },
- { avatar: '/images/avatars/7.png', name: 'Alan Walker' }
- ],
- description:
- 'The development of Vue and its ecosystem is guided by an international team, some of whom have chosen.',
- chips: [
- {
- title: 'Vuejs',
- color: 'success'
- },
- {
- color: 'error',
- title: 'Developer'
- }
- ]
- },
- {
- title: 'Creative Designers',
- avatar: '/images/logos/xd-bg.png',
- avatarGroup: [
- { avatar: '/images/avatars/1.png', name: 'Jimmy Ressula' },
- { avatar: '/images/avatars/2.png', name: 'Kristi Lawker' },
- { avatar: '/images/avatars/3.png', name: 'Danny Paul' }
- ],
- description:
- 'A design or product team is more than just the people on it. A team includes the people, the roles they play.',
- chips: [
- {
- title: 'Sketch',
- color: 'warning'
- },
- {
- title: 'XD',
- color: 'error'
- }
- ]
- },
- {
- title: 'Support Team',
- avatar: '/images/icons/support-bg.png',
- avatarGroup: [
- { avatar: '/images/avatars/5.png', name: 'Andrew Tye' },
- { avatar: '/images/avatars/6.png', name: 'Rishi Swaat' },
- { avatar: '/images/avatars/7.png', name: 'Rossie Kim' }
- ],
- description:
- 'Support your team. Your customer support team is fielding the good, the bad, and the ugly on daily basis.',
- chips: [
- {
- title: 'Zendesk',
- color: 'info'
- }
- ]
- },
- {
- extraMembers: 7,
- title: 'Digital Marketing',
- avatar: '/images/icons/social-bg.png',
- avatarGroup: [
- { avatar: '/images/avatars/1.png', name: 'Kim Merchent' },
- { avatar: '/images/avatars/2.png', name: "Sam D'souza" },
- { avatar: '/images/avatars/3.png', name: 'Nurvi Karlos' }
- ],
- description:
- 'Digital marketing refers to advertising delivered through digital channels such as search engines, websites…',
- chips: [
- {
- title: 'Twitter',
- color: 'primary'
- },
- {
- color: 'success',
- title: 'Email'
- }
- ]
- },
- {
- extraMembers: 2,
- title: 'Event',
- avatar: '/images/logos/event-bg.png',
- avatarGroup: [
- { avatar: '/images/avatars/5.png', name: 'Vinnie Mostowy' },
- { avatar: '/images/avatars/6.png', name: 'Allen Rieske' },
- { avatar: '/images/avatars/7.png', name: 'Julee Rossignol' }
- ],
- description:
- 'Event is defined as a particular contest which is part of a program of contests. An example of an event is the long…',
- chips: [
- {
- title: 'Hubilo',
- color: 'success'
- }
- ]
- },
- {
- title: 'Figma Resources',
- avatar: '/images/logos/figma-bg.png',
- avatarGroup: [
- { avatar: '/images/avatars/1.png', name: 'Andrew Mostowy' },
- { avatar: '/images/avatars/2.png', name: 'Micky Ressula' },
- { avatar: '/images/avatars/3.png', name: 'Michel Pal' }
- ],
- description:
- 'Explore, install, use, and remix thousands of plugins and files published to the Figma Community by designers.',
- chips: [
- {
- title: 'UI/UX',
- color: 'success'
- },
- {
- title: 'Figma',
- color: 'warning'
- }
- ]
- },
- {
- extraMembers: 8,
- title: 'Only Beginners',
- avatar: '/images/logos/html-bg.png',
- avatarGroup: [
- { avatar: '/images/avatars/5.png', name: 'Kim Karlos' },
- { avatar: '/images/avatars/6.png', name: 'Katy Turner' },
- { avatar: '/images/avatars/7.png', name: 'Peter Adward' }
- ],
- description:
- 'Learn the basics of how websites work, front-end vs back-end. Learn basic HTML, CSS, and JavaScript.',
- chips: [
- {
- title: 'CSS',
- color: 'info'
- },
- {
- title: 'HTML',
- color: 'primary'
- }
- ]
- },
- {
- title: 'Python Developers',
- avatar: '/images/logos/python-bg.png',
- avatarGroup: [
- { avatar: '/images/avatars/5.png', name: 'Kim Karlos' },
- { avatar: '/images/avatars/6.png', name: 'Katy Turner' },
- { avatar: '/images/avatars/7.png', name: 'Peter Adward' }
- ],
- description:
- "Harness Python's versatility for web development, data analysis & system automation for cutting-edge solutions.",
- chips: [
- {
- title: 'Python',
- color: 'info'
- }
- ]
- }
- ],
- projects: [
- {
- daysLeft: 28,
- comments: 15,
- totalTask: 344,
- hours: '380/244',
- tasks: '290/344',
- budget: '$18.2k',
- completedTask: 328,
- deadline: '28/2/22',
- chipColor: 'success',
- startDate: '14/2/21',
- budgetSpent: '$24.8k',
- members: '280 members',
- title: 'Social Banners',
- client: 'Christian Jimenez',
- avatar: '/images/icons/social-bg.png',
- description: 'We are Consulting, Software Development and Web Development Services.',
- avatarGroup: [
- { avatar: '/images/avatars/1.png', name: 'Vinnie Mostowy' },
- { avatar: '/images/avatars/2.png', name: 'Allen Rieske' },
- { avatar: '/images/avatars/3.png', name: 'Julee Rossignol' }
- ]
- },
- {
- daysLeft: 15,
- comments: 236,
- totalTask: 90,
- tasks: '12/90',
- hours: '98/135',
- budget: '$1.8k',
- completedTask: 38,
- deadline: '21/6/22',
- budgetSpent: '$2.4k',
- chipColor: 'warning',
- startDate: '18/8/21',
- members: '1.1k members',
- title: 'Admin Template',
- client: 'Jeffrey Phillips',
- avatar: '/images/logos/react-bg.png',
- avatarGroup: [
- { avatar: '/images/avatars/4.png', name: "Kaith D'souza" },
- { avatar: '/images/avatars/5.png', name: 'John Doe' },
- { avatar: '/images/avatars/6.png', name: 'Alan Walker' }
- ],
- description: "Time is our most valuable asset, that's why we want to help you save it."
- },
- {
- daysLeft: 45,
- comments: 98,
- budget: '$420',
- totalTask: 140,
- tasks: '22/140',
- hours: '880/421',
- completedTask: 95,
- chipColor: 'error',
- budgetSpent: '$980',
- deadline: '8/10/21',
- title: 'App Design',
- startDate: '24/7/21',
- members: '458 members',
- client: 'Ricky McDonald',
- avatar: '/images/logos/vue-bg.png',
- description: 'Figma dashboard app design combines the user UI & UX.',
- avatarGroup: [
- { avatar: '/images/avatars/7.png', name: 'Jimmy Ressula' },
- { avatar: '/images/avatars/8.png', name: 'Kristi Lawker' },
- { avatar: '/images/avatars/1.png', name: 'Danny Paul' }
- ]
- },
- {
- comments: 120,
- daysLeft: 126,
- totalTask: 420,
- budget: '2.43k',
- tasks: '237/420',
- hours: '380/820',
- completedTask: 302,
- deadline: '12/9/22',
- budgetSpent: '$8.5k',
- chipColor: 'warning',
- startDate: '10/2/19',
- members: '137 members',
- client: 'Hulda Wright',
- title: 'Create Website',
- avatar: '/images/logos/html-bg.png',
- description: 'Your domain name should reflect your products or services so that your...',
- avatarGroup: [
- { avatar: '/images/avatars/2.png', name: 'Andrew Tye' },
- { avatar: '/images/avatars/3.png', name: 'Rishi Swaat' },
- { avatar: '/images/avatars/4.png', name: 'Rossie Kim' }
- ]
- },
- {
- daysLeft: 5,
- comments: 20,
- totalTask: 285,
- tasks: '29/285',
- budget: '28.4k',
- hours: '142/420',
- chipColor: 'error',
- completedTask: 100,
- deadline: '25/12/21',
- startDate: '12/12/20',
- members: '82 members',
- budgetSpent: '$52.7k',
- client: 'Jerry Greene',
- title: 'Figma Dashboard',
- avatar: '/images/logos/figma-bg.png',
- description: "Time is our most valuable asset, that's why we want to help you save it.",
- avatarGroup: [
- { avatar: '/images/avatars/5.png', name: 'Kim Merchent' },
- { avatar: '/images/avatars/6.png', name: "Sam D'souza" },
- { avatar: '/images/avatars/7.png', name: 'Nurvi Karlos' }
- ]
- },
- {
- daysLeft: 4,
- comments: 98,
- budget: '$655',
- totalTask: 290,
- tasks: '29/290',
- hours: '580/445',
- completedTask: 290,
- budgetSpent: '$1.3k',
- chipColor: 'success',
- deadline: '02/11/21',
- startDate: '17/8/21',
- title: 'Logo Design',
- members: '16 members',
- client: 'Olive Strickland',
- avatar: '/images/logos/xd-bg.png',
- description: 'Premium logo designs created by top logo designers. Create the branding.',
- avatarGroup: [
- { avatar: '/images/avatars/8.png', name: 'Kim Karlos' },
- { avatar: '/images/avatars/1.png', name: 'Katy Turner' },
- { avatar: '/images/avatars/2.png', name: 'Peter Adward' }
- ]
- }
- ],
- connections: [
- {
- tasks: '834',
- projects: '18',
- isConnected: true,
- connections: '129',
- name: 'Mark Gilbert',
- designation: 'UI Designer',
- avatar: '/images/avatars/1.png',
- chips: [
- {
- title: 'Figma',
- color: 'secondary'
- },
- {
- title: 'Sketch',
- color: 'warning'
- }
- ]
- },
- {
- tasks: '2.31k',
- projects: '112',
- isConnected: false,
- connections: '1.28k',
- name: 'Eugenia Parsons',
- designation: 'Developer',
- avatar: '/images/avatars/2.png',
- chips: [
- {
- color: 'error',
- title: 'Angular'
- },
- {
- color: 'info',
- title: 'React'
- }
- ]
- },
- {
- tasks: '1.25k',
- projects: '32',
- isConnected: false,
- connections: '890',
- name: 'Francis Byrd',
- designation: 'Developer',
- avatar: '/images/avatars/3.png',
- chips: [
- {
- title: 'HTML',
- color: 'primary'
- },
- {
- color: 'info',
- title: 'React'
- }
- ]
- },
- {
- tasks: '12.4k',
- projects: '86',
- isConnected: false,
- connections: '890',
- name: 'Leon Lucas',
- designation: 'UI/UX Designer',
- avatar: '/images/avatars/4.png',
- chips: [
- {
- title: 'Figma',
- color: 'secondary'
- },
- {
- title: 'Sketch',
- color: 'warning'
- },
- {
- color: 'primary',
- title: 'Photoshop'
- }
- ]
- },
- {
- tasks: '23.8k',
- projects: '244',
- isConnected: true,
- connections: '2.14k',
- name: 'Jayden Rogers',
- designation: 'Full Stack Developer',
- avatar: '/images/avatars/5.png',
- chips: [
- {
- color: 'info',
- title: 'React'
- },
- {
- title: 'HTML',
- color: 'warning'
- },
- {
- color: 'success',
- title: 'Node.js'
- }
- ]
- },
- {
- tasks: '1.28k',
- projects: '32',
- isConnected: false,
- designation: 'SEO',
- connections: '1.27k',
- name: 'Jeanette Powell',
- avatar: '/images/avatars/6.png',
- chips: [
- {
- title: 'Analysis',
- color: 'secondary'
- },
- {
- color: 'success',
- title: 'Writing'
- }
- ]
- }
- ]
- },
- profileHeader: {
- fullName: 'John Doe',
- location: 'Vatican City',
- joiningDate: 'April 2021',
- designation: 'UX Designer',
- profileImg: '/images/avatars/1.png',
- designationIcon: 'tabler-palette',
- coverImg: '/images/pages/profile-banner.png'
- }
-}
diff --git a/src/fake-db/pages/widgetExamples.ts b/src/fake-db/pages/widgetExamples.ts
deleted file mode 100644
index 1b74323..0000000
--- a/src/fake-db/pages/widgetExamples.ts
+++ /dev/null
@@ -1,215 +0,0 @@
-import type { CardStatsType } from '@/types/pages/widgetTypes'
-
-export const db: CardStatsType = {
- statsHorizontalWithAvatar: [
- {
- stats: '$24,983',
- title: 'Total Earning',
- avatarIcon: 'tabler-currency-dollar',
- avatarColor: 'primary'
- },
- {
- stats: '$8,647',
- title: 'Unpaid Earning',
- avatarIcon: 'tabler-gift',
- avatarColor: 'success'
- },
- {
- stats: '2,367',
- title: 'Signups',
- avatarIcon: 'tabler-users',
- avatarColor: 'error'
- },
- {
- stats: '4.5%',
- title: 'Conversion Rate',
- avatarIcon: 'tabler-infinity',
- avatarColor: 'info'
- }
- ],
- statsHorizontalWithBorder: [
- {
- title: 'On route vehicles',
- stats: 42,
- trendNumber: 18.2,
- avatarIcon: 'tabler-truck',
- color: 'primary'
- },
- {
- title: 'Vehicles with errors',
- stats: 8,
- trendNumber: -8.7,
- avatarIcon: 'tabler-alert-triangle',
- color: 'warning'
- },
- {
- title: 'Deviated from route',
- stats: 27,
- trendNumber: 4.3,
- avatarIcon: 'tabler-git-fork',
- color: 'error'
- },
- {
- title: 'Late vehicles',
- stats: 13,
- trendNumber: 2.5,
- avatarIcon: 'tabler-clock',
- color: 'info'
- }
- ],
- customerStats: [
- {
- color: 'primary',
- avatarIcon: 'tabler-currency-dollar',
- title: 'account balance',
- stats: '$7480',
- content: ' Credit Left',
- description: 'Account balance for next purchase'
- },
- {
- color: 'success',
- avatarIcon: 'tabler-gift',
- title: 'loyalty program',
- chipLabel: 'Platinum member',
- description: '3000 points to next tier'
- },
- {
- color: 'warning',
- avatarIcon: 'tabler-star',
- title: 'wishlist',
- stats: '15',
- content: 'Items in wishlist',
- description: 'Receive notifications on price drops'
- },
- {
- color: 'info',
- avatarIcon: 'tabler-crown',
- title: 'coupons',
- stats: '21',
- content: 'Coupons you win',
- description: 'Use coupon on next purchase'
- }
- ],
- statsSquare: [
- {
- avatarIcon: 'tabler-briefcase',
- avatarColor: 'error',
- avatarSize: 40,
- avatarVariant: 'rounded',
- avatarSkin: 'light',
- stats: '97.8k',
- statsTitle: 'Orders'
- },
- {
- avatarIcon: 'tabler-message-dots',
- avatarColor: 'success',
- avatarSize: 40,
- avatarVariant: 'rounded',
- avatarSkin: 'light',
- stats: '3.4k',
- statsTitle: 'Review'
- }
- ],
- statsHorizontal: [
- {
- title: 'CPU Usage',
- stats: '86%',
- avatarIcon: 'tabler-cpu',
- avatarColor: 'primary',
- avatarSize: 42,
- avatarSkin: 'light'
- },
- {
- title: 'Memory Usage',
- stats: '1.24gb',
- avatarIcon: 'tabler-server',
- avatarColor: 'success',
- avatarSize: 42,
- avatarSkin: 'light'
- },
- {
- title: 'Download Ratio',
- stats: '0.2%',
- avatarIcon: 'tabler-chart-pie-2',
- avatarColor: 'error',
- avatarSize: 42,
- avatarSkin: 'light'
- },
- {
- title: 'Issues Found',
- stats: '128',
- avatarIcon: 'tabler-alert-octagon',
- avatarColor: 'warning',
- avatarSize: 42,
- avatarSkin: 'light'
- }
- ],
- statsVertical: [
- {
- title: 'Total Profit',
- subtitle: 'Last week',
- stats: '1.28k',
- avatarIcon: 'tabler-credit-card',
- avatarColor: 'error',
- avatarSize: 44,
- avatarSkin: 'light',
- chipText: '-12.2%',
- chipColor: 'error',
- chipVariant: 'tonal'
- },
- {
- title: 'Total Sales',
- subtitle: 'Monthly',
- stats: '24.67k',
- avatarIcon: 'tabler-currency-dollar',
- avatarColor: 'success',
- avatarSize: 44,
- avatarSkin: 'light',
- chipText: '+24.5%',
- chipColor: 'success',
- chipVariant: 'tonal'
- }
- ],
- statsWithAreaChart: [
- {
- stats: '92.6k',
- chartColor: 'primary',
- avatarSize: 42,
- avatarColor: 'primary',
- avatarIcon: 'tabler-users',
- avatarSkin: 'light',
- title: 'Subscribers Gained',
- chartSeries: [{ data: [40, 4, 58, 12, 35, 10, 84] }]
- },
- {
- title: 'Quarterly Sales',
- stats: '36.5%',
- avatarSize: 42,
- avatarColor: 'error',
- avatarIcon: 'tabler-shopping-cart',
- avatarSkin: 'light',
- chartColor: 'error',
- chartSeries: [{ data: [44, 75, 24, 57, 6, 84] }]
- },
- {
- title: 'Orders Received',
- stats: '97.5k',
- avatarSize: 42,
- avatarColor: 'warning',
- avatarIcon: 'tabler-box',
- avatarSkin: 'light',
- chartColor: 'warning',
- chartSeries: [{ data: [30, 84, 11, 76, 0, 49, 9] }]
- },
- {
- title: 'Revenue Generated',
- stats: '91.8k',
- avatarSize: 42,
- avatarColor: 'success',
- avatarIcon: 'tabler-credit-card',
- avatarSkin: 'light',
- chartColor: 'success',
- chartSeries: [{ data: [6, 35, 25, 61, 32, 84, 70] }]
- }
- ]
-}
diff --git a/src/redux-store/index.ts b/src/redux-store/index.ts
index 49d3695..72bab46 100644
--- a/src/redux-store/index.ts
+++ b/src/redux-store/index.ts
@@ -1,20 +1,13 @@
// Third-party Imports
import { configureStore } from '@reduxjs/toolkit'
-// Slice Imports
-import chatReducer from '@/redux-store/slices/chat'
-import calendarReducer from '@/redux-store/slices/calendar'
-import kanbanReducer from '@/redux-store/slices/kanban'
-import emailReducer from '@/redux-store/slices/email'
import productReducer from '@/redux-store/slices/product'
+import customerReducer from '@/redux-store/slices/customer'
export const store = configureStore({
reducer: {
- chatReducer,
- calendarReducer,
- kanbanReducer,
- emailReducer,
- productReducer
+ productReducer,
+ customerReducer
},
middleware: getDefaultMiddleware => getDefaultMiddleware({ serializableCheck: false })
})
diff --git a/src/redux-store/slices/calendar.ts b/src/redux-store/slices/calendar.ts
deleted file mode 100644
index 1d05799..0000000
--- a/src/redux-store/slices/calendar.ts
+++ /dev/null
@@ -1,94 +0,0 @@
-// Third-party Imports
-import { createSlice } from '@reduxjs/toolkit'
-import type { PayloadAction } from '@reduxjs/toolkit'
-import type { EventInput } from '@fullcalendar/core'
-
-// Type Imports
-import type { CalendarFiltersType, CalendarType } from '@/types/apps/calendarTypes'
-
-// Data Imports
-import { events } from '@/fake-db/apps/calendar'
-
-const initialState: CalendarType = {
- events: events,
- filteredEvents: events,
- selectedEvent: null,
- selectedCalendars: ['Personal', 'Business', 'Family', 'Holiday', 'ETC']
-}
-
-const filterEventsUsingCheckbox = (events: EventInput[], selectedCalendars: CalendarFiltersType[]) => {
- return events.filter(event => selectedCalendars.includes(event.extendedProps?.calendar as CalendarFiltersType))
-}
-
-export const calendarSlice = createSlice({
- name: 'calendar',
- initialState: initialState,
- reducers: {
- filterEvents: state => {
- state.filteredEvents = state.events
- },
-
- addEvent: (state, action) => {
- const newEvent = { ...action.payload, id: `${parseInt(state.events[state.events.length - 1]?.id ?? '') + 1}` }
-
- state.events.push(newEvent)
- },
-
- updateEvent: (state, action: PayloadAction) => {
- state.events = state.events.map(event => {
- if (action.payload._def && event.id === action.payload._def.publicId) {
- return {
- id: event.id,
- url: action.payload._def.url,
- title: action.payload._def.title,
- allDay: action.payload._def.allDay,
- end: action.payload._instance.range.end,
- start: action.payload._instance.range.start,
- extendedProps: action.payload._def.extendedProps
- }
- } else if (event.id === action.payload.id) {
- return action.payload
- } else {
- return event
- }
- })
- },
-
- deleteEvent: (state, action) => {
- state.events = state.events.filter(event => event.id !== action.payload)
- },
-
- selectedEvent: (state, action) => {
- state.selectedEvent = action.payload
- },
-
- filterCalendarLabel: (state, action) => {
- const index = state.selectedCalendars.indexOf(action.payload)
-
- if (index !== -1) {
- state.selectedCalendars.splice(index, 1)
- } else {
- state.selectedCalendars.push(action.payload)
- }
-
- state.events = filterEventsUsingCheckbox(state.filteredEvents, state.selectedCalendars)
- },
-
- filterAllCalendarLabels: (state, action) => {
- state.selectedCalendars = action.payload ? ['Personal', 'Business', 'Family', 'Holiday', 'ETC'] : []
- state.events = filterEventsUsingCheckbox(state.filteredEvents, state.selectedCalendars)
- }
- }
-})
-
-export const {
- filterEvents,
- addEvent,
- updateEvent,
- deleteEvent,
- selectedEvent,
- filterCalendarLabel,
- filterAllCalendarLabels
-} = calendarSlice.actions
-
-export default calendarSlice.reducer
diff --git a/src/redux-store/slices/chat.ts b/src/redux-store/slices/chat.ts
deleted file mode 100644
index a13d318..0000000
--- a/src/redux-store/slices/chat.ts
+++ /dev/null
@@ -1,80 +0,0 @@
-// Third-party Imports
-import { createSlice } from '@reduxjs/toolkit'
-import type { PayloadAction } from '@reduxjs/toolkit'
-
-// Type Imports
-import type { StatusType } from '@/types/apps/chatTypes'
-
-// Data Imports
-import { db } from '@/fake-db/apps/chat'
-
-export const chatSlice = createSlice({
- name: 'chat',
- initialState: db,
- reducers: {
- getActiveUserData: (state, action: PayloadAction) => {
- const activeUser = state.contacts.find(user => user.id === action.payload)
-
- const chat = state.chats.find(chat => chat.userId === action.payload)
-
- if (chat && chat.unseenMsgs > 0) {
- chat.unseenMsgs = 0
- }
-
- if (activeUser) {
- state.activeUser = activeUser
- }
- },
-
- addNewChat: (state, action) => {
- const { id } = action.payload
-
- state.contacts.find(contact => {
- if (contact.id === id && !state.chats.find(chat => chat.userId === contact.id)) {
- state.chats.unshift({
- id: state.chats.length + 1,
- userId: contact.id,
- unseenMsgs: 0,
- chat: []
- })
- }
- })
- },
-
- setUserStatus: (state, action: PayloadAction<{ status: StatusType }>) => {
- state.profileUser = {
- ...state.profileUser,
- status: action.payload.status
- }
- },
-
- sendMsg: (state, action: PayloadAction<{ msg: string }>) => {
- const { msg } = action.payload
-
- const existingChat = state.chats.find(chat => chat.userId === state.activeUser?.id)
-
- if (existingChat) {
- existingChat.chat.push({
- message: msg,
- time: new Date(),
- senderId: state.profileUser.id,
- msgStatus: {
- isSent: true,
- isDelivered: false,
- isSeen: false
- }
- })
-
- // Remove the chat from its current position
- state.chats = state.chats.filter(chat => chat.userId !== state.activeUser?.id)
-
- // Add the chat back to the beginning of the array
- state.chats.unshift(existingChat)
- }
- }
- }
-})
-
-export const { getActiveUserData, addNewChat, setUserStatus, sendMsg } = chatSlice.actions
-
-export default chatSlice.reducer
diff --git a/src/redux-store/slices/customer.ts b/src/redux-store/slices/customer.ts
new file mode 100644
index 0000000..d93383b
--- /dev/null
+++ b/src/redux-store/slices/customer.ts
@@ -0,0 +1,41 @@
+// Third-party Imports
+import type { PayloadAction } from '@reduxjs/toolkit'
+import { createSlice } from '@reduxjs/toolkit'
+
+// Type Imports
+
+// Data Imports
+import { Customer } from '../../types/services/customer'
+
+const initialState: { currentCustomer: Customer } = {
+ currentCustomer: {
+ id: '',
+ name: '',
+ email: '',
+ phone: '',
+ address: '',
+ is_active: true,
+ organization_id: '',
+ is_default: false,
+ metadata: {},
+ created_at: '',
+ updated_at: ''
+ }
+}
+
+export const customerSlice = createSlice({
+ name: 'customer',
+ initialState,
+ reducers: {
+ setCustomer: (state, action: PayloadAction) => {
+ state.currentCustomer = action.payload
+ },
+ resetCustomer: state => {
+ state.currentCustomer = initialState.currentCustomer
+ }
+ }
+})
+
+export const { setCustomer, resetCustomer } = customerSlice.actions
+
+export default customerSlice.reducer
diff --git a/src/redux-store/slices/email.ts b/src/redux-store/slices/email.ts
deleted file mode 100644
index 25d117b..0000000
--- a/src/redux-store/slices/email.ts
+++ /dev/null
@@ -1,140 +0,0 @@
-// Third-party Imports
-import { createSlice } from '@reduxjs/toolkit'
-
-// Type Imports
-import type { Email, EmailState } from '@/types/apps/emailTypes'
-
-// Data Imports
-import { db } from '@/fake-db/apps/email'
-
-// Constants
-const initialState: EmailState = {
- emails: db.emails,
- filteredEmails: []
-}
-
-export const emailSlice = createSlice({
- name: 'email',
- initialState,
- reducers: {
- // Filter all emails based on folder and label
- filterEmails: (state, action) => {
- const { emails, folder, label, uniqueLabels } = action.payload
-
- state.filteredEmails = emails.filter((email: Email) => {
- if (folder === 'starred' && email.folder !== 'trash') {
- return email.isStarred
- } else if (uniqueLabels.includes(label) && email.folder !== 'trash') {
- return email.labels.includes(label)
- } else {
- return email.folder === folder
- }
- })
- },
-
- // Move all selected emails to folder
- moveEmailsToFolder: (state, action) => {
- const { emailIds, folder } = action.payload
-
- state.emails = state.emails.map(email => {
- return emailIds.includes(email.id) ? { ...email, folder } : email
- })
- },
-
- // Delete all selected emails from trash
- deleteTrashEmails: (state, action) => {
- const { emailIds } = action.payload
-
- state.emails = state.emails.filter(email => !emailIds.includes(email.id))
- },
-
- // Toggle read/unread status of all selected emails
- toggleReadEmails: (state, action) => {
- const { emailIds } = action.payload
-
- const doesContainUnread = state.filteredEmails
- .filter(email => emailIds.includes(email.id))
- .some(email => !email.isRead)
-
- const areAllUnread = state.filteredEmails
- .filter(email => emailIds.includes(email.id))
- .every(email => !email.isRead)
-
- const areAllRead = state.filteredEmails.filter(email => emailIds.includes(email.id)).every(email => email.isRead)
-
- state.emails = state.emails.map(email => {
- if (emailIds.includes(email.id) && (doesContainUnread || areAllUnread)) {
- return { ...email, isRead: true }
- } else if (emailIds.includes(email.id) && areAllRead) {
- return { ...email, isRead: false }
- }
-
- return email
- })
- },
-
- // Toggle label to all selected emails
- toggleLabel: (state, action) => {
- const { emailIds, label } = action.payload
-
- state.emails = state.emails.map(email => {
- if (emailIds.includes(email.id)) {
- return email.labels.includes(label)
- ? { ...email, labels: email.labels.filter(l => l !== label) }
- : { ...email, labels: [...email.labels, label] }
- }
-
- return email
- })
- },
-
- // Toggle starred status of email
- toggleStarEmail: (state, action) => {
- const { emailId } = action.payload
-
- state.emails = state.emails.map(email => {
- return email.id === emailId ? { ...email, isStarred: !email.isStarred } : email
- })
- },
-
- // Get current email and mark it as read
- getCurrentEmail: (state, action) => {
- state.currentEmailId = action.payload
-
- state.emails = state.emails.map(email => {
- return email.id === action.payload && !email.isRead ? { ...email, isRead: true } : email
- })
- },
-
- // Navigate to next or previous email
- navigateEmails: (state, action) => {
- const { type, emails: filteredEmails, currentEmailId } = action.payload
-
- const currentIndex = filteredEmails.findIndex((email: Email) => email.id === currentEmailId)
-
- if (type === 'next' && currentIndex < filteredEmails.length - 1) {
- state.currentEmailId = filteredEmails[currentIndex + 1].id
- } else if (type === 'prev' && currentIndex > 0) {
- state.currentEmailId = filteredEmails[currentIndex - 1].id
- }
-
- // Mark email as read on navigation
- if (state.currentEmailId) {
- state.emails.filter(email => email.id === state.currentEmailId)[0].isRead = true
- }
- }
- }
-})
-
-export const {
- filterEmails,
- moveEmailsToFolder,
- deleteTrashEmails,
- toggleReadEmails,
- toggleLabel,
- toggleStarEmail,
- getCurrentEmail,
- navigateEmails
-} = emailSlice.actions
-
-export default emailSlice.reducer
diff --git a/src/redux-store/slices/kanban.ts b/src/redux-store/slices/kanban.ts
deleted file mode 100644
index d0c112d..0000000
--- a/src/redux-store/slices/kanban.ts
+++ /dev/null
@@ -1,124 +0,0 @@
-// Third-party Imports
-import { createSlice } from '@reduxjs/toolkit'
-
-// Type Imports
-import type { ColumnType, TaskType } from '@/types/apps/kanbanTypes'
-
-// Data Imports
-import { db } from '@/fake-db/apps/kanban'
-
-export const kanbanSlice = createSlice({
- name: 'kanban',
- initialState: db,
- reducers: {
- addColumn: (state, action) => {
- const maxId = Math.max(...state.columns.map(column => column.id))
-
- const newColumn: ColumnType = {
- id: maxId + 1,
- title: action.payload,
- taskIds: []
- }
-
- state.columns.push(newColumn)
- },
-
- editColumn: (state, action) => {
- const { id, title } = action.payload
-
- const column = state.columns.find(column => column.id === id)
-
- if (column) {
- column.title = title
- }
- },
-
- deleteColumn: (state, action) => {
- const { columnId } = action.payload
- const column = state.columns.find(column => column.id === columnId)
-
- state.columns = state.columns.filter(column => column.id !== columnId)
-
- if (column) {
- state.tasks = state.tasks.filter(task => !column.taskIds.includes(task.id))
- }
- },
-
- updateColumns: (state, action) => {
- state.columns = action.payload
- },
-
- updateColumnTaskIds: (state, action) => {
- const { id, tasksList } = action.payload
-
- state.columns = state.columns.map(column => {
- if (column.id === id) {
- return { ...column, taskIds: tasksList.map((task: TaskType) => task.id) }
- }
-
- return column
- })
- },
-
- addTask: (state, action) => {
- const { columnId, title } = action.payload
-
- const newTask: TaskType = {
- id: state.tasks[state.tasks.length - 1].id + 1,
- title
- }
-
- const column = state.columns.find(column => column.id === columnId)
-
- if (column) {
- column.taskIds.push(newTask.id)
- }
-
- state.tasks.push(newTask)
-
- return state
- },
-
- editTask: (state, action) => {
- const { id, title, badgeText, dueDate } = action.payload
-
- const task = state.tasks.find(task => task.id === id)
-
- if (task) {
- task.title = title
- task.badgeText = badgeText
- task.dueDate = dueDate
- }
- },
-
- deleteTask: (state, action) => {
- const taskId = action.payload
-
- state.tasks = state.tasks.filter(task => task.id !== taskId)
- state.columns = state.columns.map(column => {
- return {
- ...column,
- taskIds: column.taskIds.filter(id => id !== taskId)
- }
- })
- },
-
- getCurrentTask: (state, action) => {
- state.currentTaskId = action.payload
- }
- }
-})
-
-export const {
- addColumn,
- editColumn,
- deleteColumn,
- updateColumns,
- updateColumnTaskIds,
- addTask,
- editTask,
- deleteTask,
- getCurrentTask
-} = kanbanSlice.actions
-
-export default kanbanSlice.reducer
diff --git a/src/services/mutations/customers.ts b/src/services/mutations/customers.ts
new file mode 100644
index 0000000..ca790bb
--- /dev/null
+++ b/src/services/mutations/customers.ts
@@ -0,0 +1,52 @@
+import { useMutation, useQueryClient } from '@tanstack/react-query'
+import { CustomerRequest } from '../../types/services/customer'
+import { api } from '../api'
+import { toast } from 'react-toastify'
+
+export const useCustomersMutation = () => {
+ const queryClient = useQueryClient()
+
+ const createCustomer = useMutation({
+ mutationFn: async (newCustomer: CustomerRequest) => {
+ const response = await api.post('/customers', newCustomer)
+ return response.data
+ },
+ onSuccess: () => {
+ toast.success('Customer created successfully!')
+ queryClient.invalidateQueries({ queryKey: ['customers'] })
+ },
+ onError: (error: any) => {
+ toast.error(error.response?.data?.errors?.[0]?.cause || 'Create failed')
+ }
+ })
+
+ const updateCustomer = useMutation({
+ mutationFn: async ({ id, payload }: { id: string; payload: CustomerRequest }) => {
+ const response = await api.put(`/customers/${id}`, payload)
+ return response.data
+ },
+ onSuccess: () => {
+ toast.success('Customer updated successfully!')
+ queryClient.invalidateQueries({ queryKey: ['customers'] })
+ },
+ onError: (error: any) => {
+ toast.error(error.response?.data?.errors?.[0]?.cause || 'Update failed')
+ }
+ })
+
+ const deleteCustomer = useMutation({
+ mutationFn: async (id: string) => {
+ const response = await api.delete(`/customers/${id}`)
+ return response.data
+ },
+ onSuccess: () => {
+ toast.success('Customer deleted successfully!')
+ queryClient.invalidateQueries({ queryKey: ['customers'] })
+ },
+ onError: (error: any) => {
+ toast.error(error.response?.data?.errors?.[0]?.cause || 'Delete failed')
+ }
+ })
+
+ return { createCustomer, updateCustomer, deleteCustomer }
+}
diff --git a/src/services/queries/customers.ts b/src/services/queries/customers.ts
new file mode 100644
index 0000000..9e69fd9
--- /dev/null
+++ b/src/services/queries/customers.ts
@@ -0,0 +1,36 @@
+import { useQuery } from '@tanstack/react-query'
+import { Customers } from '../../types/services/customer'
+import { api } from '../api'
+
+interface CustomersQueryParams {
+ page?: number
+ limit?: number
+ search?: string
+}
+
+export function useCustomers(params: CustomersQueryParams = {}) {
+ const { page = 1, limit = 10, search = '', ...filters } = params
+
+ return useQuery({
+ queryKey: ['customers', { page, limit, search, ...filters }],
+ queryFn: async () => {
+ const queryParams = new URLSearchParams()
+
+ queryParams.append('page', page.toString())
+ queryParams.append('limit', limit.toString())
+
+ if (search) {
+ queryParams.append('search', search)
+ }
+
+ Object.entries(filters).forEach(([key, value]) => {
+ if (value !== undefined && value !== null && value !== '') {
+ queryParams.append(key, value.toString())
+ }
+ })
+
+ const res = await api.get(`/customers?${queryParams.toString()}`)
+ return res.data.data
+ }
+ })
+}
diff --git a/src/types/services/customer.ts b/src/types/services/customer.ts
new file mode 100644
index 0000000..327db98
--- /dev/null
+++ b/src/types/services/customer.ts
@@ -0,0 +1,29 @@
+export interface Customer {
+ id: string;
+ organization_id: string;
+ name: string;
+ email?: string;
+ phone?: string;
+ address?: string;
+ is_default: boolean;
+ is_active: boolean;
+ metadata: Record;
+ created_at: string;
+ updated_at: string;
+}
+
+export interface Customers {
+ data: Customer[];
+ total_count: number;
+ page: number;
+ limit: number;
+ total_pages: number;
+}
+
+export interface CustomerRequest {
+ name: string;
+ email?: string;
+ phone?: string;
+ address?: string;
+ is_active?: boolean;
+}
diff --git a/src/views/apps/academy/course-details/Details.tsx b/src/views/apps/academy/course-details/Details.tsx
deleted file mode 100644
index 099a47a..0000000
--- a/src/views/apps/academy/course-details/Details.tsx
+++ /dev/null
@@ -1,131 +0,0 @@
-'use client'
-
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardContent from '@mui/material/CardContent'
-import Chip from '@mui/material/Chip'
-import Divider from '@mui/material/Divider'
-import List from '@mui/material/List'
-import ListItem from '@mui/material/ListItem'
-import Typography from '@mui/material/Typography'
-import useMediaQuery from '@mui/material/useMediaQuery'
-import { useTheme } from '@mui/material/styles'
-
-// Third-party Imports
-import ReactPlayer from '@/libs/ReactPlayer'
-
-// Type Imports
-import type { CourseDetails } from '@/types/apps/academyTypes'
-
-// Components Imports
-import CustomAvatar from '@core/components/mui/Avatar'
-import CustomIconButton from '@core/components/mui/IconButton'
-
-const Details = ({ data }: { data?: CourseDetails }) => {
- // Hooks
- const theme = useTheme()
- const smallScreen = useMediaQuery(theme.breakpoints.down('sm'))
-
- return (
-
-
-
- UI/UX Basic Fundamentals
-
- Prof. Devonne Wallbridge
-
-
-
-
-
-
-
-
-
-
-
-
- }
- playIcon={
-
-
-
- }
- />
-
-
-
- About this course
- {data?.about}
-
-
-
-
By the numbers
-
-
-
-
- Skill level: {data?.skillLevel}
-
-
-
- Students: {data?.totalStudents.toLocaleString()}
-
-
-
- Languages: {data?.language}
-
-
-
- Captions: {data?.isCaptions ? 'Yes' : 'No'}
-
-
-
-
-
- Lectures: {data?.totalLectures}
-
-
-
- Video: {data?.length}
-
-
-
-
-
-
- Description
- {data?.description.map((value, index) => {value} )}
-
-
-
-
Instructor
-
-
-
-
- {data?.instructor}
-
- {data?.instructorPosition}
-
-
-
-
-
-
-
- )
-}
-
-export default Details
diff --git a/src/views/apps/academy/course-details/Sidebar.tsx b/src/views/apps/academy/course-details/Sidebar.tsx
deleted file mode 100644
index 182be43..0000000
--- a/src/views/apps/academy/course-details/Sidebar.tsx
+++ /dev/null
@@ -1,151 +0,0 @@
-'use client'
-
-// React Imports
-import { useState } from 'react'
-import type { ChangeEvent, SyntheticEvent } from 'react'
-
-// MUI Imports
-import { styled } from '@mui/material/styles'
-import MuiAccordion from '@mui/material/Accordion'
-import MuiAccordionSummary from '@mui/material/AccordionSummary'
-import MuiAccordionDetails from '@mui/material/AccordionDetails'
-import Typography from '@mui/material/Typography'
-import Checkbox from '@mui/material/Checkbox'
-import ListItem from '@mui/material/ListItem'
-import List from '@mui/material/List'
-import ListItemIcon from '@mui/material/ListItemIcon'
-import type { AccordionProps } from '@mui/material/Accordion'
-import type { AccordionSummaryProps } from '@mui/material/AccordionSummary'
-import type { AccordionDetailsProps } from '@mui/material/AccordionDetails'
-
-// Type Imports
-import type { CourseContent } from '@/types/apps/academyTypes'
-
-type ItemsType = {
- title: string
- time: string
- isCompleted: boolean
-}[]
-
-// Styled component for Accordion component
-export const Accordion = styled(MuiAccordion)({
- margin: '0 !important',
- boxShadow: 'none !important',
- border: '1px solid var(--mui-palette-divider) !important',
- borderRadius: '0 !important',
- overflow: 'hidden',
- background: 'none',
- '&:not(:last-of-type)': {
- borderBottom: '0 !important'
- },
- '&:before': {
- display: 'none'
- },
- '&:first-of-type': {
- borderTopLeftRadius: 'var(--mui-shape-borderRadius) !important',
- borderTopRightRadius: 'var(--mui-shape-borderRadius) !important'
- },
- '&:last-of-type': {
- borderBottomLeftRadius: 'var(--mui-shape-borderRadius) !important',
- borderBottomRightRadius: 'var(--mui-shape-borderRadius) !important'
- }
-})
-
-// Styled component for AccordionSummary component
-export const AccordionSummary = styled(MuiAccordionSummary)(({ theme }) => ({
- padding: theme.spacing(3, 6),
- transition: 'none',
- backgroundColor: 'var(--mui-palette-action-hover)',
- borderBlockEnd: '0 !important',
- '&.Mui-expanded': {
- borderBlockEnd: '1px solid var(--mui-palette-divider) !important'
- }
-}))
-
-// Styled component for AccordionDetails component
-export const AccordionDetails = styled(MuiAccordionDetails)(({ theme }) => ({
- padding: `${theme.spacing(4, 3)} !important`,
- backgroundColor: 'var(--mui-palette-background-paper)'
-}))
-
-const Sidebar = ({ content }: { content?: CourseContent[] }) => {
- // States
- const [expanded, setExpanded] = useState(0)
- const [items, setItems] = useState(content?.map(item => item.topics) ?? [])
-
- const handleChange = (panel: number) => (event: SyntheticEvent, isExpanded: boolean) => {
- setExpanded(isExpanded ? panel : false)
- }
-
- const handleCheckboxChange = (e: ChangeEvent, index1: number, index2: number) => {
- setItems(
- items.map((item, i) => {
- if (i === index1) {
- return item.map((topic, j) => {
- if (j === index2) {
- return { ...topic, isCompleted: e.target.checked }
- }
-
- return topic
- })
- }
-
- return item
- })
- )
- }
-
- return (
- <>
- {content?.map((item, index) => {
- const totalTime = items[index]
- .reduce((sum, topic) => {
- const time = parseFloat(topic.time || '0')
-
- return sum + time
- }, 0)
- .toFixed(2)
-
- const selectedTopics = items[index].filter(topic => topic.isCompleted).length
-
- return (
-
- }
- aria-controls={'sd'}
- >
-
- {item.title}
- {`${selectedTopics} / ${item.topics.length} | ${parseFloat(totalTime)} min`}
-
-
-
-
- {item.topics.map((topic, i) => {
- return (
-
-
- handleCheckboxChange(e, index, i)}
- />
-
-
- {`${i + 1}. ${topic.title}`}
- {topic.time}
-
-
- )
- })}
-
-
-
- )
- })}
- >
- )
-}
-
-export default Sidebar
diff --git a/src/views/apps/academy/dashboard/AssignmentProgress.tsx b/src/views/apps/academy/dashboard/AssignmentProgress.tsx
deleted file mode 100644
index dc79679..0000000
--- a/src/views/apps/academy/dashboard/AssignmentProgress.tsx
+++ /dev/null
@@ -1,76 +0,0 @@
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardHeader from '@mui/material/CardHeader'
-import CardContent from '@mui/material/CardContent'
-import Typography from '@mui/material/Typography'
-import CircularProgress from '@mui/material/CircularProgress'
-
-// Type Imports
-import type { ThemeColor } from '@core/types'
-
-// Components Imports
-import CustomIconButton from '@core/components/mui/IconButton'
-import OptionMenu from '@core/components/option-menu'
-import DirectionalIcon from '@components/DirectionalIcon'
-
-type DataType = {
- title: string
- tasks: number
- progress: number
- color: ThemeColor
-}
-
-// Vars
-const data: DataType[] = [
- { title: 'User Experience Design', tasks: 120, progress: 72, color: 'primary' },
- { title: 'Basic fundamentals', tasks: 32, progress: 48, color: 'success' },
- { title: 'React Native components', tasks: 182, progress: 15, color: 'error' },
- { title: 'Basic of music theory', tasks: 56, progress: 24, color: 'info' }
-]
-
-const AssignmentProgress = () => {
- return (
-
- } />
-
- {data.map((item, i) => (
-
-
-
-
-
- {`${item.progress}%`}
-
-
-
-
-
- {item.title}
-
- {`${item.tasks} Tasks`}
-
-
-
-
-
-
- ))}
-
-
- )
-}
-
-export default AssignmentProgress
diff --git a/src/views/apps/academy/dashboard/CourseTable.tsx b/src/views/apps/academy/dashboard/CourseTable.tsx
deleted file mode 100644
index 85a9524..0000000
--- a/src/views/apps/academy/dashboard/CourseTable.tsx
+++ /dev/null
@@ -1,353 +0,0 @@
-'use client'
-
-// React Imports
-import { useState, useEffect, useMemo } from 'react'
-
-// Next Imports
-import Link from 'next/link'
-import { useParams } from 'next/navigation'
-
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardHeader from '@mui/material/CardHeader'
-import Checkbox from '@mui/material/Checkbox'
-import LinearProgress from '@mui/material/LinearProgress'
-import TablePagination from '@mui/material/TablePagination'
-import Typography from '@mui/material/Typography'
-import type { TextFieldProps } from '@mui/material/TextField'
-
-// Third-party Imports
-import classnames from 'classnames'
-import { rankItem } from '@tanstack/match-sorter-utils'
-import {
- createColumnHelper,
- flexRender,
- getCoreRowModel,
- useReactTable,
- getFilteredRowModel,
- getFacetedRowModel,
- getFacetedUniqueValues,
- getFacetedMinMaxValues,
- getPaginationRowModel,
- getSortedRowModel
-} from '@tanstack/react-table'
-import type { ColumnDef, FilterFn } from '@tanstack/react-table'
-import type { RankingInfo } from '@tanstack/match-sorter-utils'
-
-// Type Imports
-import type { Course } from '@/types/apps/academyTypes'
-import type { Locale } from '@configs/i18n'
-
-// Components Imports
-import CustomAvatar from '@core/components/mui/Avatar'
-import TablePaginationComponent from '@components/TablePaginationComponent'
-import CustomTextField from '@core/components/mui/TextField'
-
-// Util Imports
-import { getLocalizedUrl } from '@/utils/i18n'
-
-// Style Imports
-import tableStyles from '@core/styles/table.module.css'
-
-declare module '@tanstack/table-core' {
- interface FilterFns {
- fuzzy: FilterFn
- }
- interface FilterMeta {
- itemRank: RankingInfo
- }
-}
-
-type CourseWithProgress = Course & {
- progressValue?: string
-}
-
-const fuzzyFilter: FilterFn = (row, columnId, value, addMeta) => {
- // Rank the item
- const itemRank = rankItem(row.getValue(columnId), value)
-
- // Store the itemRank info
- addMeta({
- itemRank
- })
-
- // Return if the item should be filtered in/out
- return itemRank.passed
-}
-
-const DebouncedInput = ({
- value: initialValue,
- onChange,
- debounce = 500,
- ...props
-}: {
- value: string | number
- onChange: (value: string | number) => void
- debounce?: number
-} & Omit) => {
- // States
- const [value, setValue] = useState(initialValue)
-
- useEffect(() => {
- setValue(initialValue)
- }, [initialValue])
-
- useEffect(() => {
- const timeout = setTimeout(() => {
- onChange(value)
- }, debounce)
-
- return () => clearTimeout(timeout)
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [value])
-
- return setValue(e.target.value)} />
-}
-
-// Column Definitions
-const columnHelper = createColumnHelper()
-
-const CourseTable = ({ courseData }: { courseData?: Course[] }) => {
- // States
- const [rowSelection, setRowSelection] = useState({})
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
- const [data, setData] = useState(...[courseData])
- const [globalFilter, setGlobalFilter] = useState('')
-
- // Hooks
- const { lang: locale } = useParams()
-
- const columns = useMemo[]>(
- () => [
- {
- id: 'select',
- header: ({ table }) => (
-
- ),
- cell: ({ row }) => (
-
- )
- },
- columnHelper.accessor('courseTitle', {
- header: 'Course Name',
- cell: ({ row }) => (
-
-
-
-
-
-
- {row.original.courseTitle}
-
-
-
-
- {row.original.user}
-
-
-
-
- )
- }),
- columnHelper.accessor('time', {
- header: 'Time',
- cell: ({ row }) => (
-
- {row.original.time}
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('progressValue', {
- header: 'progress',
- sortingFn: (rowA, rowB) => {
- if (
- !Math.floor((rowA.original.completedTasks / rowA.original.totalTasks) * 100) ||
- !Math.floor((rowB.original.completedTasks / rowB.original.totalTasks) * 100)
- )
- return 0
-
- return (
- Number(Math.floor((rowA.original.completedTasks / rowA.original.totalTasks) * 100)) -
- Number(Math.floor((rowB.original.completedTasks / rowB.original.totalTasks) * 100))
- )
- },
- cell: ({ row }) => (
-
- {`${Math.floor((row.original.completedTasks / row.original.totalTasks) * 100)}%`}
-
- {`${row.original.completedTasks}/${row.original.totalTasks}`}
-
- )
- }),
- columnHelper.accessor('userCount', {
- header: 'Status',
- cell: ({ row }) => (
-
-
-
- {row.original.userCount}
-
-
-
- {row.original.note}
-
-
-
- {row.original.view}
-
-
- ),
- enableSorting: false
- })
- ],
- // eslint-disable-next-line react-hooks/exhaustive-deps
- []
- )
-
- const table = useReactTable({
- data: data as Course[],
- columns,
- filterFns: {
- fuzzy: fuzzyFilter
- },
- state: {
- rowSelection,
- globalFilter
- },
- initialState: {
- pagination: {
- pageSize: 5
- }
- },
- enableRowSelection: true, //enable row selection for all rows
- // enableRowSelection: row => row.original.age > 18, // or enable row selection conditionally per row
- globalFilterFn: fuzzyFilter,
- onRowSelectionChange: setRowSelection,
- getCoreRowModel: getCoreRowModel(),
- onGlobalFilterChange: setGlobalFilter,
- getFilteredRowModel: getFilteredRowModel(),
- getSortedRowModel: getSortedRowModel(),
- getPaginationRowModel: getPaginationRowModel(),
- getFacetedRowModel: getFacetedRowModel(),
- getFacetedUniqueValues: getFacetedUniqueValues(),
- getFacetedMinMaxValues: getFacetedMinMaxValues()
- })
-
- return (
-
- setGlobalFilter(String(value))}
- placeholder='Search Course'
- />
- }
- className='flex-wrap gap-4'
- />
-
-
-
- {table.getHeaderGroups().map(headerGroup => (
-
- {headerGroup.headers.map(header => (
-
- {header.isPlaceholder ? null : (
- <>
-
- {flexRender(header.column.columnDef.header, header.getContext())}
- {{
- asc: ,
- desc:
- }[header.column.getIsSorted() as 'asc' | 'desc'] ?? null}
-
- >
- )}
-
- ))}
-
- ))}
-
- {table.getFilteredRowModel().rows.length === 0 ? (
-
-
-
- No data available
-
-
-
- ) : (
-
- {table
- .getRowModel()
- .rows.slice(0, table.getState().pagination.pageSize)
- .map(row => {
- return (
-
- {row.getVisibleCells().map(cell => (
- {flexRender(cell.column.columnDef.cell, cell.getContext())}
- ))}
-
- )
- })}
-
- )}
-
-
- (
- {
- table.setPageIndex(page - 1)
- }}
- />
- )}
- count={table.getFilteredRowModel().rows.length}
- rowsPerPage={table.getState().pagination.pageSize}
- page={table.getState().pagination.pageIndex}
- onPageChange={(_, page) => {
- table.setPageIndex(page)
- }}
- />
-
- )
-}
-
-export default CourseTable
diff --git a/src/views/apps/academy/dashboard/InterestedTopics.tsx b/src/views/apps/academy/dashboard/InterestedTopics.tsx
deleted file mode 100644
index 8ddb102..0000000
--- a/src/views/apps/academy/dashboard/InterestedTopics.tsx
+++ /dev/null
@@ -1,193 +0,0 @@
-'use client'
-
-// Next Imports
-import dynamic from 'next/dynamic'
-
-// MUI Imports
-import Card from '@mui/material/Card'
-import Grid from '@mui/material/Grid2'
-import CardHeader from '@mui/material/CardHeader'
-import CardContent from '@mui/material/CardContent'
-import Typography from '@mui/material/Typography'
-import { useTheme } from '@mui/material/styles'
-
-// Third-party Imports
-import classnames from 'classnames'
-import type { ApexOptions } from 'apexcharts'
-
-// Components Imports
-import OptionMenu from '@core/components/option-menu'
-
-// Styled Component Imports
-const AppReactApexCharts = dynamic(() => import('@/libs/styles/AppReactApexCharts'))
-
-type DataType = {
- title: string
- value: number
- colorClass: string
-}
-
-// Vars
-const series = [
- {
- data: [35, 20, 14, 12, 10, 9]
- }
-]
-
-const data1: DataType[] = [
- { title: 'UI Design', value: 35, colorClass: 'text-primary' },
- { title: 'UX Design', value: 20, colorClass: 'text-info' },
- { title: 'Music', value: 14, colorClass: 'text-success' }
-]
-
-const data2: DataType[] = [
- { title: 'Animation', value: 12, colorClass: 'text-secondary' },
- { title: 'React', value: 10, colorClass: 'text-error' },
- { title: 'SEO', value: 9, colorClass: 'text-warning' }
-]
-
-const labels = ['UI Design', 'UX Design', 'Music', 'Animation', 'React', 'SEO']
-
-const InterestedTopics = () => {
- // Hooks
- const theme = useTheme()
-
- // Vars
- const options: ApexOptions = {
- chart: {
- parentHeightOffset: 0,
- toolbar: { show: false }
- },
- plotOptions: {
- bar: {
- horizontal: true,
- barHeight: '70%',
- distributed: true,
- borderRadius: 7,
- borderRadiusApplication: 'end'
- }
- },
-
- colors: [
- 'var(--mui-palette-primary-main)',
- 'var(--mui-palette-info-main)',
- 'var(--mui-palette-success-main)',
- 'var(--mui-palette-secondary-main)',
- 'var(--mui-palette-error-main)',
- 'var(--mui-palette-warning-main)'
- ],
- grid: {
- strokeDashArray: 8,
- borderColor: 'var(--mui-palette-divider)',
- xaxis: {
- lines: { show: true }
- },
- yaxis: {
- lines: { show: false }
- },
- padding: {
- top: -25,
- left: 21,
- right: 25,
- bottom: 0
- }
- },
- dataLabels: {
- enabled: true,
- offsetY: 8,
- style: {
- colors: ['#fff'],
- fontWeight: 500,
- fontSize: '0.8125rem'
- },
- formatter(val: string, opt: any) {
- return labels[opt.dataPointIndex]
- }
- },
- tooltip: {
- enabled: true,
- style: {
- fontSize: '0.75rem'
- },
- onDatasetHover: {
- highlightDataSeries: false
- }
- },
- legend: { show: false },
- states: {
- hover: {
- filter: { type: 'none' }
- },
- active: {
- filter: { type: 'none' }
- }
- },
- xaxis: {
- axisTicks: { show: false },
- axisBorder: { show: false },
- categories: ['6', '5', '4', '3', '2', '1'],
- labels: {
- formatter: val => `${val}%`,
- style: {
- fontSize: '0.8125rem',
- colors: 'var(--mui-palette-text-disabled)'
- }
- }
- },
- yaxis: {
- labels: {
- align: theme.direction === 'rtl' ? 'right' : 'left',
- style: {
- fontWeight: 500,
- fontSize: '0.8125rem',
- colors: 'var(--mui-palette-text-disabled)'
- },
- offsetX: theme.direction === 'rtl' ? -15 : -30
- }
- }
- }
-
- return (
-
- }
- />
-
-
-
-
-
-
-
-
- {data1.map((item, i) => (
-
-
-
- {item.title}
- {`${item.value}%`}
-
-
- ))}
-
-
- {data2.map((item, i) => (
-
-
-
- {item.title}
- {`${item.value}%`}
-
-
- ))}
-
-
-
-
-
-
- )
-}
-
-export default InterestedTopics
diff --git a/src/views/apps/academy/dashboard/PopularInstructors.tsx b/src/views/apps/academy/dashboard/PopularInstructors.tsx
deleted file mode 100644
index 77c3701..0000000
--- a/src/views/apps/academy/dashboard/PopularInstructors.tsx
+++ /dev/null
@@ -1,59 +0,0 @@
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardHeader from '@mui/material/CardHeader'
-import CardContent from '@mui/material/CardContent'
-import Divider from '@mui/material/Divider'
-import Typography from '@mui/material/Typography'
-
-// Components Imports
-import CustomAvatar from '@core/components/mui/Avatar'
-import OptionMenu from '@core/components/option-menu'
-
-type DataType = {
- name: string
- profession: string
- totalCourses: number
- avatar: string
-}
-
-// Vars
-const data: DataType[] = [
- { name: 'Jordan Stevenson', profession: 'Business Intelligence', totalCourses: 33, avatar: '/images/avatars/1.png' },
- { name: 'Bentlee Emblin', profession: 'Digital Marketing', totalCourses: 52, avatar: '/images/avatars/2.png' },
- { name: 'Benedetto Rossiter', profession: 'UI/UX Design', totalCourses: 12, avatar: '/images/avatars/3.png' },
- { name: 'Beverlie Krabbe', profession: 'Vue', totalCourses: 8, avatar: '/images/avatars/4.png' }
-]
-
-const PopularInstructors = () => {
- return (
-
- } />
-
-
- instructors
- courses
-
-
-
- {data.map((item, i) => (
-
-
-
-
-
- {item.name}
-
- {item.profession}
-
-
- {item.totalCourses}
-
-
-
- ))}
-
-
- )
-}
-
-export default PopularInstructors
diff --git a/src/views/apps/academy/dashboard/TopCourses.tsx b/src/views/apps/academy/dashboard/TopCourses.tsx
deleted file mode 100644
index b4cc66e..0000000
--- a/src/views/apps/academy/dashboard/TopCourses.tsx
+++ /dev/null
@@ -1,54 +0,0 @@
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardHeader from '@mui/material/CardHeader'
-import CardContent from '@mui/material/CardContent'
-import Typography from '@mui/material/Typography'
-import Chip from '@mui/material/Chip'
-
-// Type Imports
-import type { ThemeColor } from '@core/types'
-
-// Components Imports
-import CustomAvatar from '@core/components/mui/Avatar'
-import OptionMenu from '@core/components/option-menu'
-
-type DataType = {
- title: string
- views: string
- icon: string
- color: ThemeColor
-}
-
-// Vars
-const data: DataType[] = [
- { title: 'Videography Basic Design Course', views: '1.2k', icon: 'tabler-video', color: 'primary' },
- { title: 'Basic Front-end Development Course', views: '834', icon: 'tabler-code', color: 'info' },
- { title: 'Basic Fundamentals of Photography', views: '3.7k', icon: 'tabler-camera', color: 'success' },
- { title: 'Advance Dribble Base Visual Design', views: '2.5k', icon: 'tabler-brand-dribbble', color: 'warning' },
- { title: 'Your First Singing Lesson', views: '948', icon: 'tabler-microphone-2', color: 'error' }
-]
-
-const TopCourses = () => {
- return (
-
- } />
-
- {data.map((item, i) => (
-
-
-
-
-
-
- {item.title}
-
-
-
-
- ))}
-
-
- )
-}
-
-export default TopCourses
diff --git a/src/views/apps/academy/dashboard/UpcomingWebinar.tsx b/src/views/apps/academy/dashboard/UpcomingWebinar.tsx
deleted file mode 100644
index 5b40560..0000000
--- a/src/views/apps/academy/dashboard/UpcomingWebinar.tsx
+++ /dev/null
@@ -1,61 +0,0 @@
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardContent from '@mui/material/CardContent'
-import Button from '@mui/material/Button'
-import Typography from '@mui/material/Typography'
-
-// Third-party Imports
-import classnames from 'classnames'
-
-// Components Imports
-import CustomAvatar from '@core/components/mui/Avatar'
-
-type DataType = {
- icon: string
- title: string
- value: string
-}
-
-// Vars
-const data: DataType[] = [
- { icon: 'tabler-calendar', title: '17 Nov 23', value: 'Date' },
- { icon: 'tabler-clock', title: '32 Minutes', value: 'Duration' }
-]
-
-const UpcomingWebinar = () => {
- return (
-
-
-
-
-
-
-
- Upcoming Webinar
-
-
- Next Generation Frontend Architecture Using Layout Engine And React Native Web.
-
-
-
- {data.map((item, i) => (
-
-
-
-
-
-
- {item.title}
-
- {item.value}
-
-
- ))}
-
- Join the event
-
-
- )
-}
-
-export default UpcomingWebinar
diff --git a/src/views/apps/academy/dashboard/WelcomeCard.tsx b/src/views/apps/academy/dashboard/WelcomeCard.tsx
deleted file mode 100644
index a284760..0000000
--- a/src/views/apps/academy/dashboard/WelcomeCard.tsx
+++ /dev/null
@@ -1,218 +0,0 @@
-'use client'
-
-// React Imports
-import type { ReactNode } from 'react'
-
-// Next Imports
-import dynamic from 'next/dynamic'
-
-// MUI Imports
-import Divider from '@mui/material/Divider'
-import Chip from '@mui/material/Chip'
-import Typography from '@mui/material/Typography'
-import useMediaQuery from '@mui/material/useMediaQuery'
-import { lighten, darken, useTheme } from '@mui/material/styles'
-
-// Third-party Imports
-import type { ApexOptions } from 'apexcharts'
-
-// Type Imports
-import type { ThemeColor } from '@core/types'
-
-// Component Imports
-import CustomAvatar from '@core/components/mui/Avatar'
-
-// Styled Component Imports
-const AppReactApexCharts = dynamic(() => import('@/libs/styles/AppReactApexCharts'))
-
-type DataType = {
- title: string
- value: string
- color: ThemeColor
- icon: ReactNode
-}
-
-// Vars
-const data: DataType[] = [
- {
- title: 'Hours Spent',
- value: '34h',
- color: 'primary',
- icon: (
-
-
-
-
- )
- },
- {
- title: 'Test Results',
- value: '82%',
- color: 'info',
- icon: (
-
-
-
-
- )
- },
- {
- title: 'Course Completed',
- value: '14',
- color: 'warning',
- icon: (
-
-
-
-
- )
- }
-]
-
-const WelcomeCard = () => {
- // Hooks
- const theme = useTheme()
- const belowMdScreen = useMediaQuery(theme.breakpoints.down('md'))
-
- // Vars
- const options: ApexOptions = {
- chart: {
- sparkline: { enabled: true }
- },
- grid: {
- padding: {
- left: 20,
- right: 20
- }
- },
- colors: [
- darken(theme.palette.success.main, 0.15),
- darken(theme.palette.success.main, 0.1),
- 'var(--mui-palette-success-main)',
- lighten(theme.palette.success.main, 0.2),
- lighten(theme.palette.success.main, 0.4),
- lighten(theme.palette.success.main, 0.6)
- ],
- stroke: { width: 0 },
- legend: { show: false },
- tooltip: { theme: 'false' },
- dataLabels: { enabled: false },
- labels: ['36h', '56h', '16h', '32h', '56h', '16h'],
- states: {
- hover: {
- filter: { type: 'none' }
- },
- active: {
- filter: { type: 'none' }
- }
- },
- plotOptions: {
- pie: {
- customScale: 0.9,
- donut: {
- size: '70%',
- labels: {
- show: true,
- name: {
- offsetY: 20,
- fontSize: '0.875rem'
- },
- value: {
- offsetY: -15,
- fontWeight: 500,
- fontSize: '1.125rem',
- formatter: value => `${value}%`,
- color: 'var(--mui-palette-text-primary)'
- },
- total: {
- show: true,
- fontSize: '0.8125rem',
- label: 'Total',
- color: 'var(--mui-palette-text-disabled)',
- formatter: () => '231h'
- }
- }
- }
- }
- }
- }
-
- return (
-
-
-
- Welcome back,
- Felecia 👋🏻
-
-
- Your progress this week is Awesome. let's keep it up
- and get a lot of points reward!
-
-
- {data.map((item, i) => (
-
-
- {item.icon}
-
-
- {item.title}
-
- {item.value}
-
-
-
- ))}
-
-
-
-
-
-
-
- Time spendings
-
- Weekly report
-
-
-
- 231h 14m
-
-
-
-
-
-
-
- )
-}
-
-export default WelcomeCard
diff --git a/src/views/apps/academy/my-courses/ColoredCards.tsx b/src/views/apps/academy/my-courses/ColoredCards.tsx
deleted file mode 100644
index 48f58ea..0000000
--- a/src/views/apps/academy/my-courses/ColoredCards.tsx
+++ /dev/null
@@ -1,85 +0,0 @@
-// MUI Imports
-import Grid from '@mui/material/Grid2'
-import Button from '@mui/material/Button'
-import Typography from '@mui/material/Typography'
-import { useTheme } from '@mui/material/styles'
-
-// Third-party Imports
-import classnames from 'classnames'
-
-// Types Imports
-import type { ThemeColor } from '@core/types'
-
-type DataType = {
- title: string
- description: string
- type: string
- image: string
- color: ThemeColor
- imageColorClass?: string
- bgColorClass?: string
-}
-
-// Vars
-const data: DataType[] = [
- {
- title: 'Earn a Certificate',
- description: 'Get the right professional certificate program for you.',
- type: 'Programs',
- image: '/images/illustrations/characters/8.png',
- color: 'primary',
- imageColorClass: 'bg-primaryLight',
- bgColorClass: 'bg-primaryLighter'
- },
- {
- title: 'Best Rated Courses',
- description: 'Enroll now in the most popular and best rated courses.',
- type: 'Courses',
- image: '/images/illustrations/characters/9.png',
- color: 'error',
- imageColorClass: 'bg-errorLight',
- bgColorClass: 'bg-errorLighter'
- }
-]
-
-const ColoredCards = () => {
- // Hooks
- const theme = useTheme()
-
- return (
-
- {data.map((item, index) => (
-
-
-
-
- {item.title}
-
- {item.description}
- {`View ${item.type}`}
-
-
-
-
-
-
- ))}
-
- )
-}
-
-export default ColoredCards
diff --git a/src/views/apps/academy/my-courses/Courses.tsx b/src/views/apps/academy/my-courses/Courses.tsx
deleted file mode 100644
index d29ed2a..0000000
--- a/src/views/apps/academy/my-courses/Courses.tsx
+++ /dev/null
@@ -1,231 +0,0 @@
-// React Imports
-import type { ChangeEvent } from 'react'
-import { useState, useEffect } from 'react'
-
-// Next Imports
-import Link from 'next/link'
-import { useParams } from 'next/navigation'
-
-// MUI Imports
-import Grid from '@mui/material/Grid2'
-import Card from '@mui/material/Card'
-import CardContent from '@mui/material/CardContent'
-import Chip from '@mui/material/Chip'
-import Button from '@mui/material/Button'
-import FormControl from '@mui/material/FormControl'
-import FormControlLabel from '@mui/material/FormControlLabel'
-import LinearProgress from '@mui/material/LinearProgress'
-import MenuItem from '@mui/material/MenuItem'
-import Pagination from '@mui/material/Pagination'
-import Select from '@mui/material/Select'
-import Switch from '@mui/material/Switch'
-import Typography from '@mui/material/Typography'
-
-// Type Imports
-import type { Course } from '@/types/apps/academyTypes'
-import type { Locale } from '@configs/i18n'
-import type { ThemeColor } from '@core/types'
-
-// Component Imports
-import DirectionalIcon from '@components/DirectionalIcon'
-
-// Util Imports
-import { getLocalizedUrl } from '@/utils/i18n'
-
-type ChipColorType = {
- color: ThemeColor
-}
-
-type Props = {
- courseData?: Course[]
- searchValue: string
-}
-
-const chipColor: { [key: string]: ChipColorType } = {
- Web: { color: 'primary' },
- Art: { color: 'success' },
- 'UI/UX': { color: 'error' },
- Psychology: { color: 'warning' },
- Design: { color: 'info' }
-}
-
-const Courses = (props: Props) => {
- // Props
- const { courseData, searchValue } = props
-
- // States
- const [course, setCourse] = useState('All')
- const [hideCompleted, setHideCompleted] = useState(true)
- const [data, setData] = useState([])
- const [activePage, setActivePage] = useState(0)
-
- // Hooks
- const { lang: locale } = useParams()
-
- useEffect(() => {
- let newData =
- courseData?.filter(courseItem => {
- if (course === 'All') return !hideCompleted || courseItem.completedTasks !== courseItem.totalTasks
-
- return courseItem.tags === course && (!hideCompleted || courseItem.completedTasks !== courseItem.totalTasks)
- }) ?? []
-
- if (searchValue) {
- newData = newData.filter(category => category.courseTitle.toLowerCase().includes(searchValue.toLowerCase()))
- }
-
- if (activePage > Math.ceil(newData.length / 6)) setActivePage(0)
-
- setData(newData)
- }, [searchValue, activePage, course, hideCompleted, courseData])
-
- const handleChange = (e: ChangeEvent) => {
- setHideCompleted(e.target.checked)
- setActivePage(0)
- }
-
- return (
-
-
-
-
- My Courses
- Total 6 course you have purchased
-
-
-
- {
- setCourse(e.target.value)
- setActivePage(0)
- }}
- labelId='course-select'
- >
- All Courses
- Web
- Art
- UI/UX
- Psychology
- Design
-
-
- }
- label='Hide completed'
- />
-
-
- {data.length > 0 ? (
-
- {data.slice(activePage * 6, activePage * 6 + 6).map((item, index) => (
-
-
-
-
-
-
-
-
-
-
-
- {item.rating}
-
- {`(${item.ratingCount})`}
-
-
-
-
- {item.courseTitle}
-
- {item.desc}
-
-
- {item.completedTasks === item.totalTasks ? (
-
-
- Completed
-
- ) : (
-
-
- {`${item.time}`}
-
- )}
-
-
- {item.completedTasks === item.totalTasks ? (
-
}
- component={Link}
- href={getLocalizedUrl('/apps/academy/course-details', locale as Locale)}
- >
- Start Over
-
- ) : (
-
- }
- component={Link}
- href={getLocalizedUrl('/apps/academy/course-details', locale as Locale)}
- className='is-auto flex-auto'
- >
- Start Over
-
-
- }
- component={Link}
- href={getLocalizedUrl('/apps/academy/course-details', locale as Locale)}
- className='is-auto flex-auto'
- >
- Continue
-
-
- )}
-
-
-
- ))}
-
- ) : (
- No courses found
- )}
-
-
setActivePage(page - 1)}
- />
-
-
-
- )
-}
-
-export default Courses
diff --git a/src/views/apps/academy/my-courses/FreeCourses.tsx b/src/views/apps/academy/my-courses/FreeCourses.tsx
deleted file mode 100644
index cdbb8b0..0000000
--- a/src/views/apps/academy/my-courses/FreeCourses.tsx
+++ /dev/null
@@ -1,94 +0,0 @@
-// MUI Imports
-import Grid from '@mui/material/Grid2'
-import Card from '@mui/material/Card'
-import CardContent from '@mui/material/CardContent'
-import Button from '@mui/material/Button'
-import Typography from '@mui/material/Typography'
-
-// Third-party Imports
-import ReactPlayer from '@/libs/ReactPlayer'
-
-// Components Imports
-import CustomAvatar from '@core/components/mui/Avatar'
-import CustomIconButton from '@core/components/mui/IconButton'
-
-const FreeCourses = () => {
- return (
-
-
-
-
-
-
-
-
- Today's Free Courses
-
- We offers 284 Free Online courses from top tutors and companies to help you start or advance your career
- skills. Learn online for free and fast today!
-
- Get Premium Courses
-
-
-
-
-
-
- }
- playIcon={
-
-
-
- }
- />
-
-
- Your First Singing Lesson
-
- In the same way as any other artistic domain, singing lends itself perfectly to self-teaching.
-
-
-
-
-
-
-
-
- }
- playIcon={
-
-
-
- }
- />
-
-
- Guitar for Beginners
-
- The Fender Acoustic Guitar is the best choice for both beginners and professionals offering a great
- sound.
-
-
-
-
-
-
-
- )
-}
-
-export default FreeCourses
diff --git a/src/views/apps/academy/my-courses/MyCourseHeader.tsx b/src/views/apps/academy/my-courses/MyCourseHeader.tsx
deleted file mode 100644
index ccdd8ac..0000000
--- a/src/views/apps/academy/my-courses/MyCourseHeader.tsx
+++ /dev/null
@@ -1,70 +0,0 @@
-// MUI Imports
-import Card from '@mui/material/Card'
-import Typography from '@mui/material/Typography'
-import { useTheme } from '@mui/material/styles'
-
-// Third-party Imports
-import classnames from 'classnames'
-
-// Type Imports
-import type { Mode } from '@core/types'
-
-// Component Imports
-import CustomIconButton from '@core/components/mui/IconButton'
-import CustomTextField from '@core/components/mui/TextField'
-
-// Hook Imports
-import { useImageVariant } from '@core/hooks/useImageVariant'
-
-type Props = {
- mode: Mode
- searchValue: string
- setSearchValue: (value: string) => void
-}
-
-const MyCourseHeader = (props: Props) => {
- // Props
- const { mode, searchValue, setSearchValue } = props
-
- // Vars
- const lightIllustration = '/images/apps/academy/hand-with-bulb-light.png'
- const darkIllustration = '/images/apps/academy/hand-with-bulb-dark.png'
-
- // Hooks
- const theme = useTheme()
- const leftIllustration = useImageVariant(mode, lightIllustration, darkIllustration)
-
- return (
-
-
-
-
- Education, talents, and career opportunities. All in one place.
-
-
- Grow your skill with the most reliable online courses and certifications in marketing, information technology,
- programming, and data science.
-
-
- setSearchValue(e.target.value)}
- className='sm:is-[350px] max-sm:flex-1'
- />
-
-
-
-
-
-
-
- )
-}
-
-export default MyCourseHeader
diff --git a/src/views/apps/academy/my-courses/index.tsx b/src/views/apps/academy/my-courses/index.tsx
deleted file mode 100644
index cf79754..0000000
--- a/src/views/apps/academy/my-courses/index.tsx
+++ /dev/null
@@ -1,46 +0,0 @@
-'use client'
-
-// React Imports
-import { useState } from 'react'
-
-// MUI Imports
-import Grid from '@mui/material/Grid2'
-
-// Type Imports
-import type { Mode } from '@core/types'
-import type { Course } from '@/types/apps/academyTypes'
-
-// Component Imports
-import MyCourseHeader from './MyCourseHeader'
-import Courses from './Courses'
-import ColoredCards from './ColoredCards'
-import FreeCourses from './FreeCourses'
-
-type Props = {
- courseData?: Course[]
- mode: Mode
-}
-
-const AcademyMyCourse = ({ courseData, mode }: Props) => {
- // States
- const [searchValue, setSearchValue] = useState('')
-
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- )
-}
-
-export default AcademyMyCourse
diff --git a/src/views/apps/calendar/AddEventSidebar.tsx b/src/views/apps/calendar/AddEventSidebar.tsx
deleted file mode 100644
index d095acc..0000000
--- a/src/views/apps/calendar/AddEventSidebar.tsx
+++ /dev/null
@@ -1,359 +0,0 @@
-// React Imports
-import { useState, useEffect, forwardRef, useCallback } from 'react'
-
-// MUI Imports
-import Box from '@mui/material/Box'
-import Drawer from '@mui/material/Drawer'
-import Switch from '@mui/material/Switch'
-import Button from '@mui/material/Button'
-import MenuItem from '@mui/material/MenuItem'
-import IconButton from '@mui/material/IconButton'
-import Typography from '@mui/material/Typography'
-import useMediaQuery from '@mui/material/useMediaQuery'
-import FormControl from '@mui/material/FormControl'
-import FormControlLabel from '@mui/material/FormControlLabel'
-import type { SelectChangeEvent } from '@mui/material/Select'
-import type { Theme } from '@mui/material/styles'
-
-// Third-party Imports
-import { useForm, Controller } from 'react-hook-form'
-import PerfectScrollbar from 'react-perfect-scrollbar'
-
-// Type Imports
-import type { AddEventSidebarType, AddEventType } from '@/types/apps/calendarTypes'
-
-// Component Imports
-import CustomTextField from '@core/components/mui/TextField'
-
-// Styled Component Imports
-import AppReactDatepicker from '@/libs/styles/AppReactDatepicker'
-
-// Slice Imports
-import { addEvent, deleteEvent, updateEvent, selectedEvent, filterEvents } from '@/redux-store/slices/calendar'
-
-interface PickerProps {
- label?: string
- error?: boolean
- registername?: string
-}
-
-interface DefaultStateType {
- url: string
- title: string
- allDay: boolean
- calendar: string
- description: string
- endDate: Date
- startDate: Date
- guests: string[] | undefined
-}
-
-// Vars
-const capitalize = (string: string) => string && string[0].toUpperCase() + string.slice(1)
-
-// Vars
-const defaultState: DefaultStateType = {
- url: '',
- title: '',
- guests: [],
- allDay: true,
- description: '',
- endDate: new Date(),
- calendar: 'Business',
- startDate: new Date()
-}
-
-const AddEventSidebar = (props: AddEventSidebarType) => {
- // Props
- const { calendarStore, dispatch, addEventSidebarOpen, handleAddEventSidebarToggle } = props
-
- // States
- const [values, setValues] = useState(defaultState)
-
- // Refs
- const PickersComponent = forwardRef(({ ...props }: PickerProps, ref) => {
- return (
-
- )
- })
-
- // Hooks
- const isBelowSmScreen = useMediaQuery((theme: Theme) => theme.breakpoints.down('sm'))
-
- const {
- control,
- setValue,
- clearErrors,
- handleSubmit,
- formState: { errors }
- } = useForm({ defaultValues: { title: '' } })
-
- const resetToStoredValues = useCallback(() => {
- if (calendarStore.selectedEvent !== null) {
- const event = calendarStore.selectedEvent
-
- setValue('title', event.title || '')
- setValues({
- url: event.url || '',
- title: event.title || '',
- allDay: event.allDay,
- guests: event.extendedProps.guests || [],
- description: event.extendedProps.description || '',
- calendar: event.extendedProps.calendar || 'Business',
- endDate: event.end !== null ? event.end : event.start,
- startDate: event.start !== null ? event.start : new Date()
- })
- }
- }, [setValue, calendarStore.selectedEvent])
-
- const resetToEmptyValues = useCallback(() => {
- setValue('title', '')
- setValues(defaultState)
- }, [setValue])
-
- const handleSidebarClose = () => {
- setValues(defaultState)
- clearErrors()
- dispatch(selectedEvent(null))
- handleAddEventSidebarToggle()
- }
-
- const onSubmit = (data: { title: string }) => {
- const modifiedEvent: AddEventType = {
- url: values.url,
- display: 'block',
- title: data.title,
- end: values.endDate,
- allDay: values.allDay,
- start: values.startDate,
- extendedProps: {
- calendar: capitalize(values.calendar),
- guests: values.guests && values.guests.length ? values.guests : undefined,
- description: values.description.length ? values.description : undefined
- }
- }
-
- if (
- calendarStore.selectedEvent === null ||
- (calendarStore.selectedEvent !== null && !calendarStore.selectedEvent.title.length)
- ) {
- dispatch(addEvent(modifiedEvent))
- } else {
- dispatch(updateEvent({ ...modifiedEvent, id: calendarStore.selectedEvent.id }))
- }
-
- dispatch(filterEvents())
-
- handleSidebarClose()
- }
-
- const handleDeleteButtonClick = () => {
- if (calendarStore.selectedEvent) {
- dispatch(deleteEvent(calendarStore.selectedEvent.id))
- dispatch(filterEvents())
- }
-
- // calendarApi.getEventById(calendarStore.selectedEvent.id).remove()
- handleSidebarClose()
- }
-
- const handleStartDate = (date: Date | null) => {
- if (date && date > values.endDate) {
- setValues({ ...values, startDate: new Date(date), endDate: new Date(date) })
- }
- }
-
- const RenderSidebarFooter = () => {
- if (
- calendarStore.selectedEvent === null ||
- (calendarStore.selectedEvent && !calendarStore.selectedEvent.title.length)
- ) {
- return (
-
-
- Add
-
-
- Reset
-
-
- )
- } else {
- return (
-
-
- Update
-
-
- Reset
-
-
- )
- }
- }
-
- const ScrollWrapper = isBelowSmScreen ? 'div' : PerfectScrollbar
-
- useEffect(() => {
- if (calendarStore.selectedEvent !== null) {
- resetToStoredValues()
- } else {
- resetToEmptyValues()
- }
- }, [addEventSidebarOpen, resetToStoredValues, resetToEmptyValues, calendarStore.selectedEvent])
-
- return (
-
-
-
- {calendarStore.selectedEvent && calendarStore.selectedEvent.title.length ? 'Update Event' : 'Add Event'}
-
- {calendarStore.selectedEvent && calendarStore.selectedEvent.title.length ? (
-
-
-
-
-
-
-
-
- ) : (
-
-
-
- )}
-
-
-
-
-
-
-
- )
-}
-
-export default AddEventSidebar
diff --git a/src/views/apps/calendar/Calendar.tsx b/src/views/apps/calendar/Calendar.tsx
deleted file mode 100644
index 48046e9..0000000
--- a/src/views/apps/calendar/Calendar.tsx
+++ /dev/null
@@ -1,193 +0,0 @@
-// React Imports
-import { useEffect, useRef } from 'react'
-
-// MUI Imports
-import { useTheme } from '@mui/material/styles'
-
-// Third-party imports
-import type { Dispatch } from '@reduxjs/toolkit'
-import 'bootstrap-icons/font/bootstrap-icons.css'
-
-import FullCalendar from '@fullcalendar/react'
-import listPlugin from '@fullcalendar/list'
-import dayGridPlugin from '@fullcalendar/daygrid'
-import timeGridPlugin from '@fullcalendar/timegrid'
-import interactionPlugin from '@fullcalendar/interaction'
-import type { CalendarOptions } from '@fullcalendar/core'
-
-// Type Imports
-import type { AddEventType, CalendarColors, CalendarType } from '@/types/apps/calendarTypes'
-
-// Slice Imports
-import { filterEvents, selectedEvent, updateEvent } from '@/redux-store/slices/calendar'
-
-type CalenderProps = {
- calendarStore: CalendarType
- calendarApi: any
- setCalendarApi: (val: any) => void
- calendarsColor: CalendarColors
- dispatch: Dispatch
- handleLeftSidebarToggle: () => void
- handleAddEventSidebarToggle: () => void
-}
-
-const blankEvent: AddEventType = {
- title: '',
- start: '',
- end: '',
- allDay: false,
- url: '',
- extendedProps: {
- calendar: '',
- guests: [],
- description: ''
- }
-}
-
-const Calendar = (props: CalenderProps) => {
- // Props
- const {
- calendarStore,
- calendarApi,
- setCalendarApi,
- calendarsColor,
- dispatch,
- handleAddEventSidebarToggle,
- handleLeftSidebarToggle
- } = props
-
- // Refs
- const calendarRef = useRef()
-
- // Hooks
- const theme = useTheme()
-
- useEffect(() => {
- if (calendarApi === null) {
- // @ts-ignore
- setCalendarApi(calendarRef.current?.getApi())
- }
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [])
-
- // calendarOptions(Props)
- const calendarOptions: CalendarOptions = {
- events: calendarStore.events,
- plugins: [interactionPlugin, dayGridPlugin, timeGridPlugin, listPlugin],
- initialView: 'dayGridMonth',
- headerToolbar: {
- start: 'sidebarToggle, prev, next, title',
- end: 'dayGridMonth,timeGridWeek,timeGridDay,listMonth'
- },
- views: {
- week: {
- titleFormat: { year: 'numeric', month: 'short', day: 'numeric' }
- }
- },
-
- /*
- Enable dragging and resizing event
- ? Docs: https://fullcalendar.io/docs/editable
- */
- editable: true,
-
- /*
- Enable resizing event from start
- ? Docs: https://fullcalendar.io/docs/eventResizableFromStart
- */
- eventResizableFromStart: true,
-
- /*
- Automatically scroll the scroll-containers during event drag-and-drop and date selecting
- ? Docs: https://fullcalendar.io/docs/dragScroll
- */
- dragScroll: true,
-
- /*
- Max number of events within a given day
- ? Docs: https://fullcalendar.io/docs/dayMaxEvents
- */
- dayMaxEvents: 2,
-
- /*
- Determines if day names and week names are clickable
- ? Docs: https://fullcalendar.io/docs/navLinks
- */
- navLinks: true,
-
- eventClassNames({ event: calendarEvent }: any) {
- // @ts-ignore
- const colorName = calendarsColor[calendarEvent._def.extendedProps.calendar]
-
- return [
- // Background Color
- `event-bg-${colorName}`
- ]
- },
-
- eventClick({ event: clickedEvent, jsEvent }: any) {
- jsEvent.preventDefault()
-
- dispatch(selectedEvent(clickedEvent))
- handleAddEventSidebarToggle()
-
- if (clickedEvent.url) {
- // Open the URL in a new tab
- window.open(clickedEvent.url, '_blank')
- }
-
- //* Only grab required field otherwise it goes in infinity loop
- //! Always grab all fields rendered by form (even if it get `undefined`)
- // event.value = grabEventDataFromEventApi(clickedEvent)
- // isAddNewEventSidebarActive.value = true
- },
-
- customButtons: {
- sidebarToggle: {
- icon: 'tabler tabler-menu-2',
- click() {
- handleLeftSidebarToggle()
- }
- }
- },
-
- dateClick(info: any) {
- const ev = { ...blankEvent }
-
- ev.start = info.date
- ev.end = info.date
- ev.allDay = true
-
- dispatch(selectedEvent(ev))
- handleAddEventSidebarToggle()
- },
-
- /*
- Handle event drop (Also include dragged event)
- ? Docs: https://fullcalendar.io/docs/eventDrop
- ? We can use `eventDragStop` but it doesn't return updated event so we have to use `eventDrop` which returns updated event
- */
- eventDrop({ event: droppedEvent }: any) {
- dispatch(updateEvent(droppedEvent))
- dispatch(filterEvents())
- },
-
- /*
- Handle event resize
- ? Docs: https://fullcalendar.io/docs/eventResize
- */
- eventResize({ event: resizedEvent }: any) {
- dispatch(updateEvent(resizedEvent))
- dispatch(filterEvents())
- },
-
- // @ts-ignore
- ref: calendarRef,
-
- direction: theme.direction
- }
-
- return
-}
-
-export default Calendar
diff --git a/src/views/apps/calendar/CalendarWrapper.tsx b/src/views/apps/calendar/CalendarWrapper.tsx
deleted file mode 100644
index 59fd5cd..0000000
--- a/src/views/apps/calendar/CalendarWrapper.tsx
+++ /dev/null
@@ -1,79 +0,0 @@
-'use client'
-
-// React Imports
-import { useState } from 'react'
-
-// MUI Imports
-import { useMediaQuery } from '@mui/material'
-import type { Theme } from '@mui/material/styles'
-
-// Third-party Imports
-import { useDispatch, useSelector } from 'react-redux'
-
-// Type Imports
-import type { CalendarColors, CalendarType } from '@/types/apps/calendarTypes'
-
-// Component Imports
-import Calendar from './Calendar'
-import SidebarLeft from './SidebarLeft'
-import AddEventSidebar from './AddEventSidebar'
-
-// CalendarColors Object
-const calendarsColor: CalendarColors = {
- Personal: 'error',
- Business: 'primary',
- Family: 'warning',
- Holiday: 'success',
- ETC: 'info'
-}
-
-const AppCalendar = () => {
- // States
- const [calendarApi, setCalendarApi] = useState(null)
- const [leftSidebarOpen, setLeftSidebarOpen] = useState(false)
- const [addEventSidebarOpen, setAddEventSidebarOpen] = useState(false)
-
- // Hooks
- const dispatch = useDispatch()
- const calendarStore = useSelector((state: { calendarReducer: CalendarType }) => state.calendarReducer)
- const mdAbove = useMediaQuery((theme: Theme) => theme.breakpoints.up('md'))
-
- const handleLeftSidebarToggle = () => setLeftSidebarOpen(!leftSidebarOpen)
-
- const handleAddEventSidebarToggle = () => setAddEventSidebarOpen(!addEventSidebarOpen)
-
- return (
- <>
-
-
-
-
-
- >
- )
-}
-
-export default AppCalendar
diff --git a/src/views/apps/calendar/SidebarLeft.tsx b/src/views/apps/calendar/SidebarLeft.tsx
deleted file mode 100644
index e181182..0000000
--- a/src/views/apps/calendar/SidebarLeft.tsx
+++ /dev/null
@@ -1,137 +0,0 @@
-// MUI Imports
-import Button from '@mui/material/Button'
-import Drawer from '@mui/material/Drawer'
-import Divider from '@mui/material/Divider'
-import Checkbox from '@mui/material/Checkbox'
-import Typography from '@mui/material/Typography'
-import FormControlLabel from '@mui/material/FormControlLabel'
-
-// Third-party imports
-import classnames from 'classnames'
-
-// Types Imports
-import type { SidebarLeftProps, CalendarFiltersType } from '@/types/apps/calendarTypes'
-import type { ThemeColor } from '@core/types'
-
-// Styled Component Imports
-import AppReactDatepicker from '@/libs/styles/AppReactDatepicker'
-
-// Slice Imports
-import { filterAllCalendarLabels, filterCalendarLabel, selectedEvent } from '@/redux-store/slices/calendar'
-
-const SidebarLeft = (props: SidebarLeftProps) => {
- // Props
- const {
- mdAbove,
- leftSidebarOpen,
- calendarStore,
- calendarsColor,
- calendarApi,
- dispatch,
- handleLeftSidebarToggle,
- handleAddEventSidebarToggle
- } = props
-
- // Vars
- const colorsArr = calendarsColor ? Object.entries(calendarsColor) : []
-
- const renderFilters = colorsArr.length
- ? colorsArr.map(([key, value]: string[]) => {
- return (
- -1}
- onChange={() => dispatch(filterCalendarLabel(key as CalendarFiltersType))}
- />
- }
- />
- )
- })
- : null
-
- const handleSidebarToggleSidebar = () => {
- dispatch(selectedEvent(null))
- handleAddEventSidebarToggle()
- }
-
- if (renderFilters) {
- return (
-
-
- }
- >
- Add Event
-
-
-
- calendarApi.gotoDate(date)}
- boxProps={{
- className: 'flex justify-center is-full',
- sx: { '& .react-datepicker': { boxShadow: 'none !important', border: 'none !important' } }
- }}
- />
-
-
-
-
- Event Filters
-
- dispatch(filterAllCalendarLabels(e.target.checked))}
- />
- }
- />
- {renderFilters}
-
-
- )
- } else {
- return null
- }
-}
-
-export default SidebarLeft
diff --git a/src/views/apps/chat/AvatarWithBadge.tsx b/src/views/apps/chat/AvatarWithBadge.tsx
deleted file mode 100644
index 6b385f0..0000000
--- a/src/views/apps/chat/AvatarWithBadge.tsx
+++ /dev/null
@@ -1,72 +0,0 @@
-// React Imports
-import type { MouseEvent, RefObject } from 'react'
-
-// MUI Imports
-import Badge from '@mui/material/Badge'
-import Avatar from '@mui/material/Avatar'
-import { styled } from '@mui/material/styles'
-
-// Third-party Imports
-import classnames from 'classnames'
-
-// Type Imports
-import type { ThemeColor } from '@core/types'
-
-// Component Imports
-import CustomAvatar from '@core/components/mui/Avatar'
-
-// Util Imports
-import { getInitials } from '@/utils/getInitials'
-
-const BadgeContentSpan = styled('span', {
- name: 'MuiBadgeContentSpan'
-})<{ color: ThemeColor; badgeSize: number }>(({ color, badgeSize }) => ({
- width: badgeSize,
- height: badgeSize,
- borderRadius: '50%',
- cursor: 'pointer',
- backgroundColor: `var(--mui-palette-${color}-main)`,
- boxShadow: '0 0 0 2px var(--mui-palette-background-paper)'
-}))
-
-type AvatarWithBadgeProps = {
- ref?: RefObject
- alt?: string
- src?: string
- color?: ThemeColor
- badgeColor?: ThemeColor
- isChatActive?: boolean
- onClick?: (e: MouseEvent) => void
- className?: string
- badgeSize?: number
-}
-
-const AvatarWithBadge = (props: AvatarWithBadgeProps) => {
- // Props
- const { ref, alt, src, color, badgeColor, isChatActive, onClick, className, badgeSize } = props
-
- return (
- }
- anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}
- >
- {src ? (
-
- ) : (
-
- {alt && getInitials(alt)}
-
- )}
-
- )
-}
-
-export default AvatarWithBadge
diff --git a/src/views/apps/chat/ChatContent.tsx b/src/views/apps/chat/ChatContent.tsx
deleted file mode 100644
index c82b322..0000000
--- a/src/views/apps/chat/ChatContent.tsx
+++ /dev/null
@@ -1,227 +0,0 @@
-// React Imports
-import { useEffect, useState } from 'react'
-import type { RefObject } from 'react'
-
-// MUI Imports
-import Button from '@mui/material/Button'
-import Typography from '@mui/material/Typography'
-import IconButton from '@mui/material/IconButton'
-import CardContent from '@mui/material/CardContent'
-
-// Type Imports
-import type { AppDispatch } from '@/redux-store'
-import type { ChatDataType, ContactType } from '@/types/apps/chatTypes'
-
-// Component Imports
-import OptionMenu from '@core/components/option-menu'
-import AvatarWithBadge from './AvatarWithBadge'
-import { statusObj } from './SidebarLeft'
-import ChatLog from './ChatLog'
-import SendMsgForm from './SendMsgForm'
-import UserProfileRight from './UserProfileRight'
-import CustomAvatar from '@core/components/mui/Avatar'
-
-type Props = {
- chatStore: ChatDataType
- dispatch: AppDispatch
- backdropOpen: boolean
- setBackdropOpen: (open: boolean) => void
- setSidebarOpen: (open: boolean) => void
- isBelowMdScreen: boolean
- isBelowLgScreen: boolean
- isBelowSmScreen: boolean
- messageInputRef: RefObject
-}
-
-// Renders the user avatar with badge and user information
-const UserAvatar = ({
- activeUser,
- setUserProfileLeftOpen,
- setBackdropOpen
-}: {
- activeUser: ContactType
- setUserProfileLeftOpen: (open: boolean) => void
- setBackdropOpen: (open: boolean) => void
-}) => (
- {
- setUserProfileLeftOpen(true)
- setBackdropOpen(true)
- }}
- >
-
-
- {activeUser?.fullName}
- {activeUser?.role}
-
-
-)
-
-const ChatContent = (props: Props) => {
- // Props
- const {
- chatStore,
- dispatch,
- backdropOpen,
- setBackdropOpen,
- setSidebarOpen,
- isBelowMdScreen,
- isBelowSmScreen,
- isBelowLgScreen,
- messageInputRef
- } = props
-
- // States
- const [userProfileRightOpen, setUserProfileRightOpen] = useState(false)
-
- // Vars
- const { activeUser } = chatStore
-
- useEffect(() => {
- if (!backdropOpen && userProfileRightOpen) {
- setUserProfileRightOpen(false)
- }
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [backdropOpen])
-
- return !chatStore.activeUser ? (
-
-
-
-
- Select a contact to start a conversation.
- {isBelowMdScreen && (
- {
- setSidebarOpen(true)
- isBelowSmScreen ? setBackdropOpen(false) : setBackdropOpen(true)
- }}
- >
- Select Contact
-
- )}
-
- ) : (
- <>
- {activeUser && (
-
-
- {isBelowMdScreen ? (
-
- {
- setSidebarOpen(true)
- setBackdropOpen(true)
- }}
- >
-
-
-
-
- ) : (
-
- )}
- {isBelowMdScreen ? (
-
{
- setUserProfileRightOpen(true)
- setBackdropOpen(true)
- }
- }
- },
- 'Mute Notifications',
- 'Block Contact',
- 'Clear Chat',
- 'Block'
- ]}
- />
- ) : (
-
-
-
-
-
-
-
-
-
-
- {
- setUserProfileRightOpen(true)
- setBackdropOpen(true)
- }
- }
- },
- 'Mute Notifications',
- 'Block Contact',
- 'Clear Chat',
- 'Block'
- ]}
- />
-
- )}
-
-
-
-
-
-
- )}
-
- {activeUser && (
- {
- setUserProfileRightOpen(false)
- setBackdropOpen(false)
- }}
- activeUser={activeUser}
- isBelowSmScreen={isBelowSmScreen}
- isBelowLgScreen={isBelowLgScreen}
- />
- )}
- >
- )
-}
-
-export default ChatContent
diff --git a/src/views/apps/chat/ChatLog.tsx b/src/views/apps/chat/ChatLog.tsx
deleted file mode 100644
index 36b83e1..0000000
--- a/src/views/apps/chat/ChatLog.tsx
+++ /dev/null
@@ -1,230 +0,0 @@
-// React Imports
-import { useRef, useEffect } from 'react'
-import type { MutableRefObject, ReactNode } from 'react'
-
-// MUI Imports
-import Typography from '@mui/material/Typography'
-import Avatar from '@mui/material/Avatar'
-import CardContent from '@mui/material/CardContent'
-
-// Third-party Imports
-import classnames from 'classnames'
-import PerfectScrollbar from 'react-perfect-scrollbar'
-
-// Type Imports
-import type { ChatType, ChatDataType, UserChatType, ProfileUserType } from '@/types/apps/chatTypes'
-
-// Component Imports
-import CustomAvatar from '@core/components/mui/Avatar'
-
-// Util Imports
-import { getInitials } from '@/utils/getInitials'
-
-type MsgGroupType = {
- senderId: number
- messages: Omit[]
-}
-
-type ChatLogProps = {
- chatStore: ChatDataType
- isBelowLgScreen: boolean
- isBelowMdScreen: boolean
- isBelowSmScreen: boolean
-}
-
-// Formats the chat data into a structured format for display.
-const formatedChatData = (chats: ChatType['chat'], profileUser: ProfileUserType) => {
- const formattedChatData: MsgGroupType[] = []
- let chatMessageSenderId = chats[0] ? chats[0].senderId : profileUser.id
- let msgGroup: MsgGroupType = {
- senderId: chatMessageSenderId,
- messages: []
- }
-
- chats.forEach((chat, index) => {
- if (chatMessageSenderId === chat.senderId) {
- msgGroup.messages.push({
- time: chat.time,
- message: chat.message,
- msgStatus: chat.msgStatus
- })
- } else {
- chatMessageSenderId = chat.senderId
-
- formattedChatData.push(msgGroup)
- msgGroup = {
- senderId: chat.senderId,
- messages: [
- {
- time: chat.time,
- message: chat.message,
- msgStatus: chat.msgStatus
- }
- ]
- }
- }
-
- if (index === chats.length - 1) formattedChatData.push(msgGroup)
- })
-
- return formattedChatData
-}
-
-// Wrapper for the chat log to handle scrolling
-const ScrollWrapper = ({
- children,
- isBelowLgScreen,
- scrollRef,
- className
-}: {
- children: ReactNode
- isBelowLgScreen: boolean
- scrollRef: MutableRefObject
- className?: string
-}) => {
- if (isBelowLgScreen) {
- return (
-
- {children}
-
- )
- } else {
- return (
-
- {children}
-
- )
- }
-}
-
-const ChatLog = ({ chatStore, isBelowLgScreen, isBelowMdScreen, isBelowSmScreen }: ChatLogProps) => {
- // Props
- const { profileUser, contacts } = chatStore
-
- // Vars
- const activeUserChat = chatStore.chats.find((chat: ChatType) => chat.userId === chatStore.activeUser?.id)
-
- // Refs
- const scrollRef = useRef(null)
-
- // Function to scroll to bottom when new message is sent
- const scrollToBottom = () => {
- if (scrollRef.current) {
- if (isBelowLgScreen) {
- // @ts-ignore
- scrollRef.current.scrollTop = scrollRef.current.scrollHeight
- } else {
- // @ts-ignore
- scrollRef.current._container.scrollTop = scrollRef.current._container.scrollHeight
- }
- }
- }
-
- // Scroll to bottom on new message
- useEffect(() => {
- if (activeUserChat && activeUserChat.chat && activeUserChat.chat.length) {
- scrollToBottom()
- }
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [chatStore])
-
- return (
-
-
- {activeUserChat &&
- formatedChatData(activeUserChat.chat, profileUser).map((msgGroup, index) => {
- const isSender = msgGroup.senderId === profileUser.id
-
- return (
-
- {!isSender ? (
- contacts.find(contact => contact.id === activeUserChat?.userId)?.avatar ? (
-
contact.id === activeUserChat?.userId)?.fullName}
- src={contacts.find(contact => contact.id === activeUserChat?.userId)?.avatar}
- className='is-8 bs-8'
- />
- ) : (
- contact.id === activeUserChat?.userId)?.avatarColor}
- skin='light'
- size={32}
- >
- {getInitials(contacts.find(contact => contact.id === activeUserChat?.userId)?.fullName as string)}
-
- )
- ) : profileUser.avatar ? (
-
- ) : (
-
- )}
-
- {msgGroup.messages.map((msg, index) => (
-
- {msg.message}
-
- ))}
- {msgGroup.messages.map(
- (msg, index) =>
- index === msgGroup.messages.length - 1 &&
- (isSender ? (
-
- {msg.msgStatus?.isSeen ? (
-
- ) : msg.msgStatus?.isDelivered ? (
-
- ) : (
- msg.msgStatus?.isSent &&
- )}
- {index === activeUserChat.chat.length - 1 ? (
-
- {new Date().toLocaleString('en-US', { hour: 'numeric', minute: 'numeric', hour12: true })}
-
- ) : msg.time ? (
-
- {new Date(msg.time).toLocaleString('en-US', {
- hour: 'numeric',
- minute: 'numeric',
- hour12: true
- })}
-
- ) : null}
-
- ) : index === activeUserChat.chat.length - 1 ? (
-
- {new Date().toLocaleString('en-US', { hour: 'numeric', minute: 'numeric', hour12: true })}
-
- ) : msg.time ? (
-
- {new Date(msg.time).toLocaleString('en-US', {
- hour: 'numeric',
- minute: 'numeric',
- hour12: true
- })}
-
- ) : null)
- )}
-
-
- )
- })}
-
-
- )
-}
-
-export default ChatLog
diff --git a/src/views/apps/chat/SendMsgForm.tsx b/src/views/apps/chat/SendMsgForm.tsx
deleted file mode 100644
index 450d5f0..0000000
--- a/src/views/apps/chat/SendMsgForm.tsx
+++ /dev/null
@@ -1,241 +0,0 @@
-// React Imports
-import { useRef, useState, useEffect } from 'react'
-import type { FormEvent, KeyboardEvent, RefObject, MouseEvent } from 'react'
-
-// MUI Imports
-import TextField from '@mui/material/TextField'
-import Button from '@mui/material/Button'
-import IconButton from '@mui/material/IconButton'
-import Popper from '@mui/material/Popper'
-import Fade from '@mui/material/Fade'
-import Paper from '@mui/material/Paper'
-import ClickAwayListener from '@mui/material/ClickAwayListener'
-import Menu from '@mui/material/Menu'
-import MenuItem from '@mui/material/MenuItem'
-
-// Third-party Imports
-import Picker from '@emoji-mart/react'
-import data from '@emoji-mart/data'
-
-// Type Imports
-import type { ContactType } from '@/types/apps/chatTypes'
-import type { AppDispatch } from '@/redux-store'
-
-// Slice Imports
-import { sendMsg } from '@/redux-store/slices/chat'
-
-// Component Imports
-import CustomIconButton from '@core/components/mui/IconButton'
-
-type Props = {
- dispatch: AppDispatch
- activeUser: ContactType
- isBelowSmScreen: boolean
- messageInputRef: RefObject
-}
-
-// Emoji Picker Component for selecting emojis
-const EmojiPicker = ({
- onChange,
- isBelowSmScreen,
- openEmojiPicker,
- setOpenEmojiPicker,
- anchorRef
-}: {
- onChange: (value: string) => void
- isBelowSmScreen: boolean
- openEmojiPicker: boolean
- setOpenEmojiPicker: (value: boolean | ((prevVar: boolean) => boolean)) => void
- anchorRef: RefObject
-}) => {
- return (
- <>
-
- {({ TransitionProps, placement }) => (
-
-
- setOpenEmojiPicker(false)}>
-
- {
- onChange(emoji.native)
- setOpenEmojiPicker(false)
- }}
- {...(isBelowSmScreen && { perLine: 8 })}
- />
-
-
-
-
- )}
-
- >
- )
-}
-
-const SendMsgForm = ({ dispatch, activeUser, isBelowSmScreen, messageInputRef }: Props) => {
- // States
- const [msg, setMsg] = useState('')
- const [anchorEl, setAnchorEl] = useState(null)
- const [openEmojiPicker, setOpenEmojiPicker] = useState(false)
-
- // Refs
- const anchorRef = useRef(null)
-
- // Vars
- const open = Boolean(anchorEl)
-
- const handleToggle = () => {
- setOpenEmojiPicker(prevOpen => !prevOpen)
- }
-
- const handleClick = (event: MouseEvent) => {
- setAnchorEl(prev => (prev ? null : event.currentTarget))
- }
-
- const handleClose = () => {
- setAnchorEl(null)
- }
-
- const handleSendMsg = (event: FormEvent | KeyboardEvent, msg: string) => {
- event.preventDefault()
-
- if (msg.trim() !== '') {
- dispatch(sendMsg({ msg }))
- setMsg('')
- }
- }
-
- const handleInputEndAdornment = () => {
- return (
-
- {isBelowSmScreen ? (
- <>
-
-
- {
- handleToggle()
- handleClose()
- }}
- >
-
-
-
-
-
-
-
-
-
-
-
-
- {
- setMsg(msg + value)
-
- if (messageInputRef.current) {
- messageInputRef.current.focus()
- }
- }}
- />
- >
- ) : (
- <>
-
-
-
- {
- setMsg(msg + value)
-
- if (messageInputRef.current) {
- messageInputRef.current.focus()
- }
- }}
- />
-
-
-
-
-
-
-
- >
- )}
- {isBelowSmScreen ? (
-
-
-
- ) : (
- }>
- Send
-
- )}
-
- )
- }
-
- useEffect(() => {
- setMsg('')
- }, [activeUser.id])
-
- return (
-
- )
-}
-
-export default SendMsgForm
diff --git a/src/views/apps/chat/SidebarLeft.tsx b/src/views/apps/chat/SidebarLeft.tsx
deleted file mode 100644
index e8d3e16..0000000
--- a/src/views/apps/chat/SidebarLeft.tsx
+++ /dev/null
@@ -1,293 +0,0 @@
-// React Imports
-import { useState } from 'react'
-import type { ReactNode, RefObject } from 'react'
-
-// MUI Imports
-import Avatar from '@mui/material/Avatar'
-import Drawer from '@mui/material/Drawer'
-import Typography from '@mui/material/Typography'
-import Autocomplete from '@mui/material/Autocomplete'
-import InputAdornment from '@mui/material/InputAdornment'
-import IconButton from '@mui/material/IconButton'
-
-// Third-party Imports
-import classnames from 'classnames'
-import PerfectScrollbar from 'react-perfect-scrollbar'
-
-// Type Imports
-import type { ThemeColor } from '@core/types'
-import type { ChatDataType, StatusObjType } from '@/types/apps/chatTypes'
-import type { AppDispatch } from '@/redux-store'
-
-// Slice Imports
-import { addNewChat } from '@/redux-store/slices/chat'
-
-// Component Imports
-import CustomAvatar from '@core/components/mui/Avatar'
-import CustomChip from '@core/components/mui/Chip'
-import UserProfileLeft from './UserProfileLeft'
-import AvatarWithBadge from './AvatarWithBadge'
-import CustomTextField from '@core/components/mui/TextField'
-
-// Util Imports
-import { getInitials } from '@/utils/getInitials'
-import { formatDateToMonthShort } from './utils'
-
-export const statusObj: StatusObjType = {
- busy: 'error',
- away: 'warning',
- online: 'success',
- offline: 'secondary'
-}
-
-type Props = {
- chatStore: ChatDataType
- getActiveUserData: (id: number) => void
- dispatch: AppDispatch
- backdropOpen: boolean
- setBackdropOpen: (value: boolean) => void
- sidebarOpen: boolean
- setSidebarOpen: (value: boolean) => void
- isBelowLgScreen: boolean
- isBelowMdScreen: boolean
- isBelowSmScreen: boolean
- messageInputRef: RefObject
-}
-
-type RenderChatType = {
- chatStore: ChatDataType
- getActiveUserData: (id: number) => void
- setSidebarOpen: (value: boolean) => void
- backdropOpen: boolean
- setBackdropOpen: (value: boolean) => void
- isBelowMdScreen: boolean
-}
-
-// Render chat list
-const renderChat = (props: RenderChatType) => {
- // Props
- const { chatStore, getActiveUserData, setSidebarOpen, backdropOpen, setBackdropOpen, isBelowMdScreen } = props
-
- return chatStore.chats.map(chat => {
- const contact = chatStore.contacts.find(contact => contact.id === chat.userId) || chatStore.contacts[0]
- const isChatActive = chatStore.activeUser?.id === contact.id
-
- return (
- {
- getActiveUserData(chat.userId)
- isBelowMdScreen && setSidebarOpen(false)
- isBelowMdScreen && backdropOpen && setBackdropOpen(false)
- }}
- >
-
-
- {contact?.fullName}
- {chat.chat.length ? (
-
- {chat.chat[chat.chat.length - 1].message}
-
- ) : (
-
- {contact.role}
-
- )}
-
-
-
- {chat.chat.length ? formatDateToMonthShort(chat.chat[chat.chat.length - 1].time) : null}
-
- {chat.unseenMsgs > 0 ? : null}
-
-
- )
- })
-}
-
-// Scroll wrapper for chat list
-const ScrollWrapper = ({ children, isBelowLgScreen }: { children: ReactNode; isBelowLgScreen: boolean }) => {
- if (isBelowLgScreen) {
- return {children}
- } else {
- return {children}
- }
-}
-
-const SidebarLeft = (props: Props) => {
- // Props
- const {
- chatStore,
- getActiveUserData,
- dispatch,
- backdropOpen,
- setBackdropOpen,
- sidebarOpen,
- setSidebarOpen,
- isBelowLgScreen,
- isBelowMdScreen,
- isBelowSmScreen,
- messageInputRef
- } = props
-
- // States
- const [userSidebar, setUserSidebar] = useState(false)
- const [searchValue, setSearchValue] = useState()
-
- const handleChange = (event: any, newValue: string | null) => {
- setSearchValue(newValue)
- dispatch(addNewChat({ id: chatStore.contacts.find(contact => contact.fullName === newValue)?.id }))
- getActiveUserData(
- chatStore.contacts.find(contact => contact.fullName === newValue)?.id || (chatStore.activeUser?.id as number)
- )
- isBelowMdScreen && setSidebarOpen(false)
- setBackdropOpen(false)
- setSearchValue(null)
- messageInputRef.current?.focus()
- }
-
- return (
- <>
- setSidebarOpen(false)}
- className='bs-full'
- variant={!isBelowMdScreen ? 'permanent' : 'persistent'}
- ModalProps={{
- disablePortal: true,
- keepMounted: true // Better open performance on mobile.
- }}
- sx={{
- zIndex: isBelowMdScreen && sidebarOpen ? 11 : 10,
- position: !isBelowMdScreen ? 'static' : 'absolute',
- ...(isBelowSmScreen && sidebarOpen && { width: '100%' }),
- '& .MuiDrawer-paper': {
- overflow: 'hidden',
- boxShadow: 'none',
- width: isBelowSmScreen ? '100%' : '370px',
- position: !isBelowMdScreen ? 'static' : 'absolute'
- }
- }}
- >
-
-
{
- setUserSidebar(true)
- }}
- />
-
-
contact.fullName) || []}
- value={searchValue || null}
- onChange={handleChange}
- renderInput={params => (
-
-
-
- )
- }
- }}
- />
- )}
- renderOption={(props, option) => {
- const contact = chatStore.contacts.find(contact => contact.fullName === option)
-
- return (
-
- {contact ? (
- contact.avatar ? (
-
- ) : (
-
- {getInitials(contact.fullName)}
-
- )
- ) : null}
- {option}
-
- )
- }}
- />
- {isBelowMdScreen ? (
- {
- setSidebarOpen(false)
- setBackdropOpen(false)
- }}
- >
-
-
- ) : null}
-
-
-
-
- {renderChat({
- chatStore,
- getActiveUserData,
- backdropOpen,
- setSidebarOpen,
- isBelowMdScreen,
- setBackdropOpen
- })}
-
-
-
-
-
- >
- )
-}
-
-export default SidebarLeft
diff --git a/src/views/apps/chat/UserProfileLeft.tsx b/src/views/apps/chat/UserProfileLeft.tsx
deleted file mode 100644
index 559036b..0000000
--- a/src/views/apps/chat/UserProfileLeft.tsx
+++ /dev/null
@@ -1,183 +0,0 @@
-// React Imports
-import { useState } from 'react'
-import type { ChangeEvent, ReactNode } from 'react'
-
-// MUI Import
-import Drawer from '@mui/material/Drawer'
-import Typography from '@mui/material/Typography'
-import IconButton from '@mui/material/IconButton'
-import Radio from '@mui/material/Radio'
-import RadioGroup from '@mui/material/RadioGroup'
-import FormControlLabel from '@mui/material/FormControlLabel'
-import FormLabel from '@mui/material/FormLabel'
-import List from '@mui/material/List'
-import ListItem from '@mui/material/ListItem'
-import ListItemButton from '@mui/material/ListItemButton'
-import ListItemText from '@mui/material/ListItemText'
-import ListItemIcon from '@mui/material/ListItemIcon'
-import Switch from '@mui/material/Switch'
-import Backdrop from '@mui/material/Backdrop'
-import Button from '@mui/material/Button'
-
-// Third Party Imports
-import PerfectScrollbar from 'react-perfect-scrollbar'
-
-// Type Imports
-import type { AppDispatch } from '@/redux-store'
-import type { ProfileUserType, StatusType } from '@/types/apps/chatTypes'
-
-// Slice Imports
-import { setUserStatus } from '@/redux-store/slices/chat'
-
-// Component Imports
-import AvatarWithBadge from './AvatarWithBadge'
-import { statusObj } from '@views/apps/chat/SidebarLeft'
-import CustomTextField from '@core/components/mui/TextField'
-
-type Props = {
- userSidebar: boolean
- setUserSidebar: (open: boolean) => void
- profileUserData: ProfileUserType
- dispatch: AppDispatch
- isBelowLgScreen: boolean
- isBelowSmScreen: boolean
-}
-
-const ScrollWrapper = ({ children, isBelowLgScreen }: { children: ReactNode; isBelowLgScreen: boolean }) => {
- if (isBelowLgScreen) {
- return {children}
- } else {
- return {children}
- }
-}
-
-const UserProfileLeft = (props: Props) => {
- // Props
- const { userSidebar, setUserSidebar, profileUserData, dispatch, isBelowLgScreen, isBelowSmScreen } = props
-
- // States
- const [twoStepVerification, setTwoStepVerification] = useState(true)
- const [notification, setNotification] = useState(false)
-
- const handleTwoStepVerification = () => {
- setTwoStepVerification(!twoStepVerification)
- }
-
- const handleNotification = () => {
- setNotification(!notification)
- }
-
- const handleUserStatus = (e: ChangeEvent) => {
- dispatch(setUserStatus({ status: e.target.value as StatusType }))
- }
-
- return profileUserData ? (
- <>
- setUserSidebar(false)}
- sx={{
- zIndex: 13,
- '& .MuiDrawer-paper': { width: isBelowSmScreen ? '100%' : '370px', position: 'absolute', border: 0 }
- }}
- >
- setUserSidebar(false)}>
-
-
-
-
-
- {profileUserData.fullName}
- {profileUserData.role}
-
-
-
-
-
-
- About
-
-
-
-
-
- Status
-
-
- } label='Online' />
- } label='Away' />
- } label='Do not disturb' />
- } label='Offline' />
-
-
-
-
- Settings
-
-
- }
- >
-
-
-
-
-
-
-
- }
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
}>
- Logout
-
-
-
-
- setUserSidebar(false)} className='absolute z-[12]' />
- >
- ) : null
-}
-
-export default UserProfileLeft
diff --git a/src/views/apps/chat/UserProfileRight.tsx b/src/views/apps/chat/UserProfileRight.tsx
deleted file mode 100644
index 08f17c1..0000000
--- a/src/views/apps/chat/UserProfileRight.tsx
+++ /dev/null
@@ -1,172 +0,0 @@
-// React Imports
-import type { ReactNode } from 'react'
-
-// MUI Imports
-import Drawer from '@mui/material/Drawer'
-import IconButton from '@mui/material/IconButton'
-import Typography from '@mui/material/Typography'
-import List from '@mui/material/List'
-import ListItem from '@mui/material/ListItem'
-import ListItemButton from '@mui/material/ListItemButton'
-import ListItemIcon from '@mui/material/ListItemIcon'
-import ListItemText from '@mui/material/ListItemText'
-import Button from '@mui/material/Button'
-
-// Third-party Imports
-import classnames from 'classnames'
-import PerfectScrollbar from 'react-perfect-scrollbar'
-
-// Type Imports
-import type { ContactType } from '@/types/apps/chatTypes'
-
-// Component Imports
-import { statusObj } from './SidebarLeft'
-import AvatarWithBadge from './AvatarWithBadge'
-
-type Props = {
- open: boolean
- handleClose: () => void
- activeUser: ContactType
- isBelowLgScreen: boolean
- isBelowSmScreen: boolean
-}
-
-const ScrollWrapper = ({
- children,
- isBelowLgScreen,
- className
-}: {
- children: ReactNode
- isBelowLgScreen: boolean
- className?: string
-}) => {
- if (isBelowLgScreen) {
- return {children}
- } else {
- return (
-
- {children}
-
- )
- }
-}
-
-const UserProfileRight = (props: Props) => {
- // Props
- const { open, handleClose, activeUser, isBelowLgScreen, isBelowSmScreen } = props
-
- return activeUser ? (
-
-
-
-
-
-
-
- {activeUser.fullName}
- {activeUser.role}
-
-
-
-
-
-
- About
-
- {activeUser.about}
-
-
-
- Personal Information
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Options
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
- >
- Delete Contact
-
-
-
- ) : null
-}
-
-export default UserProfileRight
diff --git a/src/views/apps/chat/index.tsx b/src/views/apps/chat/index.tsx
deleted file mode 100644
index 420acc1..0000000
--- a/src/views/apps/chat/index.tsx
+++ /dev/null
@@ -1,121 +0,0 @@
-'use client'
-
-// React Imports
-import { useEffect, useRef, useState } from 'react'
-
-// MUI Imports
-import Backdrop from '@mui/material/Backdrop'
-import useMediaQuery from '@mui/material/useMediaQuery'
-import type { Theme } from '@mui/material/styles'
-
-// Third-party Imports
-import classNames from 'classnames'
-import { useDispatch, useSelector } from 'react-redux'
-
-// Type Imports
-import type { RootState } from '@/redux-store'
-
-// Slice Imports
-import { getActiveUserData } from '@/redux-store/slices/chat'
-
-// Component Imports
-import SidebarLeft from './SidebarLeft'
-import ChatContent from './ChatContent'
-
-// Hook Imports
-import { useSettings } from '@core/hooks/useSettings'
-
-// Util Imports
-import { commonLayoutClasses } from '@layouts/utils/layoutClasses'
-
-const ChatWrapper = () => {
- // States
- const [backdropOpen, setBackdropOpen] = useState(false)
- const [sidebarOpen, setSidebarOpen] = useState(false)
-
- // Refs
- const messageInputRef = useRef(null)
-
- // Hooks
- const { settings } = useSettings()
- const dispatch = useDispatch()
- const chatStore = useSelector((state: RootState) => state.chatReducer)
- const isBelowLgScreen = useMediaQuery((theme: Theme) => theme.breakpoints.down('lg'))
- const isBelowMdScreen = useMediaQuery((theme: Theme) => theme.breakpoints.down('md'))
- const isBelowSmScreen = useMediaQuery((theme: Theme) => theme.breakpoints.down('sm'))
-
- // Get active user’s data
- const activeUser = (id: number) => {
- dispatch(getActiveUserData(id))
- }
-
- // Focus on message input when active user changes
- useEffect(() => {
- if (chatStore.activeUser?.id !== null && messageInputRef.current) {
- messageInputRef.current.focus()
- }
- }, [chatStore.activeUser])
-
- // Close backdrop when sidebar is open on below md screen
- useEffect(() => {
- if (!isBelowMdScreen && backdropOpen && sidebarOpen) {
- setBackdropOpen(false)
- }
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [isBelowMdScreen])
-
- // Open backdrop when sidebar is open on below sm screen
- useEffect(() => {
- if (!isBelowSmScreen && sidebarOpen) {
- setBackdropOpen(true)
- }
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [isBelowSmScreen])
-
- // Close sidebar when backdrop is closed on below md screen
- useEffect(() => {
- if (!backdropOpen && sidebarOpen) {
- setSidebarOpen(false)
- }
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [backdropOpen])
-
- return (
-
-
-
-
-
- setBackdropOpen(false)} className='absolute z-10' />
-
- )
-}
-
-export default ChatWrapper
diff --git a/src/views/apps/chat/utils.ts b/src/views/apps/chat/utils.ts
deleted file mode 100644
index 2852851..0000000
--- a/src/views/apps/chat/utils.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-const isToday = (date: Date | string) => {
- const today = new Date()
-
- return (
- new Date(date).getDate() === today.getDate() &&
- new Date(date).getMonth() === today.getMonth() &&
- new Date(date).getFullYear() === today.getFullYear()
- )
-}
-
-export const formatDateToMonthShort = (value: Date | string, toTimeForCurrentDay = true) => {
- const date = new Date(value)
- let formatting: Intl.DateTimeFormatOptions = { month: 'short', day: 'numeric' }
-
- if (toTimeForCurrentDay && isToday(date)) {
- formatting = { hour: 'numeric', minute: 'numeric' }
- }
-
- return new Intl.DateTimeFormat('en-US', formatting).format(new Date(value))
-}
diff --git a/src/views/apps/ecommerce/customers/details/CustomerDetailsHeader.tsx b/src/views/apps/ecommerce/customers/details/CustomerDetailsHeader.tsx
deleted file mode 100644
index 048890c..0000000
--- a/src/views/apps/ecommerce/customers/details/CustomerDetailsHeader.tsx
+++ /dev/null
@@ -1,37 +0,0 @@
-// MUI Imports
-import Button from '@mui/material/Button'
-import Typography from '@mui/material/Typography'
-import type { ButtonProps } from '@mui/material/Button'
-
-// Type Imports
-import type { ThemeColor } from '@core/types'
-
-// Component Imports
-import ConfirmationDialog from '@components/dialogs/confirmation-dialog'
-import OpenDialogOnElementClick from '@components/dialogs/OpenDialogOnElementClick'
-
-const CustomerDetailHeader = ({ customerId }: { customerId: string }) => {
- // Vars
- const buttonProps = (children: string, color: ThemeColor, variant: ButtonProps['variant']): ButtonProps => ({
- children,
- color,
- variant
- })
-
- return (
-
-
- {`Customer ID #${customerId}`}
- Aug 17, 2020, 5:48 (ET)
-
-
-
- )
-}
-
-export default CustomerDetailHeader
diff --git a/src/views/apps/ecommerce/customers/details/customer-left-overview/CustomerDetails.tsx b/src/views/apps/ecommerce/customers/details/customer-left-overview/CustomerDetails.tsx
deleted file mode 100644
index af0a4eb..0000000
--- a/src/views/apps/ecommerce/customers/details/customer-left-overview/CustomerDetails.tsx
+++ /dev/null
@@ -1,99 +0,0 @@
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardContent from '@mui/material/CardContent'
-import Chip from '@mui/material/Chip'
-import Divider from '@mui/material/Divider'
-import Typography from '@mui/material/Typography'
-import Button from '@mui/material/Button'
-import type { ButtonProps } from '@mui/material/Button'
-
-// Type Imports
-import type { Customer } from '@/types/apps/ecommerceTypes'
-
-// Component Imports
-import CustomAvatar from '@core/components/mui/Avatar'
-import EditUserInfo from '@components/dialogs/edit-user-info'
-import OpenDialogOnElementClick from '@components/dialogs/OpenDialogOnElementClick'
-
-const CustomerDetails = ({ customerData }: { customerData?: Customer }) => {
- // Vars
- const buttonProps: ButtonProps = {
- variant: 'contained',
- children: 'Edit Details'
- }
-
- return (
-
-
-
-
-
-
- {customerData?.customer}
- Customer ID #{customerData?.customerId}
-
-
-
-
-
-
-
-
- {customerData?.order}
- Orders
-
-
-
-
-
-
-
- ${customerData?.totalSpent}
- Spent
-
-
-
-
-
-
Details
-
-
-
-
- Username:
-
- {customerData?.customer}
-
-
-
- Billing Email:
-
- {customerData?.email}
-
-
-
- Status:
-
-
-
-
-
- Contact:
-
- +1 (234) 464-0600
-
-
-
- Country:
-
- {customerData?.country}
-
-
-
-
-
-
- )
-}
-
-export default CustomerDetails
diff --git a/src/views/apps/ecommerce/customers/details/customer-left-overview/CustomerPlan.tsx b/src/views/apps/ecommerce/customers/details/customer-left-overview/CustomerPlan.tsx
deleted file mode 100644
index 2b6f3cd..0000000
--- a/src/views/apps/ecommerce/customers/details/customer-left-overview/CustomerPlan.tsx
+++ /dev/null
@@ -1,45 +0,0 @@
-'use client'
-
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardContent from '@mui/material/CardContent'
-import Typography from '@mui/material/Typography'
-import MuiButton from '@mui/material/Button'
-import { styled } from '@mui/material/styles'
-import type { ButtonProps } from '@mui/material/Button'
-
-// Component Imports
-import UpgradePlan from '@components/dialogs/upgrade-plan'
-import OpenDialogOnElementClick from '@components/dialogs/OpenDialogOnElementClick'
-
-const Button = styled(MuiButton)(() => ({
- backgroundColor: 'var(--mui-palette-common-white) !important',
- color: 'var(--mui-palette-primary-main) !important'
-}))
-
-const CustomerPlan = () => {
- // Vars
- const buttonProps: ButtonProps = {
- variant: 'contained',
- children: 'Upgrade To Premium'
- }
-
- return (
-
-
-
-
-
- Upgrade to premium
-
- Upgrade customer to premium membership to access pro features.
-
-
-
-
-
-
- )
-}
-
-export default CustomerPlan
diff --git a/src/views/apps/ecommerce/customers/details/customer-left-overview/index.tsx b/src/views/apps/ecommerce/customers/details/customer-left-overview/index.tsx
deleted file mode 100644
index 79fe500..0000000
--- a/src/views/apps/ecommerce/customers/details/customer-left-overview/index.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-// MUI Imports
-import Grid from '@mui/material/Grid2'
-
-// Type Imports
-import type { Customer } from '@/types/apps/ecommerceTypes'
-
-// Component Imports
-import CustomerDetails from './CustomerDetails'
-import CustomerPlan from './CustomerPlan'
-
-const CustomerLeftOverview = ({ customerData }: { customerData?: Customer }) => {
- return (
-
-
-
-
-
-
-
-
- )
-}
-
-export default CustomerLeftOverview
diff --git a/src/views/apps/ecommerce/customers/details/customer-right/address-billing/AddressBookCard.tsx b/src/views/apps/ecommerce/customers/details/customer-right/address-billing/AddressBookCard.tsx
deleted file mode 100644
index 877c93a..0000000
--- a/src/views/apps/ecommerce/customers/details/customer-right/address-billing/AddressBookCard.tsx
+++ /dev/null
@@ -1,177 +0,0 @@
-// React Imports
-import { useState } from 'react'
-
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardContent from '@mui/material/CardContent'
-import CardHeader from '@mui/material/CardHeader'
-import Chip from '@mui/material/Chip'
-import Collapse from '@mui/material/Collapse'
-import Divider from '@mui/material/Divider'
-import Typography from '@mui/material/Typography'
-import { useTheme } from '@mui/material/styles'
-import IconButton from '@mui/material/IconButton'
-import Button from '@mui/material/Button'
-import type { ButtonProps } from '@mui/material/Button'
-import type { IconButtonProps } from '@mui/material/IconButton'
-
-// Component Imports
-import OptionMenu from '@core/components/option-menu'
-import AddNewAddress from '@components/dialogs/add-edit-address'
-import OpenDialogOnElementClick from '@components/dialogs/OpenDialogOnElementClick'
-
-type propsType = {
- typeOfAddress: string
- isDefaultAddress: boolean
- name: string
- streetAddress: string
- area: string
- city: string
-}
-
-const propData: propsType[] = [
- {
- typeOfAddress: 'Home',
- isDefaultAddress: true,
- name: 'Violet Mendoza',
- streetAddress: '23 Shatinon Mekalan',
- area: 'Melbourne, VIC 3000,',
- city: 'London'
- },
- {
- typeOfAddress: 'Office',
- isDefaultAddress: false,
- name: 'Archie Mendoza',
- streetAddress: '45 Roker Terrace',
- area: 'Latheronwheel',
- city: 'London'
- },
- {
- typeOfAddress: 'Family',
- isDefaultAddress: false,
- name: 'George Mendoza',
- streetAddress: '512 Water Plant',
- area: 'Melbourne, VIC 3000',
- city: 'London'
- }
-]
-
-// Vars
-const data = {
- firstName: 'Violet',
- lastName: 'Mendoza',
- email: 'sbaser0@boston.com',
- country: 'UK',
- address1: '23 Shatinon Mekalan',
- address2: 'Melbourne, VIC 3000',
- landmark: 'Near Water Plant',
- city: 'London',
- state: 'Capholim',
- zipCode: '403114',
- taxId: 'TAX-875623',
- vatNumber: 'SDF754K77',
- contact: '+1 (234) 464-0600'
-}
-
-const CustomerAddress = (props: propsType) => {
- // Props
- const { typeOfAddress, isDefaultAddress, name, streetAddress, area, city } = props
-
- // States
- const [expanded, setExpanded] = useState(isDefaultAddress ? true : false)
-
- // Vars
- const iconButtonProps: IconButtonProps = {
- children: ,
- className: 'text-textSecondary'
- }
-
- // Hooks
- const theme = useTheme()
-
- return (
- <>
-
-
-
setExpanded(!expanded)}
- >
-
-
-
-
-
- {typeOfAddress}
-
- {isDefaultAddress && }
-
-
{streetAddress}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {name}
-
-
- {streetAddress}
- {area}
- {city}
-
-
-
- >
- )
-}
-
-const AddressBook = () => {
- // Vars
- const buttonProps: ButtonProps = {
- variant: 'tonal',
- children: 'Add New Address',
- size: 'small'
- }
-
- return (
-
- }
- />
-
- {propData.map((address, index) => (
-
-
- {index !== propData.length - 1 &&
}
-
- ))}
-
-
- )
-}
-
-export default AddressBook
diff --git a/src/views/apps/ecommerce/customers/details/customer-right/address-billing/PaymentMethodCard.tsx b/src/views/apps/ecommerce/customers/details/customer-right/address-billing/PaymentMethodCard.tsx
deleted file mode 100644
index 03ba9e5..0000000
--- a/src/views/apps/ecommerce/customers/details/customer-right/address-billing/PaymentMethodCard.tsx
+++ /dev/null
@@ -1,242 +0,0 @@
-// React Imports
-import { useState } from 'react'
-
-// MUI Imports
-import Grid from '@mui/material/Grid2'
-import Card from '@mui/material/Card'
-import CardHeader from '@mui/material/CardHeader'
-import CardContent from '@mui/material/CardContent'
-import Collapse from '@mui/material/Collapse'
-import Chip from '@mui/material/Chip'
-import Divider from '@mui/material/Divider'
-import Typography from '@mui/material/Typography'
-import { useTheme } from '@mui/material/styles'
-import IconButton from '@mui/material/IconButton'
-import Button from '@mui/material/Button'
-import type { ButtonProps } from '@mui/material/Button'
-import type { IconButtonProps } from '@mui/material/IconButton'
-
-// Component Imports
-import CustomAvatar from '@core/components/mui/Avatar'
-import OptionMenu from '@core/components/option-menu'
-import AddNewCard from '@components/dialogs/billing-card'
-import OpenDialogOnElementClick from '@components/dialogs/OpenDialogOnElementClick'
-
-type dataType = {
- typeOfCard: string
- isDefaultCard: boolean
- expiryDate: string
-}
-
-const data: dataType[] = [
- {
- typeOfCard: 'Mastercard',
- isDefaultCard: true,
- expiryDate: 'Apr 2028'
- },
- {
- typeOfCard: 'American Express',
- isDefaultCard: false,
- expiryDate: 'Jan 2025'
- },
- {
- typeOfCard: 'Visa',
- isDefaultCard: false,
- expiryDate: 'Nov 2030'
- }
-]
-
-// Vars
-const editCardData = {
- cardNumber: '**** **** **** 4487',
- name: 'Violet Mendoza ',
- expiryDate: '04/2028',
- cardCvv: '233'
-}
-
-const CustomerAddress = (props: dataType) => {
- // Props
- const { typeOfCard, isDefaultCard, expiryDate } = props
-
- // States
- const [expanded, setExpanded] = useState(isDefaultCard ? true : false)
-
- // Vars
- const iconButtonProps: IconButtonProps = {
- children: ,
- className: 'text-textSecondary'
- }
-
- // Hooks
- const theme = useTheme()
-
- const mastercard = '/images/apps/ecommerce/mastercard.png'
- const americanExpress = '/images/apps/ecommerce/american-express.png'
- const visa = '/images/apps/ecommerce/visa.png'
-
- return (
- <>
-
-
-
setExpanded(!expanded)}
- >
-
-
-
-
-
-
-
-
-
- {typeOfCard}
-
- {isDefaultCard && }
-
-
Expires {expiryDate}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Name
- Number
- Expires
- Type
- Issuer
- ID
-
-
-
-
-
- Violet Mendoza
-
-
- **** 4487
-
-
- 08/2028
-
-
- {typeOfCard}
-
-
- VICBANK
-
-
- DH73DJ8
-
-
-
-
-
-
-
-
-
- Billing
- Number
- Email
- Origin
- CVC
-
-
-
-
-
- USA
-
-
- +7634 983 637
-
-
- vafgot@vultukir.org
-
-
-
- United States
-
-
-
-
-
- Passed
-
-
-
-
-
-
-
-
-
-
-
- >
- )
-}
-
-const PaymentMethod = () => {
- // Vars
- const buttonProps: ButtonProps = {
- variant: 'tonal',
- children: 'New Payment Methods',
- size: 'small'
- }
-
- return (
-
- }
- className='flex-wrap gap-4'
- />
-
- {data.map((address, index) => (
-
-
- {index !== data.length - 1 &&
}
-
- ))}
-
-
- )
-}
-
-export default PaymentMethod
diff --git a/src/views/apps/ecommerce/customers/details/customer-right/address-billing/index.tsx b/src/views/apps/ecommerce/customers/details/customer-right/address-billing/index.tsx
deleted file mode 100644
index 728aff3..0000000
--- a/src/views/apps/ecommerce/customers/details/customer-right/address-billing/index.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-'use client'
-
-// MUI Imports
-import Grid from '@mui/material/Grid2'
-
-// Component Imports
-import AddressBook from './AddressBookCard'
-import PaymentMethod from './PaymentMethodCard'
-
-const AddressBilling = () => {
- return (
-
-
-
-
-
-
-
-
- )
-}
-
-export default AddressBilling
diff --git a/src/views/apps/ecommerce/customers/details/customer-right/index.tsx b/src/views/apps/ecommerce/customers/details/customer-right/index.tsx
deleted file mode 100644
index 8532d7e..0000000
--- a/src/views/apps/ecommerce/customers/details/customer-right/index.tsx
+++ /dev/null
@@ -1,57 +0,0 @@
-'use client'
-
-// React Imports
-import { useState } from 'react'
-import type { SyntheticEvent, ReactElement } from 'react'
-
-// MUI Imports
-import Tab from '@mui/material/Tab'
-import TabContext from '@mui/lab/TabContext'
-import TabPanel from '@mui/lab/TabPanel'
-import Grid from '@mui/material/Grid2'
-
-// Component Imports
-import CustomTabList from '@core/components/mui/TabList'
-
-const CustomerRight = ({ tabContentList }: { tabContentList: { [key: string]: ReactElement } }) => {
- // States
- const [activeTab, setActiveTab] = useState('overview')
-
- const handleChange = (event: SyntheticEvent, value: string) => {
- setActiveTab(value)
- }
-
- return (
- <>
-
-
-
-
- } value='overview' label='Overview' iconPosition='start' />
- } value='security' label='Security' iconPosition='start' />
- }
- value='addressBilling'
- label='Address & Billing'
- iconPosition='start'
- />
- }
- value='notifications'
- label='Notifications'
- iconPosition='start'
- />
-
-
-
-
- {tabContentList[activeTab]}
-
-
-
-
- >
- )
-}
-
-export default CustomerRight
diff --git a/src/views/apps/ecommerce/customers/details/customer-right/notification/index.tsx b/src/views/apps/ecommerce/customers/details/customer-right/notification/index.tsx
deleted file mode 100644
index d93016e..0000000
--- a/src/views/apps/ecommerce/customers/details/customer-right/notification/index.tsx
+++ /dev/null
@@ -1,93 +0,0 @@
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardHeader from '@mui/material/CardHeader'
-import CardActions from '@mui/material/CardActions'
-import Typography from '@mui/material/Typography'
-import Checkbox from '@mui/material/Checkbox'
-import Button from '@mui/material/Button'
-
-// Style Imports
-import tableStyles from '@core/styles/table.module.css'
-
-type TableDataType = {
- type: string
- app: boolean
- email: boolean
- browser: boolean
-}
-
-// Vars
-const tableData: TableDataType[] = [
- {
- app: false,
- email: true,
- browser: false,
- type: 'New for you'
- },
- {
- app: true,
- email: false,
- browser: true,
- type: 'Account activity'
- },
- {
- app: true,
- email: true,
- browser: true,
- type: 'A new browser used to sign in'
- },
- {
- app: false,
- email: false,
- browser: true,
- type: 'A new device is linked'
- }
-]
-
-const Notification = () => {
- return (
-
-
-
-
-
-
- Type
- Email
- Browser
- App
-
-
-
- {tableData.map((data, index) => (
-
-
- {data.type}
-
-
-
-
-
-
-
-
-
-
-
- ))}
-
-
-
-
-
- Save Changes
-
-
- Discard
-
-
-
- )
-}
-
-export default Notification
diff --git a/src/views/apps/ecommerce/customers/details/customer-right/overview/CustomerStatisticsCard.tsx b/src/views/apps/ecommerce/customers/details/customer-right/overview/CustomerStatisticsCard.tsx
deleted file mode 100644
index d5b5f00..0000000
--- a/src/views/apps/ecommerce/customers/details/customer-right/overview/CustomerStatisticsCard.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-// MUI Imports
-import Grid from '@mui/material/Grid2'
-
-// Types Imports
-import type { CardStatsCustomerStatsProps } from '@/types/pages/widgetTypes'
-
-// Component Imports
-import CustomerStats from '@components/card-statistics/CustomerStats'
-
-const CustomerStatisticsCard = ({ customerStatData }: { customerStatData?: CardStatsCustomerStatsProps[] }) => {
- return (
-
- {customerStatData?.map((item, index) => (
-
-
-
- ))}
-
- )
-}
-
-export default CustomerStatisticsCard
diff --git a/src/views/apps/ecommerce/customers/details/customer-right/overview/OrderListTable.tsx b/src/views/apps/ecommerce/customers/details/customer-right/overview/OrderListTable.tsx
deleted file mode 100644
index 6b2337c..0000000
--- a/src/views/apps/ecommerce/customers/details/customer-right/overview/OrderListTable.tsx
+++ /dev/null
@@ -1,312 +0,0 @@
-'use client'
-
-// React Imports
-import { useEffect, useMemo, useState } from 'react'
-
-// Next Imports
-import Link from 'next/link'
-import { useParams } from 'next/navigation'
-
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardContent from '@mui/material/CardContent'
-import Chip from '@mui/material/Chip'
-import type { TextFieldProps } from '@mui/material/TextField'
-import Typography from '@mui/material/Typography'
-
-// Third-party Imports
-import type { RankingInfo } from '@tanstack/match-sorter-utils'
-import { rankItem } from '@tanstack/match-sorter-utils'
-import type { ColumnDef, FilterFn } from '@tanstack/react-table'
-import {
- createColumnHelper,
- flexRender,
- getCoreRowModel,
- getFacetedMinMaxValues,
- getFacetedRowModel,
- getFacetedUniqueValues,
- getFilteredRowModel,
- getPaginationRowModel,
- getSortedRowModel,
- useReactTable
-} from '@tanstack/react-table'
-import classnames from 'classnames'
-
-// Type Imports
-import type { OrderType } from '@/types/apps/ecommerceTypes'
-import type { Locale } from '@configs/i18n'
-import type { ThemeColor } from '@core/types'
-
-// Component Imports
-import CustomTextField from '@core/components/mui/TextField'
-import OptionMenu from '@core/components/option-menu'
-
-// Util Imports
-import { getLocalizedUrl } from '@/utils/i18n'
-
-// Style Imports
-import tableStyles from '@core/styles/table.module.css'
-
-declare module '@tanstack/table-core' {
- interface FilterFns {
- fuzzy: FilterFn
- }
- interface FilterMeta {
- itemRank: RankingInfo
- }
-}
-
-type PayementStatusType = {
- text: string
- color: ThemeColor
-}
-
-type StatusChipColorType = {
- color: ThemeColor
-}
-
-export const paymentStatus: { [key: number]: PayementStatusType } = {
- 1: { text: 'Paid', color: 'success' },
- 2: { text: 'Pending', color: 'warning' },
- 3: { text: 'Cancelled', color: 'secondary' },
- 4: { text: 'Failed', color: 'error' }
-}
-
-export const statusChipColor: { [key: string]: StatusChipColorType } = {
- Delivered: { color: 'success' },
- 'Out for Delivery': { color: 'primary' },
- 'Ready to Pickup': { color: 'info' },
- Dispatched: { color: 'warning' }
-}
-
-type ECommerceOrderTypeWithAction = OrderType & {
- action?: string
-}
-
-const fuzzyFilter: FilterFn = (row, columnId, value, addMeta) => {
- // Rank the item
- const itemRank = rankItem(row.getValue(columnId), value)
-
- // Store the itemRank info
- addMeta({
- itemRank
- })
-
- // Return if the item should be filtered in/out
- return itemRank.passed
-}
-
-const DebouncedInput = ({
- value: initialValue,
- onChange,
- debounce = 500,
- ...props
-}: {
- value: string | number
- onChange: (value: string | number) => void
- debounce?: number
-} & Omit) => {
- // States
- const [value, setValue] = useState(initialValue)
-
- useEffect(() => {
- setValue(initialValue)
- }, [initialValue])
-
- useEffect(() => {
- const timeout = setTimeout(() => {
- onChange(value)
- }, debounce)
-
- return () => clearTimeout(timeout)
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [value])
-
- return setValue(e.target.value)} />
-}
-
-// Column Definitions
-const columnHelper = createColumnHelper()
-
-const OrderListTable = ({ orderData }: { orderData?: OrderType[] }) => {
- // States
- const [rowSelection, setRowSelection] = useState({})
- const [data, setData] = useState(...[orderData])
- const [globalFilter, setGlobalFilter] = useState('')
-
- // Hooks
- const { lang: locale } = useParams()
-
- const columns = useMemo[]>(
- () => [
- columnHelper.accessor('order', {
- header: 'order',
- cell: ({ row }) => (
- {`#${row.original.order}`}
- )
- }),
- columnHelper.accessor('date', {
- header: 'Date',
- cell: ({ row }) => {`${new Date(row.original.date).toDateString()}`}
- }),
- columnHelper.accessor('status', {
- header: 'Status',
- cell: ({ row }) => (
-
- )
- }),
- columnHelper.accessor('spent', {
- header: 'Spent',
- cell: ({ row }) => ${row.original.spent}
- }),
- columnHelper.accessor('action', {
- header: 'Actions',
- cell: ({ row }) => (
-
- setData(data?.filter(order => order.id !== row.original.id)),
- className: 'flex items-center'
- }
- }
- ]}
- />
-
- ),
- enableSorting: false
- })
- ],
- // eslint-disable-next-line react-hooks/exhaustive-deps
- [data]
- )
-
- const table = useReactTable({
- data: data as OrderType[],
- columns,
- filterFns: {
- fuzzy: fuzzyFilter
- },
- state: {
- rowSelection,
- globalFilter
- },
- initialState: {
- pagination: {
- pageSize: 6
- }
- },
- enableRowSelection: true, //enable row selection for all rows
- // enableRowSelection: row => row.original.age > 18, // or enable row selection conditionally per row
- globalFilterFn: fuzzyFilter,
- onRowSelectionChange: setRowSelection,
- getCoreRowModel: getCoreRowModel(),
- onGlobalFilterChange: setGlobalFilter,
- getFilteredRowModel: getFilteredRowModel(),
- getSortedRowModel: getSortedRowModel(),
- getPaginationRowModel: getPaginationRowModel(),
- getFacetedRowModel: getFacetedRowModel(),
- getFacetedUniqueValues: getFacetedUniqueValues(),
- getFacetedMinMaxValues: getFacetedMinMaxValues()
- })
-
- return (
-
-
- Orders Placed
- setGlobalFilter(String(value))}
- placeholder='Search Order'
- className='max-sm:is-full'
- />
-
-
-
-
- {table.getHeaderGroups().map(headerGroup => (
-
- {headerGroup.headers.map(header => (
-
- {header.isPlaceholder ? null : (
- <>
-
- {flexRender(header.column.columnDef.header, header.getContext())}
- {{
- asc: ,
- desc:
- }[header.column.getIsSorted() as 'asc' | 'desc'] ?? null}
-
- >
- )}
-
- ))}
-
- ))}
-
- {table.getFilteredRowModel().rows.length === 0 ? (
-
-
-
- No data available
-
-
-
- ) : (
-
- {table
- .getRowModel()
- .rows.slice(0, table.getState().pagination.pageSize)
- .map(row => {
- return (
-
- {row.getVisibleCells().map(cell => (
- {flexRender(cell.column.columnDef.cell, cell.getContext())}
- ))}
-
- )
- })}
-
- )}
-
-
- {/* }
- count={table.getFilteredRowModel().rows.length}
- rowsPerPage={table.getState().pagination.pageSize}
- page={table.getState().pagination.pageIndex}
- onPageChange={(_, page) => {
- table.setPageIndex(page)
- }}
- /> */}
-
- )
-}
-
-export default OrderListTable
diff --git a/src/views/apps/ecommerce/customers/details/customer-right/overview/index.tsx b/src/views/apps/ecommerce/customers/details/customer-right/overview/index.tsx
deleted file mode 100644
index b5d8a50..0000000
--- a/src/views/apps/ecommerce/customers/details/customer-right/overview/index.tsx
+++ /dev/null
@@ -1,64 +0,0 @@
-// MUI Imports
-import Grid from '@mui/material/Grid2'
-
-// Component Imports
-import CustomerStatisticsCard from './CustomerStatisticsCard'
-import OrderListTable from './OrderListTable'
-
-// Data Imports
-import { getStatisticsData, getEcommerceData } from '@/app/server/actions'
-
-/**
- * ! If you need data using an API call, uncomment the below API code, update the `process.env.API_URL` variable in the
- * ! `.env` file found at root of your project and also update the API endpoints like `/pages/widget-examples` in below example.
- * ! Also, remove the above server action import and the action itself from the `src/app/server/actions.ts` file to clean up unused code
- * ! because we've used the server action for getting our static data.
- */
-
-/* const getStatisticsData = async () => {
- // Vars
- const res = await fetch(`${process.env.API_URL}/pages/widget-examples`)
-
- if (!res.ok) {
- throw new Error('Failed to fetch statistics data')
- }
-
- return res.json()
-} */
-
-/**
- * ! If you need data using an API call, uncomment the below API code, update the `process.env.API_URL` variable in the
- * ! `.env` file found at root of your project and also update the API endpoints like `/apps/ecommerce` in below example.
- * ! Also, remove the above server action import and the action itself from the `src/app/server/actions.ts` file to clean up unused code
- * ! because we've used the server action for getting our static data.
- */
-
-/* const getEcommerceData = async () => {
- // Vars
- const res = await fetch(`${process.env.API_URL}/apps/ecommerce`)
-
- if (!res.ok) {
- throw new Error('Failed to fetch ecommerce data')
- }
-
- return res.json()
-} */
-
-const Overview = async () => {
- // Vars
- const data = await getStatisticsData()
- const tableData = await getEcommerceData()
-
- return (
-
-
-
-
-
-
-
-
- )
-}
-
-export default Overview
diff --git a/src/views/apps/ecommerce/customers/details/customer-right/security/ChangePassword.tsx b/src/views/apps/ecommerce/customers/details/customer-right/security/ChangePassword.tsx
deleted file mode 100644
index 428d713..0000000
--- a/src/views/apps/ecommerce/customers/details/customer-right/security/ChangePassword.tsx
+++ /dev/null
@@ -1,95 +0,0 @@
-'use client'
-
-// React Imports
-import { useState } from 'react'
-
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardHeader from '@mui/material/CardHeader'
-import CardContent from '@mui/material/CardContent'
-import Grid from '@mui/material/Grid2'
-import InputAdornment from '@mui/material/InputAdornment'
-import IconButton from '@mui/material/IconButton'
-import Alert from '@mui/material/Alert'
-import AlertTitle from '@mui/material/AlertTitle'
-import Button from '@mui/material/Button'
-
-// Component Imports
-import CustomTextField from '@core/components/mui/TextField'
-
-const ChangePassword = () => {
- // States
- const [isPasswordShown, setIsPasswordShown] = useState(false)
- const [isConfirmPasswordShown, setIsConfirmPasswordShown] = useState(false)
-
- return (
-
-
-
- {}}>
- Ensure that these requirements are met
- Minimum 8 characters long, uppercase & symbol
-
-
-
-
- )
-}
-
-export default ChangePassword
diff --git a/src/views/apps/ecommerce/customers/details/customer-right/security/RecentDevice.tsx b/src/views/apps/ecommerce/customers/details/customer-right/security/RecentDevice.tsx
deleted file mode 100644
index 9148156..0000000
--- a/src/views/apps/ecommerce/customers/details/customer-right/security/RecentDevice.tsx
+++ /dev/null
@@ -1,93 +0,0 @@
-// React Imports
-import type { ReactElement } from 'react'
-
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardHeader from '@mui/material/CardHeader'
-import Typography from '@mui/material/Typography'
-
-// Style Imports
-import tableStyles from '@core/styles/table.module.css'
-
-type DataType = {
- device: string
- browser: string
- location: string
- recentActivity: string
- browserIcon: ReactElement
-}
-
-// Vars
-const recentDeviceData: DataType[] = [
- {
- device: 'Dell XPS 15',
- location: 'United States',
- browser: 'Chrome on Windows',
- recentActivity: '10, Jan 2020 20:07',
- browserIcon:
- },
- {
- location: 'Ghana',
- device: 'Google Pixel 3a',
- browser: 'Chrome on Android',
- recentActivity: '11, Jan 2020 10:16',
- browserIcon:
- },
- {
- location: 'Mayotte',
- device: 'Apple iMac',
- browser: 'Chrome on MacOS',
- recentActivity: '11, Jan 2020 12:10',
- browserIcon:
- },
- {
- location: 'Mauritania',
- device: 'Apple iPhone XR',
- browser: 'Chrome on iPhone',
- recentActivity: '12, Jan 2020 8:29',
- browserIcon:
- }
-]
-
-const RecentDevice = () => {
- return (
-
-
-
-
-
-
- Browser
- Device
- Location
- Recent Activities
-
-
-
- {recentDeviceData.map((device, index) => (
-
-
-
- {device.browserIcon}
- {device.browser}
-
-
-
- {device.device}
-
-
- {device.location}
-
-
- {device.recentActivity}
-
-
- ))}
-
-
-
-
- )
-}
-
-export default RecentDevice
diff --git a/src/views/apps/ecommerce/customers/details/customer-right/security/TwoStepVerification.tsx b/src/views/apps/ecommerce/customers/details/customer-right/security/TwoStepVerification.tsx
deleted file mode 100644
index 8565f39..0000000
--- a/src/views/apps/ecommerce/customers/details/customer-right/security/TwoStepVerification.tsx
+++ /dev/null
@@ -1,44 +0,0 @@
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardHeader from '@mui/material/CardHeader'
-import CardContent from '@mui/material/CardContent'
-import InputLabel from '@mui/material/InputLabel'
-import Typography from '@mui/material/Typography'
-
-// Component Imports
-import Link from '@components/Link'
-import CustomIconButton from '@core/components/mui/IconButton'
-import CustomTextField from '@core/components/mui/TextField'
-
-const TwoStepVerification = () => {
- return (
-
-
-
-
- SMS
-
-
-
- Two-factor authentication adds an additional layer of security to your account by requiring more than just a
- password to log in.{' '}
-
- Learn more.
-
-
-
-
- )
-}
-
-export default TwoStepVerification
diff --git a/src/views/apps/ecommerce/customers/details/customer-right/security/index.tsx b/src/views/apps/ecommerce/customers/details/customer-right/security/index.tsx
deleted file mode 100644
index 294de2f..0000000
--- a/src/views/apps/ecommerce/customers/details/customer-right/security/index.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-// MUI Imports
-import Grid from '@mui/material/Grid2'
-
-// Component Imports
-import ChangePassword from './ChangePassword'
-import TwoStepVerification from './TwoStepVerification'
-import RecentDevice from './RecentDevice'
-
-const SecurityTab = () => {
- return (
-
-
-
-
-
-
-
-
-
-
-
- )
-}
-
-export default SecurityTab
diff --git a/src/views/apps/ecommerce/customers/details/index.tsx b/src/views/apps/ecommerce/customers/details/index.tsx
deleted file mode 100644
index 2007412..0000000
--- a/src/views/apps/ecommerce/customers/details/index.tsx
+++ /dev/null
@@ -1,50 +0,0 @@
-// React Imports
-import type { ReactElement } from 'react'
-
-// Next Imports
-import dynamic from 'next/dynamic'
-
-// MUI Imports
-import Grid from '@mui/material/Grid2'
-
-// Type Imports
-import type { Customer } from '@/types/apps/ecommerceTypes'
-
-// Component Imports
-import CustomerDetailsHeader from './CustomerDetailsHeader'
-import CustomerLeftOverview from './customer-left-overview'
-import CustomerRight from './customer-right'
-
-const OverViewTab = dynamic(() => import('@views/apps/ecommerce/customers/details/customer-right/overview'))
-const SecurityTab = dynamic(() => import('@views/apps/ecommerce/customers/details/customer-right/security'))
-const NotificationsTab = dynamic(() => import('@views/apps/ecommerce/customers/details/customer-right/notification'))
-
-const AddressBillingTab = dynamic(
- () => import('@views/apps/ecommerce/customers/details/customer-right/address-billing')
-)
-
-// Vars
-const tabContentList = (): { [key: string]: ReactElement } => ({
- overview: ,
- security: ,
- addressBilling: ,
- notifications:
-})
-
-const CustomerDetails = ({ customerData, customerId }: { customerData?: Customer; customerId: string }) => {
- return (
-
-
-
-
-
-
-
-
-
-
-
- )
-}
-
-export default CustomerDetails
diff --git a/src/views/apps/email/ComposeMail.tsx b/src/views/apps/email/ComposeMail.tsx
deleted file mode 100644
index 268420c..0000000
--- a/src/views/apps/email/ComposeMail.tsx
+++ /dev/null
@@ -1,263 +0,0 @@
-// React Imports
-import { useState } from 'react'
-
-// MUI Imports
-import Drawer from '@mui/material/Drawer'
-import Button from '@mui/material/Button'
-import Typography from '@mui/material/Typography'
-import IconButton from '@mui/material/IconButton'
-import InputBase from '@mui/material/InputBase'
-
-// Third-party Imports
-import classnames from 'classnames'
-import { useEditor, EditorContent } from '@tiptap/react'
-import { StarterKit } from '@tiptap/starter-kit'
-import { Underline } from '@tiptap/extension-underline'
-import { Placeholder } from '@tiptap/extension-placeholder'
-import { TextAlign } from '@tiptap/extension-text-align'
-import type { Editor } from '@tiptap/core'
-
-// Component Imports
-import CustomIconButton from '@core/components/mui/IconButton'
-
-// Hook Imports
-import { useSettings } from '@core/hooks/useSettings'
-
-// Style Imports
-import '@/libs/styles/tiptapEditor.css'
-
-type Props = {
- openCompose: boolean
- setOpenCompose: (value: boolean) => void
- isBelowSmScreen: boolean
- isBelowMdScreen: boolean
-}
-
-const EditorToolbar = ({ editor }: { editor: Editor | null }) => {
- if (!editor) {
- return null
- }
-
- return (
-
- editor.chain().focus().toggleBold().run()}
- >
-
-
- editor.chain().focus().toggleUnderline().run()}
- >
-
-
- editor.chain().focus().toggleItalic().run()}
- >
-
-
- editor.chain().focus().toggleStrike().run()}
- >
-
-
- editor.chain().focus().setTextAlign('left').run()}
- >
-
-
- editor.chain().focus().setTextAlign('center').run()}
- >
-
-
- editor.chain().focus().setTextAlign('right').run()}
- >
-
-
- editor.chain().focus().setTextAlign('justify').run()}
- >
-
-
-
- )
-}
-
-const ComposeMail = (props: Props) => {
- // Props
- const { openCompose, setOpenCompose, isBelowSmScreen, isBelowMdScreen } = props
-
- // States
- const [visibility, setVisibility] = useState({ cc: false, bcc: false })
-
- // Hooks
- const { settings } = useSettings()
-
- const toggleVisibility = (value: 'cc' | 'bcc') => {
- setVisibility(prev => ({ ...prev, [value]: !prev[value] }))
- }
-
- const editor = useEditor({
- extensions: [
- StarterKit,
- Placeholder.configure({
- placeholder: 'Message'
- }),
- TextAlign.configure({
- types: ['heading', 'paragraph']
- }),
- Underline
- ],
- immediatelyRender: false
- })
-
- return (
- setOpenCompose(false)}
- PaperProps={{
- sx: {
- width: isBelowMdScreen ? 'calc(100% - 2 * 1.5rem)' : '100%',
- maxWidth: 600,
- position: 'absolute',
- height: 'auto',
- insetInlineStart: 'auto',
- insetInlineEnd: '1.5rem',
- insetBlockEnd: '1.5rem',
- borderRadius: 'var(--mui-shape-borderRadius)',
- borderTop: 0,
- boxShadow: settings.skin === 'bordered' ? 'none' : 'var(--mui-customShadows-xl)',
- border: settings.skin === 'bordered' ? '1px solid var(--mui-palette-divider)' : undefined,
- zIndex: 12
- }
- }}
- >
-
-
- Compose Mail
-
-
- setOpenCompose(false)}>
-
-
- setOpenCompose(false)}>
-
-
-
-
-
-
- To:
-
-
-
- toggleVisibility('cc')}>
- Cc
-
- |
- toggleVisibility('bcc')}>
- Bcc
-
-
-
- {visibility.cc && (
-
- Cc:
-
- }
- />
- )}
- {visibility.bcc && (
-
- Bcc:
-
- }
- />
- )}
-
- Subject:
-
- }
- />
-
-
-
-
- {isBelowSmScreen ? (
-
-
-
- ) : (
- } onClick={() => setOpenCompose(false)}>
- Send
-
- )}
-
-
-
-
-
-
-
-
- setOpenCompose(false)}>
-
-
-
-
-
- )
-}
-
-export default ComposeMail
diff --git a/src/views/apps/email/MailCard.tsx b/src/views/apps/email/MailCard.tsx
deleted file mode 100644
index 61fe06f..0000000
--- a/src/views/apps/email/MailCard.tsx
+++ /dev/null
@@ -1,95 +0,0 @@
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardContent from '@mui/material/CardContent'
-import Divider from '@mui/material/Divider'
-import Typography from '@mui/material/Typography'
-import IconButton from '@mui/material/IconButton'
-
-// Third-party Imports
-import classnames from 'classnames'
-
-// Type Imports
-import type { Email } from '@/types/apps/emailTypes'
-
-// Component Imports
-import CustomAvatar from '@core/components/mui/Avatar'
-import OptionMenu from '@core/components/option-menu'
-
-// Styles Imports
-import styles from './styles.module.css'
-
-const CardHeaderAction = ({ data, isReplies }: { data: Email; isReplies: boolean }) => {
- return (
-
-
- {new Intl.DateTimeFormat('en-US', {
- year: 'numeric',
- month: 'short',
- day: '2-digit',
- hour: '2-digit',
- minute: '2-digit',
- hour12: true
- }).format(new Date(data.time))}
-
-
- {data.attachments.length ? (
-
-
-
- ) : null}
- {isReplies ? (
-
- ) : (
-
-
-
- )}
-
-
- )
-}
-
-const MailCard = ({ data, isReplies }: { data: Email; isReplies: boolean }) => {
- return (
-
-
-
-
-
- {data.from.name}
- {data.from.email}
-
-
-
-
-
-
-
- {data.attachments.length ? (
-
-
-
Attachments
- {data.attachments.map(attachment => (
-
-
-
{attachment.fileName}
-
- ))}
-
- ) : null}
-
-
- )
-}
-
-export default MailCard
diff --git a/src/views/apps/email/MailContent.tsx b/src/views/apps/email/MailContent.tsx
deleted file mode 100644
index fa7f2da..0000000
--- a/src/views/apps/email/MailContent.tsx
+++ /dev/null
@@ -1,152 +0,0 @@
-// React Imports
-import { useState } from 'react'
-import type { MouseEvent } from 'react'
-
-// Types Imports
-import type { AppDispatch } from '@/redux-store'
-import type { EmailState } from '@/types/apps/emailTypes'
-
-// Slice Imports
-import { moveEmailsToFolder, deleteTrashEmails, toggleReadEmails, toggleStarEmail } from '@/redux-store/slices/email'
-
-// Component Imports
-import MailContentSearch from './MailContentSearch'
-import MailContentActions from './MailContentActions'
-import MailContentList from './MailContentList'
-import MailDetails from './MailDetails'
-
-type Props = {
- folder?: string
- label?: string
- store: EmailState
- dispatch: AppDispatch
- uniqueLabels: string[]
- isInitialMount: boolean
- setSidebarOpen: (value: boolean) => void
- isBelowLgScreen: boolean
- isBelowMdScreen: boolean
- isBelowSmScreen: boolean
- setBackdropOpen: (value: boolean) => void
-}
-
-const MailContent = (props: Props) => {
- // Props
- const {
- folder,
- label,
- store,
- dispatch,
- uniqueLabels,
- isInitialMount,
- setSidebarOpen,
- isBelowLgScreen,
- isBelowMdScreen,
- isBelowSmScreen,
- setBackdropOpen
- } = props
-
- // States
- const [selectedEmails, setSelectedEmails] = useState>(new Set())
- const [drawerOpen, setDrawerOpen] = useState(false)
- const [reload, setReload] = useState(false)
- const [searchTerm, setSearchTerm] = useState('')
-
- // Vars
- const emails = store.filteredEmails
- const currentEmail = emails.find(email => email.id === store.currentEmailId)
-
- const areFilteredEmailsNone =
- emails.length === 0 ||
- emails.filter(
- email =>
- email.subject.toLowerCase().includes(searchTerm.toLowerCase()) ||
- email.from.name.toLowerCase().includes(searchTerm.toLowerCase())
- ).length === 0
-
- // Action for deleting single email
- const handleSingleEmailDelete = (e: MouseEvent, emailId: number) => {
- e.stopPropagation()
- setSelectedEmails(prevSelectedEmails => {
- const newSelectedEmails = new Set(prevSelectedEmails)
-
- newSelectedEmails.delete(emailId)
-
- return newSelectedEmails
- })
-
- if (folder === 'trash') {
- dispatch(deleteTrashEmails({ emailIds: [emailId] }))
- } else {
- dispatch(moveEmailsToFolder({ emailIds: [emailId], folder: 'trash' }))
- }
- }
-
- // Toggle read status for single email
- const handleToggleIsReadStatus = (e: MouseEvent, id: number) => {
- e.stopPropagation()
- dispatch(toggleReadEmails({ emailIds: [id] }))
- }
-
- // Toggle star for single email
- const handleToggleStarEmail = (e: MouseEvent, id: number) => {
- e.stopPropagation()
- dispatch(toggleStarEmail({ emailId: id }))
- }
-
- return (
-
-
-
-
-
-
- )
-}
-
-export default MailContent
diff --git a/src/views/apps/email/MailContentActions.tsx b/src/views/apps/email/MailContentActions.tsx
deleted file mode 100644
index 3489313..0000000
--- a/src/views/apps/email/MailContentActions.tsx
+++ /dev/null
@@ -1,226 +0,0 @@
-// MUI Imports
-import Checkbox from '@mui/material/Checkbox'
-import Tooltip from '@mui/material/Tooltip'
-import IconButton from '@mui/material/IconButton'
-
-// Third-party Imports
-import classnames from 'classnames'
-
-// Type Imports
-import type { AppDispatch } from '@/redux-store'
-import type { Email } from '@/types/apps/emailTypes'
-
-// Slice Imports
-import { deleteTrashEmails, moveEmailsToFolder, toggleLabel, toggleReadEmails } from '@/redux-store/slices/email'
-
-// Component Imports
-import OptionMenu from '@core/components/option-menu'
-
-// Data Imports
-import { labelColors } from './SidebarLeft'
-
-type Props = {
- areFilteredEmailsNone: boolean
- selectedEmails: Set
- emails: Email[]
- folder?: string
- label?: string
- uniqueLabels: string[]
- dispatch: AppDispatch
- setReload: (value: boolean) => void
- setSelectedEmails: (value: Set) => void
-}
-
-const MailContentActions = (props: Props) => {
- // Props
- const {
- areFilteredEmailsNone,
- selectedEmails,
- setSelectedEmails,
- emails,
- folder,
- label,
- uniqueLabels,
- setReload,
- dispatch
- } = props
-
- // Vars
- const areAllSelected = selectedEmails.size > 0 && selectedEmails.size === emails.length
- const isIndeterminate = selectedEmails.size > 0 && selectedEmails.size < emails.length
-
- // Handle reload
- const handleReload = () => {
- setReload(true)
-
- setTimeout(() => {
- setReload(false)
- }, 2000)
- }
-
- // Toggle all emails' selection
- const handleSelectAllCheckboxes = () => {
- if (areAllSelected) {
- setSelectedEmails(new Set())
- } else {
- const visibleEmailIds = new Set(
- emails
- .filter(email => {
- if (folder === 'starred' && email.folder !== 'trash') {
- return email.isStarred
- } else if (label && uniqueLabels.includes(label) && email.folder !== 'trash') {
- return email.labels.includes(label)
- } else {
- return email.folder === folder
- }
- })
- .map(email => email.id)
- )
-
- setSelectedEmails(visibleEmailIds)
- }
- }
-
- // Delete selected emails
- const handleEmailDelete = () => {
- const emailIds = emails.filter(email => selectedEmails.has(email.id)).map(email => email.id)
-
- if (folder === 'trash') {
- dispatch(deleteTrashEmails({ emailIds }))
- setSelectedEmails(new Set())
- } else {
- dispatch(moveEmailsToFolder({ emailIds, folder: 'trash' }))
- setSelectedEmails(new Set())
- }
- }
-
- // Toggle all selected emails' read status
- const handleToggleAllReadEmails = () => {
- const emailIds = emails.filter(email => selectedEmails.has(email.id)).map(email => email.id)
-
- dispatch(toggleReadEmails({ emailIds }))
- setSelectedEmails(new Set())
- }
-
- // Move all selected emails to spam
- const handleMoveAllToSpam = () => {
- const emailIds = emails.filter(email => selectedEmails.has(email.id)).map(email => email.id)
-
- dispatch(moveEmailsToFolder({ emailIds, folder: 'spam' }))
- setSelectedEmails(new Set())
- }
-
- // Move all selected emails to inbox
- const handleMoveAllToInbox = () => {
- const emailIds = emails.filter(email => selectedEmails.has(email.id)).map(email => email.id)
-
- dispatch(moveEmailsToFolder({ emailIds, folder: 'inbox' }))
- setSelectedEmails(new Set())
- }
-
- // Handle click on label option from menu list
- const handleLabelClick = (label: string) => {
- const emailIds = emails.filter(email => selectedEmails.has(email.id)).map(email => email.id)
-
- dispatch(toggleLabel({ emailIds, label }))
- setSelectedEmails(new Set())
- }
-
- return (
-
-
-
- {(isIndeterminate || areAllSelected) && (
- <>
-
-
-
-
-
- 0 &&
- emails.filter(email => selectedEmails.has(email.id)).every(email => email.isRead)
- ? 'Mark as unread'
- : 'Mark as read'
- }
- placement='top'
- >
-
- 0 &&
- emails.filter(email => selectedEmails.has(email.id)).every(email => email.isRead)
- ? 'tabler-mail'
- : 'tabler-mail-opened'
- )}
- />
-
-
- {folder === 'inbox' && (
-
-
-
-
-
- )}
- {folder === 'spam' && (
-
-
-
-
-
- )}
- {folder === 'trash' && (
- }
- iconButtonProps={{ size: 'medium' }}
- options={[
- {
- text: 'Spam',
- icon: ,
- menuItemProps: { onClick: handleMoveAllToSpam }
- },
- {
- text: 'Inbox',
- icon: ,
- menuItemProps: { onClick: handleMoveAllToInbox }
- }
- ]}
- />
- )}
- }
- iconButtonProps={{ size: 'medium' }}
- options={Object.entries(labelColors).map(([key, value]) => ({
- text: key.charAt(0).toUpperCase() + key.slice(1),
- menuItemProps: { onClick: () => handleLabelClick(key) },
- icon:
- }))}
- />
- >
- )}
-
-
-
-
-
-
-
-
-
-
-
-
- )
-}
-
-export default MailContentActions
diff --git a/src/views/apps/email/MailContentList.tsx b/src/views/apps/email/MailContentList.tsx
deleted file mode 100644
index 7754fcb..0000000
--- a/src/views/apps/email/MailContentList.tsx
+++ /dev/null
@@ -1,230 +0,0 @@
-// React Imports
-import type { Dispatch, MouseEvent, ReactNode, SetStateAction } from 'react'
-
-// MUI Imports
-import CircularProgress from '@mui/material/CircularProgress'
-import Typography from '@mui/material/Typography'
-import Checkbox from '@mui/material/Checkbox'
-import IconButton from '@mui/material/IconButton'
-import Tooltip from '@mui/material/Tooltip'
-import Backdrop from '@mui/material/Backdrop'
-
-// Third-party Imports
-import classnames from 'classnames'
-import PerfectScrollbar from 'react-perfect-scrollbar'
-
-// Type Imports
-import type { AppDispatch } from '@/redux-store'
-import type { Email, EmailState } from '@/types/apps/emailTypes'
-
-// Slice Imports
-import { getCurrentEmail, moveEmailsToFolder } from '@/redux-store/slices/email'
-
-// Component Imports
-import CustomAvatar from '@core/components/mui/Avatar'
-
-// Styles Imports
-import styles from './styles.module.css'
-
-// Data Imports
-import { labelColors } from './SidebarLeft'
-
-type Props = {
- isInitialMount: boolean
- isBelowSmScreen: boolean
- isBelowLgScreen: boolean
- reload: boolean
- areFilteredEmailsNone: boolean
- searchTerm: string
- selectedEmails: Set
- dispatch: AppDispatch
- store: EmailState
- emails: Email[]
- folder?: string
- setSelectedEmails: Dispatch>> // This type has been written to solve type error in this file
- setDrawerOpen: (value: boolean) => void
- handleToggleStarEmail: (e: MouseEvent, id: number) => void
- handleSingleEmailDelete: (e: MouseEvent, id: number) => void
- handleToggleIsReadStatus: (e: MouseEvent, id: number) => void
-}
-
-const ScrollWrapper = ({ children, isBelowLgScreen }: { children: ReactNode; isBelowLgScreen: boolean }) => {
- if (isBelowLgScreen) {
- return {children}
- } else {
- return {children}
- }
-}
-
-const MailContentList = (props: Props) => {
- // Props
- const {
- isInitialMount,
- isBelowSmScreen,
- isBelowLgScreen,
- reload,
- areFilteredEmailsNone,
- searchTerm,
- selectedEmails,
- dispatch,
- store,
- emails,
- folder,
- setSelectedEmails,
- setDrawerOpen,
- handleToggleStarEmail,
- handleSingleEmailDelete,
- handleToggleIsReadStatus
- } = props
-
- // Toggle single selection of email
- const toggleEmailSelected = (emailId: number) => {
- setSelectedEmails(prevSelectedEmails => {
- const newSelectedEmails = new Set(prevSelectedEmails)
-
- if (newSelectedEmails.has(emailId)) {
- newSelectedEmails.delete(emailId)
- } else {
- newSelectedEmails.add(emailId)
- }
-
- return newSelectedEmails
- })
- }
-
- // Move single email to spam
- const handleMoveToSpam = (e: MouseEvent, id: number) => {
- e.stopPropagation()
- dispatch(moveEmailsToFolder({ emailIds: [id], folder: 'spam' }))
- }
-
- // Handle email click
- const handleEmailClick = (id: number) => {
- setDrawerOpen(true)
-
- if (store.currentEmailId !== id || emails.find(email => email.id === id)?.isRead === false) {
- dispatch(getCurrentEmail(id))
- }
- }
-
- return isInitialMount ? (
-
-
- Loading...
-
- ) : areFilteredEmailsNone ? (
-
- No emails found!
- {reload && (
-
-
-
- )}
-
- ) : (
-
-
-
- {emails
- .filter(
- email =>
- email.subject.toLowerCase().includes(searchTerm.toLowerCase()) ||
- email.from.name.toLowerCase().includes(searchTerm.toLowerCase())
- )
- .map(email => (
-
handleEmailClick(email.id)}
- >
-
-
-
toggleEmailSelected(email.id)}
- onClick={e => e.stopPropagation()}
- />
- handleToggleStarEmail(e, email.id)}>
-
-
-
-
-
- {email.from.name}
-
-
- {email.subject}
-
-
-
- {!isBelowSmScreen && (
-
-
- {email.labels.map(label => (
-
- ))}
-
-
- {new Intl.DateTimeFormat('en-US', {
- hour: '2-digit',
- minute: '2-digit',
- hour12: true
- }).format(new Date(email.time))}
-
-
- )}
- {!isBelowLgScreen && (
-
-
- handleSingleEmailDelete(e, email.id)}>
-
-
-
-
- {
- handleToggleIsReadStatus(e, email.id)
- setSelectedEmails(new Set())
- }}
- >
-
-
-
- {(folder === 'inbox' || folder === 'trash') && (
-
- handleMoveToSpam(e, email.id)}>
-
-
-
- )}
-
- )}
-
-
- ))}
-
-
- {reload && (
-
-
-
- )}
-
- )
-}
-
-export default MailContentList
diff --git a/src/views/apps/email/MailContentSearch.tsx b/src/views/apps/email/MailContentSearch.tsx
deleted file mode 100644
index 50f416b..0000000
--- a/src/views/apps/email/MailContentSearch.tsx
+++ /dev/null
@@ -1,42 +0,0 @@
-// MUI Imports
-import IconButton from '@mui/material/IconButton'
-import InputBase from '@mui/material/InputBase'
-
-type Props = {
- isBelowScreen: boolean
- searchTerm: string
- setSidebarOpen: (value: boolean) => void
- setBackdropOpen: (value: boolean) => void
- setSearchTerm: (value: string) => void
-}
-
-const MailContentSearch = (props: Props) => {
- // Props
- const { isBelowScreen, searchTerm, setSidebarOpen, setBackdropOpen, setSearchTerm } = props
-
- // Open sidebar on below md screen
- const handleToggleSidebar = () => {
- setSidebarOpen(true)
- setBackdropOpen(true)
- }
-
- return (
-
- {isBelowScreen && (
-
-
-
- )}
- setSearchTerm(e.target.value)}
- startAdornment={ }
- placeholder='Search mail'
- className='bs-[56px]'
- />
-
- )
-}
-
-export default MailContentSearch
diff --git a/src/views/apps/email/MailDetails.tsx b/src/views/apps/email/MailDetails.tsx
deleted file mode 100644
index 4bb15ca..0000000
--- a/src/views/apps/email/MailDetails.tsx
+++ /dev/null
@@ -1,477 +0,0 @@
-// React Imports
-import { useState } from 'react'
-import type { MouseEvent, ReactNode } from 'react'
-
-// MUI Imports
-import Typography from '@mui/material/Typography'
-import IconButton from '@mui/material/IconButton'
-import Card from '@mui/material/Card'
-import CardContent from '@mui/material/CardContent'
-import CardActions from '@mui/material/CardActions'
-import Button from '@mui/material/Button'
-import Tooltip from '@mui/material/Tooltip'
-import { styled } from '@mui/material'
-
-// Third-party Imports
-import classnames from 'classnames'
-import PerfectScrollbar from 'react-perfect-scrollbar'
-import { useEditor, EditorContent } from '@tiptap/react'
-import { StarterKit } from '@tiptap/starter-kit'
-import { Underline } from '@tiptap/extension-underline'
-import { Placeholder } from '@tiptap/extension-placeholder'
-import { TextAlign } from '@tiptap/extension-text-align'
-import type { Editor } from '@tiptap/core'
-
-// Types Imports
-import type { AppDispatch } from '@/redux-store'
-import type { Email } from '@/types/apps/emailTypes'
-
-// Slice Imports
-import { moveEmailsToFolder, navigateEmails, toggleLabel } from '@/redux-store/slices/email'
-
-// Components Imports
-import CustomIconButton from '@core/components/mui/IconButton'
-import CustomChip from '@core/components/mui/Chip'
-import OptionMenu from '@core/components/option-menu'
-import DirectionalIcon from '@components/DirectionalIcon'
-import MailCard from './MailCard'
-
-// Styles Imports
-import styles from './styles.module.css'
-
-// Data Imports
-import { labelColors } from './SidebarLeft'
-
-type Props = {
- drawerOpen: boolean
- setDrawerOpen: (value: boolean) => void
- currentEmail?: Email
- isBelowSmScreen: boolean
- isBelowLgScreen: boolean
- emails: Email[]
- folder?: string
- label?: string
- dispatch: AppDispatch
- handleSingleEmailDelete: (e: MouseEvent, emailIds: number) => void
- handleToggleIsReadStatus: (e: MouseEvent, emailId: number) => void
- handleToggleStarEmail: (e: MouseEvent, emailId: number) => void
-}
-
-const ScrollWrapper = ({ children, isBelowLgScreen }: { children: ReactNode; isBelowLgScreen: boolean }) => {
- if (isBelowLgScreen) {
- return {children}
- } else {
- return (
-
- {children}
-
- )
- }
-}
-
-const DetailsDrawer = styled('div')<{ drawerOpen: boolean }>(({ drawerOpen }) => ({
- display: 'flex',
- flexDirection: 'column',
- blockSize: '100%',
- inlineSize: '100%',
- position: 'absolute',
- top: 0,
- right: drawerOpen ? 0 : '-100%',
- zIndex: 11,
- overflow: 'hidden',
- background: 'var(--mui-palette-background-paper)',
- transition: 'right 0.3s ease'
-}))
-
-const EditorToolbar = ({ editor }: { editor: Editor | null }) => {
- if (!editor) {
- return null
- }
-
- return (
-
- editor.chain().focus().toggleBold().run()}
- >
-
-
- editor.chain().focus().toggleUnderline().run()}
- >
-
-
- editor.chain().focus().toggleItalic().run()}
- >
-
-
- editor.chain().focus().toggleStrike().run()}
- >
-
-
- editor.chain().focus().setTextAlign('left').run()}
- >
-
-
- editor.chain().focus().setTextAlign('center').run()}
- >
-
-
- editor.chain().focus().setTextAlign('right').run()}
- >
-
-
- editor.chain().focus().setTextAlign('justify').run()}
- >
-
-
-
- )
-}
-
-const MailDetails = (props: Props) => {
- // Props
- const {
- drawerOpen,
- setDrawerOpen,
- isBelowSmScreen,
- isBelowLgScreen,
- currentEmail,
- emails,
- folder,
- label,
- dispatch,
- handleSingleEmailDelete,
- handleToggleIsReadStatus,
- handleToggleStarEmail
- } = props
-
- // States
- const [showReplies, setShowReplies] = useState(false)
- const [reply, setReply] = useState(false)
-
- // Handle navigation between emails and reset reply state
- const handleEmailNavigation = (type: 'next' | 'prev') => {
- dispatch(navigateEmails({ type, emails, currentEmailId: currentEmail?.id }))
-
- if (reply) {
- setReply(false)
- }
- }
-
- // Close drawer and reset reply state
- const handleCloseDrawer = () => {
- setDrawerOpen(false)
-
- if (reply) {
- setReply(false)
- }
- }
-
- // Move all selected emails to spam
- const handleMoveAllToSpam = () => {
- dispatch(moveEmailsToFolder({ emailIds: [currentEmail?.id], folder: 'spam' }))
- setDrawerOpen(false)
- }
-
- // Move all selected emails to inbox
- const handleMoveAllToInbox = () => {
- dispatch(moveEmailsToFolder({ emailIds: [currentEmail?.id], folder: 'inbox' }))
- setDrawerOpen(false)
- }
-
- // Handle click on label option from menu list
- const handleLabelClick = (value: string) => {
- dispatch(toggleLabel({ emailIds: [currentEmail?.id], label: value }))
- label === value && setDrawerOpen(false)
- }
-
- const editor = useEditor({
- extensions: [
- StarterKit,
- Placeholder.configure({
- placeholder: 'Write your message...'
- }),
- TextAlign.configure({
- types: ['heading', 'paragraph']
- }),
- Underline
- ],
- immediatelyRender: false
- })
-
- return (
-
- {currentEmail && (
- <>
-
-
-
-
-
-
-
-
- {currentEmail.subject}
-
-
- {currentEmail.labels && currentEmail.labels.length
- ? currentEmail.labels.map(label => {
- return (
-
- )
- })
- : null}
-
-
-
-
- handleEmailNavigation('prev')}>
-
-
- handleEmailNavigation('next')}
- >
-
-
-
-
-
-
-
-
- {
- setDrawerOpen(false)
- handleSingleEmailDelete(e, currentEmail.id)
- }}
- >
-
-
-
-
- {
- setDrawerOpen(false)
- handleToggleIsReadStatus(e, currentEmail.id)
- }}
- >
-
-
-
- {folder === 'inbox' && (
-
-
-
-
-
- )}
- {folder === 'spam' && (
-
-
-
-
-
- )}
- {folder === 'trash' && (
- }
- iconButtonProps={{ size: 'medium' }}
- options={[
- {
- text: 'Spam',
- icon: ,
- menuItemProps: { onClick: handleMoveAllToSpam }
- },
- {
- text: 'Inbox',
- icon: ,
- menuItemProps: { onClick: handleMoveAllToInbox }
- }
- ]}
- />
- )}
- }
- iconButtonProps={{ size: 'medium' }}
- options={Object.entries(labelColors).map(([key, value]) => ({
- text: key.charAt(0).toUpperCase() + key.slice(1),
- menuItemProps: { onClick: () => handleLabelClick(key) },
- icon:
- }))}
- />
-
-
- {
- handleToggleStarEmail(e, currentEmail.id)
- folder === 'starred' && setDrawerOpen(false)
- }}
- >
-
-
- {currentEmail.replies.length ? (
- setShowReplies(!showReplies)}>
-
-
- ) : null}
-
-
-
-
-
-
-
- {currentEmail.replies.length && !showReplies ? (
-
setShowReplies(true)}>
- {`${currentEmail.replies.length} Earlier Messages`}
-
- ) : null}
- {showReplies
- ? currentEmail.replies.map(reply =>
)
- : null}
-
-
- {!showReplies && currentEmail.replies.length ? (
- <>
-
setShowReplies(true)}
- />
-
setShowReplies(true)}
- />
- >
- ) : null}
-
-
- {!reply ? (
-
-
- Click here to
- setReply(true)}>
- Reply
-
- or
- Forward
-
-
- ) : (
-
-
- {`Reply to ${currentEmail.from.name}`}
-
-
-
-
-
-
-
- setReply(false)} />
-
- {isBelowSmScreen ? (
-
-
-
- ) : (
- }>
- Attachments
-
- )}
- {isBelowSmScreen ? (
-
-
-
- ) : (
- }>
- Send
-
- )}
-
-
- )}
-
-
-
-
- >
- )}
-
- )
-}
-
-export default MailDetails
diff --git a/src/views/apps/email/SidebarLeft.tsx b/src/views/apps/email/SidebarLeft.tsx
deleted file mode 100644
index 0c7b7fb..0000000
--- a/src/views/apps/email/SidebarLeft.tsx
+++ /dev/null
@@ -1,195 +0,0 @@
-// React Imports
-import { useState } from 'react'
-import type { ReactNode } from 'react'
-
-// Next Imports
-import Link from 'next/link'
-import { useParams } from 'next/navigation'
-
-// MUI Imports
-import Drawer from '@mui/material/Drawer'
-import CardContent from '@mui/material/CardContent'
-import Button from '@mui/material/Button'
-import Typography from '@mui/material/Typography'
-
-// Third-party Imports
-import classnames from 'classnames'
-import PerfectScrollbar from 'react-perfect-scrollbar'
-
-// Types Imports
-import type { Email, EmailState } from '@/types/apps/emailTypes'
-import type { ThemeColor } from '@core/types'
-import type { Locale } from '@/configs/i18n'
-
-// Components Imports
-import ComposeMail from './ComposeMail'
-import CustomChip from '@core/components/mui/Chip'
-
-// Util Imports
-import { getLocalizedUrl } from '@/utils/i18n'
-
-// Styles Imports
-import styles from './styles.module.css'
-
-type Props = {
- store: EmailState
- isBelowLgScreen: boolean
- isBelowMdScreen: boolean
- isBelowSmScreen: boolean
- sidebarOpen: boolean
- setSidebarOpen: (value: boolean) => void
- uniqueLabels: string[]
- folder?: string
- label: string
-}
-
-type LabelColor = {
- color: ThemeColor
- colorClass: string
-}
-
-// Constants
-const icons = {
- inbox: 'tabler-mail',
- sent: 'tabler-send',
- draft: 'tabler-edit',
- starred: 'tabler-star',
- spam: 'tabler-alert-octagon',
- trash: 'tabler-trash'
-}
-
-export const labelColors: { [key: string]: LabelColor } = {
- personal: { color: 'success', colorClass: 'text-success' },
- company: { color: 'primary', colorClass: 'text-primary' },
- important: { color: 'warning', colorClass: 'text-warning' },
- private: { color: 'error', colorClass: 'text-error' }
-}
-
-const ScrollWrapper = ({ children, isBelowLgScreen }: { children: ReactNode; isBelowLgScreen: boolean }) => {
- if (isBelowLgScreen) {
- return
{children}
- } else {
- return
{children}
- }
-}
-
-const SidebarLeft = (props: Props) => {
- // Props
- const {
- store,
- isBelowLgScreen,
- isBelowMdScreen,
- isBelowSmScreen,
- sidebarOpen,
- setSidebarOpen,
- uniqueLabels,
- folder,
- label
- } = props
-
- // States
- const [openCompose, setOpenCompose] = useState(false)
-
- // Hooks
- const { lang: locale } = useParams()
-
- const folderCounts = store.emails.reduce((counts: Record
, email: Email) => {
- if (!email.isRead && email.folder !== 'trash') {
- counts[email.folder] = (counts[email.folder] || 0) + 1
- } else if (email.folder === 'draft') {
- counts.draft = (counts.draft || 0) + 1
- }
-
- return counts
- }, {})
-
- return (
- <>
- setSidebarOpen(false)}
- className='bs-full'
- variant={!isBelowMdScreen ? 'permanent' : 'persistent'}
- ModalProps={{ disablePortal: true, keepMounted: true }}
- sx={{
- zIndex: isBelowMdScreen && sidebarOpen ? 11 : 10,
- position: !isBelowMdScreen ? 'static' : 'absolute',
- '& .MuiDrawer-paper': {
- boxShadow: 'none',
- overflow: 'hidden',
- width: '260px',
- position: !isBelowMdScreen ? 'static' : 'absolute'
- }
- }}
- >
-
- setOpenCompose(true)}>
- Compose
-
-
-
-
- {Object.entries(icons).map(([key, value]) => (
-
-
-
-
- {key}
-
-
- {folderCounts[key] && (
-
- )}
-
- ))}
-
-
-
- Labels
-
-
- {uniqueLabels.map(labelName => (
-
-
-
- {labelName}
-
-
- ))}
-
-
-
-
-
- >
- )
-}
-
-export default SidebarLeft
diff --git a/src/views/apps/email/index.tsx b/src/views/apps/email/index.tsx
deleted file mode 100644
index cad0382..0000000
--- a/src/views/apps/email/index.tsx
+++ /dev/null
@@ -1,125 +0,0 @@
-'use client'
-
-// React Imports
-import { useEffect, useRef, useState } from 'react'
-
-// MUI Imports
-import { useMediaQuery } from '@mui/material'
-import Backdrop from '@mui/material/Backdrop'
-import type { Theme } from '@mui/material/styles'
-
-// Third-party Imports
-import classnames from 'classnames'
-import { useDispatch, useSelector } from 'react-redux'
-
-// Type Imports
-import type { RootState } from '@/redux-store'
-
-// Slice Imports
-import { filterEmails } from '@/redux-store/slices/email'
-
-// Component Imports
-import SidebarLeft from './SidebarLeft'
-import MailContent from './MailContent'
-
-// Hook Imports
-import { useSettings } from '@core/hooks/useSettings'
-
-// Util Imports
-import { commonLayoutClasses } from '@layouts/utils/layoutClasses'
-
-const EmailWrapper = ({ folder, label }: { folder?: string; label?: string }) => {
- // States
- const [sidebarOpen, setSidebarOpen] = useState(false)
- const [backdropOpen, setBackdropOpen] = useState(false)
-
- // Refs
- const isInitialMount = useRef(true)
-
- // Hooks
- const { settings } = useSettings()
- const emailStore = useSelector((state: RootState) => state.emailReducer)
- const dispatch = useDispatch()
- const isBelowLgScreen = useMediaQuery((theme: Theme) => theme.breakpoints.down('lg'))
- const isBelowMdScreen = useMediaQuery((theme: Theme) => theme.breakpoints.down('md'))
- const isBelowSmScreen = useMediaQuery((theme: Theme) => theme.breakpoints.down('sm'))
-
- // Vars
- const uniqueLabels = [...new Set(emailStore.emails.flatMap(email => email.labels))]
-
- // Handle backdrop on click
- const handleBackdropClick = () => {
- setSidebarOpen(false)
- setBackdropOpen(false)
- }
-
- // Set loading false on initial mount
- useEffect(() => {
- if (isInitialMount.current) {
- isInitialMount.current = false
- }
- }, [])
-
- // Filter all emails based on folder and label
- useEffect(() => {
- dispatch(filterEmails({ emails: emailStore.emails, folder, label, uniqueLabels }))
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [emailStore.emails, folder, label])
-
- // Hide backdrop when left sidebar is closed
- useEffect(() => {
- if (backdropOpen && !sidebarOpen) {
- setBackdropOpen(false)
- }
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [sidebarOpen])
-
- // Hide backdrop when screen size is above md
- useEffect(() => {
- if (backdropOpen && !isBelowMdScreen) {
- setBackdropOpen(false)
- }
-
- if (sidebarOpen && !isBelowMdScreen) {
- setSidebarOpen(false)
- }
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [isBelowMdScreen])
-
- return (
-
-
-
-
-
- )
-}
-
-export default EmailWrapper
diff --git a/src/views/apps/email/styles.module.css b/src/views/apps/email/styles.module.css
deleted file mode 100644
index ab8436e..0000000
--- a/src/views/apps/email/styles.module.css
+++ /dev/null
@@ -1,58 +0,0 @@
-.activeSidebarListItem {
- color: var(--mui-palette-primary-main);
- border-inline-start: 3px solid var(--mui-palette-primary-main);
- padding-inline-start: 1.3125rem !important;
-}
-
-.emailList {
- transition:
- border-block-end 0.2s ease-in-out,
- box-shadow 0.2s ease-in-out;
- border-block-end: 1px solid var(--mui-palette-divider);
-
- &:hover {
- box-shadow: var(--mui-customShadows-sm);
- border-color: transparent;
- .emailInfo:not(.show) {
- display: none !important;
- }
- .emailActions {
- display: flex;
- align-items: center;
- gap: 0.25rem;
- }
- }
-}
-
-.emailActions {
- display: none;
-}
-
-.message p:not(:last-child) {
- margin-block-end: 1rem;
-}
-
-.message p:first-child {
- font-weight: 500;
-}
-
-.mailReplyLayer {
- block-size: 15px;
- border-width: 1px 1px 0px;
- display: block;
- margin-inline: auto;
- border-style: solid;
- border-color: var(--mui-palette-divider);
- border-start-start-radius: var(--mui-shape-borderRadius);
- border-start-end-radius: var(--mui-shape-borderRadius);
- background-color: var(--mui-palette-background-paper);
- cursor: pointer;
-}
-.layer1 {
- inline-size: 90%;
- opacity: 0.5;
-}
-.layer2 {
- inline-size: 95%;
- opacity: 0.7;
-}
diff --git a/src/views/apps/invoice/add/AddActions.tsx b/src/views/apps/invoice/add/AddActions.tsx
deleted file mode 100644
index 3377e1f..0000000
--- a/src/views/apps/invoice/add/AddActions.tsx
+++ /dev/null
@@ -1,99 +0,0 @@
-'use client'
-
-// React Imports
-import { useState } from 'react'
-
-// Next Imports
-import Link from 'next/link'
-import { useParams } from 'next/navigation'
-
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardContent from '@mui/material/CardContent'
-import Button from '@mui/material/Button'
-import Grid from '@mui/material/Grid2'
-import InputLabel from '@mui/material/InputLabel'
-import MenuItem from '@mui/material/MenuItem'
-import Switch from '@mui/material/Switch'
-
-// Type Imports
-import type { Locale } from '@configs/i18n'
-
-// Component Imports
-import SendInvoiceDrawer from '@views/apps/invoice/shared/SendInvoiceDrawer'
-import CustomTextField from '@core/components/mui/TextField'
-
-// Util Imports
-import { getLocalizedUrl } from '@/utils/i18n'
-
-const AddActions = () => {
- // States
- const [sendDrawerOpen, setSendDrawerOpen] = useState(false)
-
- // Hooks
- const { lang: locale } = useParams()
-
- return (
-
-
-
-
- }
- onClick={() => setSendDrawerOpen(true)}
- >
- Send Invoice
-
-
- Preview
-
-
- Save
-
-
-
- setSendDrawerOpen(false)} />
-
-
-
-
- Internet Banking
- Debit Card
- Credit Card
- Paypal
- UPI Transfer
-
-
-
- Payment Terms
-
-
-
-
-
- Client Notes
-
-
-
-
-
- Payment Stub
-
-
-
-
-
- )
-}
-
-export default AddActions
diff --git a/src/views/apps/invoice/add/AddCard.tsx b/src/views/apps/invoice/add/AddCard.tsx
deleted file mode 100644
index 3edaca4..0000000
--- a/src/views/apps/invoice/add/AddCard.tsx
+++ /dev/null
@@ -1,372 +0,0 @@
-'use client'
-
-// React Imports
-import { useState } from 'react'
-import type { SyntheticEvent } from 'react'
-
-// MUI Imports
-import Grid from '@mui/material/Grid2'
-import Card from '@mui/material/Card'
-import CardContent from '@mui/material/CardContent'
-import Typography from '@mui/material/Typography'
-import InputAdornment from '@mui/material/InputAdornment'
-import Divider from '@mui/material/Divider'
-import Button from '@mui/material/Button'
-import IconButton from '@mui/material/IconButton'
-import MenuItem from '@mui/material/MenuItem'
-import Tooltip from '@mui/material/Tooltip'
-import InputLabel from '@mui/material/InputLabel'
-import useMediaQuery from '@mui/material/useMediaQuery'
-import type { Theme } from '@mui/material/styles'
-
-// Third-party Imports
-import classnames from 'classnames'
-
-// Type Imports
-import type { InvoiceType } from '@/types/apps/invoiceTypes'
-import type { FormDataType } from './AddCustomerDrawer'
-
-// Component Imports
-import AddCustomerDrawer, { initialFormData } from './AddCustomerDrawer'
-import Logo from '@components/layout/shared/Logo'
-import CustomTextField from '@core/components/mui/TextField'
-
-// Styled Component Imports
-import AppReactDatepicker from '@/libs/styles/AppReactDatepicker'
-
-const AddAction = ({ invoiceData }: { invoiceData?: InvoiceType[] }) => {
- // States
- const [open, setOpen] = useState(false)
- const [count, setCount] = useState(1)
- const [selectData, setSelectData] = useState(null)
- const [issuedDate, setIssuedDate] = useState(null)
- const [dueDate, setDueDate] = useState(null)
- const [formData, setFormData] = useState(initialFormData)
-
- // Hooks
- const isBelowMdScreen = useMediaQuery((theme: Theme) => theme.breakpoints.down('md'))
- const isBelowSmScreen = useMediaQuery((theme: Theme) => theme.breakpoints.down('sm'))
-
- const onFormSubmit = (data: FormDataType) => {
- setFormData(data)
- }
-
- const deleteForm = (e: SyntheticEvent) => {
- e.preventDefault()
-
- // @ts-ignore
- e.target.closest('.repeater-item').remove()
- }
-
- return (
- <>
-
-
-
-
-
-
-
-
-
-
-
- Office 149, 450 South Brand Brooklyn
- San Diego County, CA 91905, USA
- +1 (123) 456 7891, +44 (876) 543 2198
-
-
-
-
-
- Invoice
-
- #
- }
- }}
- />
-
-
-
- Date Issued:
-
-
setIssuedDate(date)}
- customInput={ }
- />
-
-
-
- Date Due:
-
-
setDueDate(date)}
- customInput={ }
- />
-
-
-
-
-
-
-
-
-
-
- Invoice To:
-
-
{
- setFormData({} as FormDataType)
- setSelectData(invoiceData?.slice(0, 5).filter(item => item.id === e.target.value)[0] || null)
- }}
- >
- {
- setSelectData(null)
- setOpen(true)
- }}
- >
-
- Add New Customer
-
- {invoiceData?.slice(0, 5).map((invoice: InvoiceType, index) => (
-
- {invoice.name}
-
- ))}
-
- {selectData?.id ? (
-
- {selectData?.name}
- {selectData?.company}
- {selectData?.address}
- {selectData?.contact}
- {selectData?.companyEmail}
-
- ) : (
-
- {formData?.name}
- {formData?.company}
- {formData?.address}
- {formData?.contactNumber}
- {formData?.email}
-
- )}
-
-
-
- Bill To:
-
-
-
- Total Due:
- $12,110.55
-
-
- Bank name:
- American Bank
-
-
- Country:
- United States
-
-
- IBAN:
- ETD95476213874685
-
-
- SWIFT code:
- BR91905
-
-
-
-
-
-
-
-
-
-
- {Array.from(Array(count).keys()).map((item, index) => (
-
-
-
-
- Item
-
-
- App Design
- App Customization
- ABC Template
- App Development
-
-
-
-
- Cost
-
-
-
- Discount:
-
-
-
- 0%
-
-
-
- 0%
-
-
-
-
- 0%
-
-
-
-
-
-
- Hours
-
-
-
- Price
- $24.00
-
-
-
-
-
-
-
-
- ))}
-
- setCount(count + 1)}
- startIcon={ }
- >
- Add Item
-
-
-
-
-
-
-
-
-
-
-
- Salesperson:
-
-
-
-
-
-
-
- Subtotal:
-
- $1800
-
-
-
- Discount:
-
- $28
-
-
-
- Tax:
-
- 21%
-
-
-
-
- Total:
-
- $1690
-
-
-
-
-
-
-
-
-
-
- Note:
-
-
-
-
-
-
-
- >
- )
-}
-
-export default AddAction
diff --git a/src/views/apps/invoice/add/AddCustomerDrawer.tsx b/src/views/apps/invoice/add/AddCustomerDrawer.tsx
deleted file mode 100644
index 5ef7242..0000000
--- a/src/views/apps/invoice/add/AddCustomerDrawer.tsx
+++ /dev/null
@@ -1,144 +0,0 @@
-// React Imports
-import { useState } from 'react'
-import type { FormEvent } from 'react'
-
-// MUI Imports
-import Drawer from '@mui/material/Drawer'
-import IconButton from '@mui/material/IconButton'
-import Typography from '@mui/material/Typography'
-import MenuItem from '@mui/material/MenuItem'
-import Button from '@mui/material/Button'
-import Divider from '@mui/material/Divider'
-
-// Component Imports
-import CustomTextField from '@core/components/mui/TextField'
-
-type Props = {
- open: boolean
- setOpen: (open: boolean) => void
- onFormSubmit: (formData: FormDataType) => void
-}
-
-export type FormDataType = {
- name: string
- company: string
- email: string
- address: string
- country: string
- contactNumber: string
-}
-
-// Vars
-export const initialFormData: FormDataType = {
- name: '',
- company: '',
- email: '',
- address: '',
- country: 'USA',
- contactNumber: ''
-}
-
-const countries = ['USA', 'UK', 'Russia', 'Australia', 'Canada']
-
-const AddCustomerDrawer = ({ open, setOpen, onFormSubmit }: Props) => {
- // States
- const [data, setData] = useState(initialFormData)
-
- const handleSubmit = (e: FormEvent) => {
- e.preventDefault()
- setOpen(false)
- onFormSubmit(data)
- handleReset()
- }
-
- const handleReset = () => {
- setOpen(false)
- setData(initialFormData)
- }
-
- return (
-
-
- Add New Customer
-
-
-
-
-
-
-
- )
-}
-
-export default AddCustomerDrawer
diff --git a/src/views/apps/invoice/edit/EditActions.tsx b/src/views/apps/invoice/edit/EditActions.tsx
deleted file mode 100644
index dd1d164..0000000
--- a/src/views/apps/invoice/edit/EditActions.tsx
+++ /dev/null
@@ -1,114 +0,0 @@
-'use client'
-
-// React Imports
-import { useState } from 'react'
-
-// Next Imports
-import Link from 'next/link'
-import { useParams } from 'next/navigation'
-
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardContent from '@mui/material/CardContent'
-import Button from '@mui/material/Button'
-import Grid from '@mui/material/Grid2'
-import InputLabel from '@mui/material/InputLabel'
-import MenuItem from '@mui/material/MenuItem'
-import Switch from '@mui/material/Switch'
-
-// Type Imports
-import type { Locale } from '@configs/i18n'
-
-// Component Imports
-import AddPaymentDrawer from '@views/apps/invoice/shared/AddPaymentDrawer'
-import SendInvoiceDrawer from '@views/apps/invoice/shared/SendInvoiceDrawer'
-import CustomTextField from '@core/components/mui/TextField'
-
-// Util Imports
-import { getLocalizedUrl } from '@/utils/i18n'
-
-const EditActions = ({ id }: { id: string }) => {
- // States
- const [paymentDrawerOpen, setPaymentDrawerOpen] = useState(false)
- const [sendDrawerOpen, setSendDrawerOpen] = useState(false)
-
- // Hooks
- const { lang: locale } = useParams()
-
- return (
-
-
-
-
- }
- onClick={() => setSendDrawerOpen(true)}
- >
- Send Invoice
-
-
-
- Preview
-
-
- Save
-
-
- setPaymentDrawerOpen(true)}
- startIcon={ }
- >
- Add Payment
-
-
-
- setPaymentDrawerOpen(false)} />
- setSendDrawerOpen(false)} />
-
-
-
-
- Internet Banking
- Debit Card
- Credit Card
- Paypal
- UPI Transfer
-
-
-
- Payment Terms
-
-
-
-
-
- Client Notes
-
-
-
-
-
- Payment Stub
-
-
-
-
-
- )
-}
-
-export default EditActions
diff --git a/src/views/apps/invoice/edit/EditCard.tsx b/src/views/apps/invoice/edit/EditCard.tsx
deleted file mode 100644
index 3d34cc7..0000000
--- a/src/views/apps/invoice/edit/EditCard.tsx
+++ /dev/null
@@ -1,342 +0,0 @@
-'use client'
-
-// React Imports
-import { useState } from 'react'
-import type { SyntheticEvent } from 'react'
-
-// MUI Imports
-import Grid from '@mui/material/Grid2'
-import Card from '@mui/material/Card'
-import CardContent from '@mui/material/CardContent'
-import Typography from '@mui/material/Typography'
-import InputAdornment from '@mui/material/InputAdornment'
-import MenuItem from '@mui/material/MenuItem'
-import IconButton from '@mui/material/IconButton'
-import Button from '@mui/material/Button'
-import Tooltip from '@mui/material/Tooltip'
-import Divider from '@mui/material/Divider'
-import InputLabel from '@mui/material/InputLabel'
-import useMediaQuery from '@mui/material/useMediaQuery'
-import type { Theme } from '@mui/material/styles'
-
-// Third-party Imports
-import classnames from 'classnames'
-
-// Type Imports
-import type { InvoiceType } from '@/types/apps/invoiceTypes'
-
-// Component Imports
-import Logo from '@components/layout/shared/Logo'
-import CustomTextField from '@core/components/mui/TextField'
-
-// Styled Component Imports
-import AppReactDatepicker from '@/libs/styles/AppReactDatepicker'
-
-const EditCard = ({ invoiceData, id, data }: { invoiceData?: InvoiceType; id: string; data?: InvoiceType[] }) => {
- // States
- const [selectData, setSelectData] = useState(data?.[0] || null)
- const [count, setCount] = useState(1)
- const [issueDate, setIssueDate] = useState(new Date(invoiceData?.issuedDate ?? ''))
- const [dueDate, setDueDate] = useState(new Date(invoiceData?.dueDate ?? ''))
-
- // Hooks
- const isBelowMdScreen = useMediaQuery((theme: Theme) => theme.breakpoints.down('md'))
-
- const deleteForm = (e: SyntheticEvent) => {
- e.preventDefault()
-
- // @ts-ignore
- e.target.closest('.repeater-item').remove()
- }
-
- return (
- <>
-
-
-
-
-
-
-
-
-
-
-
- Office 149, 450 South Brand Brooklyn
- San Diego County, CA 91905, USA
- +1 (123) 456 7891, +44 (876) 543 2198
-
-
-
-
-
- Invoice
-
- #
- }
- }}
- />
-
-
-
- Date Issued:
-
-
date !== null && setIssueDate(date)}
- customInput={ }
- />
-
-
-
- Date Due:
-
-
date !== null && setDueDate(date)}
- customInput={ }
- />
-
-
-
-
-
-
-
-
-
- Invoice To:
-
-
{
- setSelectData(data?.slice(0, 5).filter(item => item.id === e.target.value)[0] || null)
- }}
- >
- {data?.slice(0, 5).map((invoice: InvoiceType, index) => (
-
- {invoice.name}
-
- ))}
-
-
- {selectData?.name}
- {selectData?.company}
- {selectData?.address}
- {selectData?.contact}
- {selectData?.companyEmail}
-
-
-
-
- Bill To:
-
-
-
- Total Due:
- $12,110.55
-
-
- Bank name:
- American Bank
-
-
- Country:
- United States
-
-
- IBAN:
- ETD95476213874685
-
-
- SWIFT code:
- BR91905
-
-
-
-
-
-
-
-
-
- {Array.from(Array(count).keys()).map((item, index) => (
-
-
-
-
- Item
-
-
- App Design
- App Customization
- ABC Template
- App Development
-
-
-
-
-
- Cost
-
-
-
-
- Discount:
-
-
-
- 0%
-
-
-
- 0%
-
-
-
-
- 0%
-
-
-
-
-
-
-
- Hours
-
-
-
-
-
- Price
-
- $24.00
-
-
-
-
-
-
-
-
- ))}
-
- setCount(count + 1)}
- startIcon={ }
- >
- Add Item
-
-
-
-
-
-
-
-
-
-
-
- Salesperson:
-
-
-
-
-
-
-
- Subtotal:
-
- $1800
-
-
-
- Discount:
-
- $28
-
-
-
- Tax:
-
- 21%
-
-
-
-
- Total:
-
- $1690
-
-
-
-
-
-
-
-
-
-
- Note:
-
-
-
-
-
-
- >
- )
-}
-
-export default EditCard
diff --git a/src/views/apps/invoice/list/InvoiceCard.tsx b/src/views/apps/invoice/list/InvoiceCard.tsx
deleted file mode 100644
index 91b811c..0000000
--- a/src/views/apps/invoice/list/InvoiceCard.tsx
+++ /dev/null
@@ -1,84 +0,0 @@
-'use client'
-
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardContent from '@mui/material/CardContent'
-import Grid from '@mui/material/Grid2'
-import Divider from '@mui/material/Divider'
-import Avatar from '@mui/material/Avatar'
-import Typography from '@mui/material/Typography'
-import useMediaQuery from '@mui/material/useMediaQuery'
-import type { Theme } from '@mui/material/styles'
-
-// Third-party Imports
-import classnames from 'classnames'
-
-// Vars
-const data = [
- {
- title: 24,
- subtitle: 'Clients',
- icon: 'tabler-user'
- },
- {
- title: 165,
- subtitle: 'Invoices',
- icon: 'tabler-file-invoice'
- },
- {
- title: '$2.46k',
- subtitle: 'Paid',
- icon: 'tabler-checks'
- },
- {
- title: '$876',
- subtitle: 'Unpaid',
- icon: 'tabler-circle-off'
- }
-]
-
-const InvoiceCard = () => {
- // Hooks
- const isBelowMdScreen = useMediaQuery((theme: Theme) => theme.breakpoints.down('md'))
- const isBelowSmScreen = useMediaQuery((theme: Theme) => theme.breakpoints.down('sm'))
-
- return (
-
-
-
- {data.map((item, index) => (
- div]:pie-6 [&:nth-of-type(odd)>div]:border-ie':
- isBelowMdScreen && !isBelowSmScreen,
- '[&:not(:last-child)>div]:pie-6 [&:not(:last-child)>div]:border-ie': !isBelowMdScreen
- })}
- >
-
-
- {item.title}
- {item.subtitle}
-
-
-
-
-
- {isBelowMdScreen && !isBelowSmScreen && index < data.length - 2 && (
-
- )}
- {isBelowSmScreen && index < data.length - 1 && }
-
- ))}
-
-
-
- )
-}
-
-export default InvoiceCard
diff --git a/src/views/apps/invoice/list/InvoiceListTable.tsx b/src/views/apps/invoice/list/InvoiceListTable.tsx
deleted file mode 100644
index 5af4f23..0000000
--- a/src/views/apps/invoice/list/InvoiceListTable.tsx
+++ /dev/null
@@ -1,461 +0,0 @@
-'use client'
-
-// React Imports
-import { useEffect, useMemo, useState } from 'react'
-
-// Next Imports
-import Link from 'next/link'
-import { useParams } from 'next/navigation'
-
-// MUI Imports
-import Button from '@mui/material/Button'
-import Card from '@mui/material/Card'
-import CardContent from '@mui/material/CardContent'
-import Checkbox from '@mui/material/Checkbox'
-import Chip from '@mui/material/Chip'
-import IconButton from '@mui/material/IconButton'
-import MenuItem from '@mui/material/MenuItem'
-import type { TextFieldProps } from '@mui/material/TextField'
-import Tooltip from '@mui/material/Tooltip'
-import Typography from '@mui/material/Typography'
-
-// Third-party Imports
-import type { RankingInfo } from '@tanstack/match-sorter-utils'
-import { rankItem } from '@tanstack/match-sorter-utils'
-import type { ColumnDef, FilterFn } from '@tanstack/react-table'
-import {
- createColumnHelper,
- flexRender,
- getCoreRowModel,
- getFacetedMinMaxValues,
- getFacetedRowModel,
- getFacetedUniqueValues,
- getFilteredRowModel,
- getPaginationRowModel,
- getSortedRowModel,
- useReactTable
-} from '@tanstack/react-table'
-import classnames from 'classnames'
-
-// Type Imports
-import type { InvoiceType } from '@/types/apps/invoiceTypes'
-import type { Locale } from '@configs/i18n'
-import type { ThemeColor } from '@core/types'
-
-// Component Imports
-import CustomAvatar from '@core/components/mui/Avatar'
-import CustomTextField from '@core/components/mui/TextField'
-import OptionMenu from '@core/components/option-menu'
-
-// Util Imports
-import { getInitials } from '@/utils/getInitials'
-import { getLocalizedUrl } from '@/utils/i18n'
-
-// Style Imports
-import tableStyles from '@core/styles/table.module.css'
-
-declare module '@tanstack/table-core' {
- interface FilterFns {
- fuzzy: FilterFn
- }
- interface FilterMeta {
- itemRank: RankingInfo
- }
-}
-
-type InvoiceTypeWithAction = InvoiceType & {
- action?: string
-}
-
-type InvoiceStatusObj = {
- [key: string]: {
- icon: string
- color: ThemeColor
- }
-}
-
-const fuzzyFilter: FilterFn = (row, columnId, value, addMeta) => {
- // Rank the item
- const itemRank = rankItem(row.getValue(columnId), value)
-
- // Store the itemRank info
- addMeta({
- itemRank
- })
-
- // Return if the item should be filtered in/out
- return itemRank.passed
-}
-
-const DebouncedInput = ({
- value: initialValue,
- onChange,
- debounce = 500,
- ...props
-}: {
- value: string | number
- onChange: (value: string | number) => void
- debounce?: number
-} & Omit) => {
- // States
- const [value, setValue] = useState(initialValue)
-
- useEffect(() => {
- setValue(initialValue)
- }, [initialValue])
-
- useEffect(() => {
- const timeout = setTimeout(() => {
- onChange(value)
- }, debounce)
-
- return () => clearTimeout(timeout)
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [value])
-
- return setValue(e.target.value)} />
-}
-
-// Vars
-const invoiceStatusObj: InvoiceStatusObj = {
- Sent: { color: 'secondary', icon: 'tabler-send-2' },
- Paid: { color: 'success', icon: 'tabler-check' },
- Draft: { color: 'primary', icon: 'tabler-mail' },
- 'Partial Payment': { color: 'warning', icon: 'tabler-chart-pie-2' },
- 'Past Due': { color: 'error', icon: 'tabler-alert-circle' },
- Downloaded: { color: 'info', icon: 'tabler-arrow-down' }
-}
-
-// Column Definitions
-const columnHelper = createColumnHelper()
-
-const InvoiceListTable = ({ invoiceData }: { invoiceData?: InvoiceType[] }) => {
- // States
- const [status, setStatus] = useState('')
- const [rowSelection, setRowSelection] = useState({})
- const [data, setData] = useState(...[invoiceData])
- const [filteredData, setFilteredData] = useState(data)
- const [globalFilter, setGlobalFilter] = useState('')
-
- // Hooks
- const { lang: locale } = useParams()
-
- const columns = useMemo[]>(
- () => [
- {
- id: 'select',
- header: ({ table }) => (
-
- ),
- cell: ({ row }) => (
-
- )
- },
- columnHelper.accessor('id', {
- header: '#',
- cell: ({ row }) => (
- {`#${row.original.id}`}
- )
- }),
- columnHelper.accessor('invoiceStatus', {
- header: 'Status',
- cell: ({ row }) => (
-
-
- {row.original.invoiceStatus}
-
-
-
- Balance:
- {' '}
- {row.original.balance}
-
-
- Due Date:
- {' '}
- {row.original.dueDate}
-
- }
- >
-
-
-
-
- )
- }),
- columnHelper.accessor('name', {
- header: 'Client',
- cell: ({ row }) => (
-
- {getAvatar({ avatar: row.original.avatar, name: row.original.name })}
-
-
- {row.original.name}
-
- {row.original.companyEmail}
-
-
- )
- }),
- columnHelper.accessor('total', {
- header: 'Total',
- cell: ({ row }) =>
{`$${row.original.total}`}
- }),
- columnHelper.accessor('issuedDate', {
- header: 'Issued Date',
- cell: ({ row }) =>
{row.original.issuedDate}
- }),
- columnHelper.accessor('balance', {
- header: 'Balance',
- cell: ({ row }) => {
- return row.original.balance === 0 ? (
-
- ) : (
-
{row.original.balance}
- )
- }
- }),
- columnHelper.accessor('action', {
- header: 'Action',
- cell: ({ row }) => (
-
- setData(data?.filter(invoice => invoice.id !== row.original.id))}>
-
-
-
-
-
-
-
-
-
- ),
- enableSorting: false
- })
- ],
- // eslint-disable-next-line react-hooks/exhaustive-deps
- [data, filteredData]
- )
-
- const table = useReactTable({
- data: filteredData as InvoiceType[],
- columns,
- filterFns: {
- fuzzy: fuzzyFilter
- },
- state: {
- rowSelection,
- globalFilter
- },
- initialState: {
- pagination: {
- pageSize: 10
- }
- },
- enableRowSelection: true, //enable row selection for all rows
- // enableRowSelection: row => row.original.age > 18, // or enable row selection conditionally per row
- globalFilterFn: fuzzyFilter,
- onRowSelectionChange: setRowSelection,
- getCoreRowModel: getCoreRowModel(),
- onGlobalFilterChange: setGlobalFilter,
- getFilteredRowModel: getFilteredRowModel(),
- getSortedRowModel: getSortedRowModel(),
- getPaginationRowModel: getPaginationRowModel(),
- getFacetedRowModel: getFacetedRowModel(),
- getFacetedUniqueValues: getFacetedUniqueValues(),
- getFacetedMinMaxValues: getFacetedMinMaxValues()
- })
-
- const getAvatar = (params: Pick
) => {
- const { avatar, name } = params
-
- if (avatar) {
- return
- } else {
- return (
-
- {getInitials(name as string)}
-
- )
- }
- }
-
- useEffect(() => {
- const filteredData = data?.filter(invoice => {
- if (status && invoice.invoiceStatus.toLowerCase().replace(/\s+/g, '-') !== status) return false
-
- return true
- })
-
- setFilteredData(filteredData)
- }, [status, data, setFilteredData])
-
- return (
-
-
-
-
- Show
- table.setPageSize(Number(e.target.value))}
- className='is-[70px] max-sm:is-full'
- >
- 10
- 25
- 50
-
-
-
}
- href={getLocalizedUrl('apps/invoice/add', locale as Locale)}
- className='max-sm:is-full'
- >
- Create Invoice
-
-
-
- setGlobalFilter(String(value))}
- placeholder='Search Invoice'
- className='max-sm:is-full sm:is-[250px]'
- />
- setStatus(e.target.value)}
- className='max-sm:is-full sm:is-[160px]'
- slotProps={{
- select: { displayEmpty: true }
- }}
- >
- Invoice Status
- Downloaded
- Draft
- Paid
- Partial Payment
- Past Due
- Sent
-
-
-
-
-
-
- {table.getHeaderGroups().map(headerGroup => (
-
- {headerGroup.headers.map(header => (
-
- {header.isPlaceholder ? null : (
- <>
-
- {flexRender(header.column.columnDef.header, header.getContext())}
- {{
- asc: ,
- desc:
- }[header.column.getIsSorted() as 'asc' | 'desc'] ?? null}
-
- >
- )}
-
- ))}
-
- ))}
-
- {table.getFilteredRowModel().rows.length === 0 ? (
-
-
-
- No data available
-
-
-
- ) : (
-
- {table
- .getRowModel()
- .rows.slice(0, table.getState().pagination.pageSize)
- .map(row => {
- return (
-
- {row.getVisibleCells().map(cell => (
- {flexRender(cell.column.columnDef.cell, cell.getContext())}
- ))}
-
- )
- })}
-
- )}
-
-
- {/* }
- count={table.getFilteredRowModel().rows.length}
- rowsPerPage={table.getState().pagination.pageSize}
- page={table.getState().pagination.pageIndex}
- onPageChange={(_, page) => {
- table.setPageIndex(page)
- }}
- onRowsPerPageChange={e => table.setPageSize(Number(e.target.value))}
- /> */}
-
- )
-}
-
-export default InvoiceListTable
diff --git a/src/views/apps/invoice/list/index.tsx b/src/views/apps/invoice/list/index.tsx
deleted file mode 100644
index 73acdc0..0000000
--- a/src/views/apps/invoice/list/index.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-// MUI Imports
-import Grid from '@mui/material/Grid2'
-
-// Type Imports
-import type { InvoiceType } from '@/types/apps/invoiceTypes'
-
-// Component Imports
-import InvoiceListTable from './InvoiceListTable'
-import InvoiceCard from './InvoiceCard'
-
-const InvoiceList = ({ invoiceData }: { invoiceData?: InvoiceType[] }) => {
- return (
-
-
-
-
-
-
-
-
- )
-}
-
-export default InvoiceList
diff --git a/src/views/apps/invoice/preview/PreviewActions.tsx b/src/views/apps/invoice/preview/PreviewActions.tsx
deleted file mode 100644
index 12c0065..0000000
--- a/src/views/apps/invoice/preview/PreviewActions.tsx
+++ /dev/null
@@ -1,80 +0,0 @@
-// React Imports
-import { useState } from 'react'
-
-// Next Imports
-import Link from 'next/link'
-import { useParams } from 'next/navigation'
-
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardContent from '@mui/material/CardContent'
-import Button from '@mui/material/Button'
-
-// Type Imports
-import type { Locale } from '@configs/i18n'
-
-// Component Imports
-import AddPaymentDrawer from '@views/apps/invoice/shared/AddPaymentDrawer'
-import SendInvoiceDrawer from '@views/apps/invoice/shared/SendInvoiceDrawer'
-
-// Util Imports
-import { getLocalizedUrl } from '@/utils/i18n'
-
-const PreviewActions = ({ id, onButtonClick }: { id: string; onButtonClick: () => void }) => {
- // States
- const [paymentDrawerOpen, setPaymentDrawerOpen] = useState(false)
- const [sendDrawerOpen, setSendDrawerOpen] = useState(false)
-
- // Hooks
- const { lang: locale } = useParams()
-
- return (
- <>
-
-
- }
- onClick={() => setSendDrawerOpen(true)}
- >
- Send Invoice
-
-
- Download
-
-
-
- Print
-
-
- Edit
-
-
- setPaymentDrawerOpen(true)}
- startIcon={ }
- >
- Add Payment
-
-
-
- setPaymentDrawerOpen(false)} />
- setSendDrawerOpen(false)} />
- >
- )
-}
-
-export default PreviewActions
diff --git a/src/views/apps/invoice/preview/PreviewCard.tsx b/src/views/apps/invoice/preview/PreviewCard.tsx
deleted file mode 100644
index 5ff81b9..0000000
--- a/src/views/apps/invoice/preview/PreviewCard.tsx
+++ /dev/null
@@ -1,219 +0,0 @@
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardContent from '@mui/material/CardContent'
-import Typography from '@mui/material/Typography'
-import Grid from '@mui/material/Grid2'
-import Divider from '@mui/material/Divider'
-
-// Type Imports
-import type { InvoiceType } from '@/types/apps/invoiceTypes'
-
-// Component Imports
-import Logo from '@components/layout/shared/Logo'
-
-// Style Imports
-import tableStyles from '@core/styles/table.module.css'
-import './print.css'
-
-// Vars
-const data = [
- {
- Item: 'Premium Branding Package',
- Description: 'Branding & Promotion',
- Hours: 48,
- Qty: 1,
- Total: '$32'
- },
- {
- Item: 'Social Media',
- Description: 'Social media templates',
- Hours: 42,
- Qty: 1,
- Total: '$28'
- },
- {
- Item: 'Web Design',
- Description: 'Web designing package',
- Hours: 46,
- Qty: 1,
- Total: '$24'
- },
- {
- Item: 'SEO',
- Description: 'Search engine optimization',
- Hours: 40,
- Qty: 1,
- Total: '$22'
- }
-]
-
-const PreviewCard = ({ invoiceData, id }: { invoiceData?: InvoiceType; id: string }) => {
- return (
-
-
-
-
-
-
-
-
-
-
-
- Office 149, 450 South Brand Brooklyn
- San Diego County, CA 91905, USA
- +1 (123) 456 7891, +44 (876) 543 2198
-
-
-
-
{`Invoice #${id}`}
-
- {`Date Issued: ${invoiceData?.issuedDate}`}
- {`Date Due: ${invoiceData?.dueDate}`}
-
-
-
-
-
-
-
-
-
-
- Invoice To:
-
-
- {invoiceData?.name}
- {invoiceData?.company}
- {invoiceData?.address}
- {invoiceData?.contact}
- {invoiceData?.companyEmail}
-
-
-
-
-
-
- Bill To:
-
-
-
- Total Due:
- $12,110.55
-
-
- Bank name:
- American Bank
-
-
- Country:
- United States
-
-
- IBAN:
- ETD95476213874685
-
-
- SWIFT code:
- BR91905
-
-
-
-
-
-
-
-
-
-
-
- Item
- Description
- Hours
- Qty
- Total
-
-
-
- {data.map((item, index) => (
-
-
- {item.Item}
-
-
- {item.Description}
-
-
- {item.Hours}
-
-
- {item.Qty}
-
-
- {item.Total}
-
-
- ))}
-
-
-
-
-
-
-
-
-
- Salesperson:
-
- Tommy Shelby
-
-
Thanks for your business
-
-
-
- Subtotal:
-
- $1800
-
-
-
- Discount:
-
- $28
-
-
-
- Tax:
-
- 21%
-
-
-
-
- Total:
-
- $1690
-
-
-
-
-
-
-
-
-
-
-
- Note:
- {' '}
- It was a pleasure working with you and your team. We hope you will keep us in mind for future freelance
- projects. Thank You!
-
-
-
-
-
- )
-}
-
-export default PreviewCard
diff --git a/src/views/apps/invoice/preview/index.tsx b/src/views/apps/invoice/preview/index.tsx
deleted file mode 100644
index 4fc3158..0000000
--- a/src/views/apps/invoice/preview/index.tsx
+++ /dev/null
@@ -1,31 +0,0 @@
-'use client'
-
-// MUI Imports
-import Grid from '@mui/material/Grid2'
-
-// Type Imports
-import type { InvoiceType } from '@/types/apps/invoiceTypes'
-
-// Component Imports
-import PreviewActions from './PreviewActions'
-import PreviewCard from './PreviewCard'
-
-const Preview = ({ invoiceData, id }: { invoiceData?: InvoiceType; id: string }) => {
- // Handle Print Button Click
- const handleButtonClick = () => {
- window.print()
- }
-
- return (
-
-
-
-
-
-
-
-
- )
-}
-
-export default Preview
diff --git a/src/views/apps/invoice/preview/print.css b/src/views/apps/invoice/preview/print.css
deleted file mode 100644
index 90de1a5..0000000
--- a/src/views/apps/invoice/preview/print.css
+++ /dev/null
@@ -1,31 +0,0 @@
-@media print {
- body * {
- visibility: hidden;
- }
- #__next :is(.sm\:\!p-12) {
- padding: 0rem !important;
- }
- [data-dark] {
- --mui-palette-text-primary: rgba(47, 43, 61, 0.9);
- --mui-palette-action-hover: rgba(47, 43, 61, 0.06);
- --mui-palette-text-secondary: rgba(47, 43, 61, 0.7);
- --mui-palette-divider: rgba(47, 43, 61, 0.12);
- }
-
- /* Only show the .preview-card element when printing */
- .previewCard * {
- visibility: visible;
- }
- .previewCard {
- inline-size: 100%;
- block-size: 100%;
- position: fixed;
- inset: 0;
- box-sizing: border-box;
- }
- @media (max-width: 600px) {
- .previewCard {
- position: relative !important;
- }
- }
-}
diff --git a/src/views/apps/invoice/shared/AddPaymentDrawer.tsx b/src/views/apps/invoice/shared/AddPaymentDrawer.tsx
deleted file mode 100644
index 6e4b390..0000000
--- a/src/views/apps/invoice/shared/AddPaymentDrawer.tsx
+++ /dev/null
@@ -1,142 +0,0 @@
-// React Imports
-import { useState } from 'react'
-import type { FormEvent } from 'react'
-
-// MUI Import
-import Drawer from '@mui/material/Drawer'
-import IconButton from '@mui/material/IconButton'
-import Typography from '@mui/material/Typography'
-import InputAdornment from '@mui/material/InputAdornment'
-import MenuItem from '@mui/material/MenuItem'
-import Button from '@mui/material/Button'
-import Divider from '@mui/material/Divider'
-
-// Component Imports
-import CustomTextField from '@core/components/mui/TextField'
-
-// Styled Component Imports
-import AppReactDatepicker from '@/libs/styles/AppReactDatepicker'
-
-type Props = {
- open: boolean
- handleClose: () => void
-}
-
-type FormDataType = {
- paymentDate: Date
- paymentMethod: string
- paymentAmount: number
- paymentNote: string
-}
-
-// Vars
-const initialData: FormDataType = {
- paymentDate: new Date(),
- paymentMethod: 'select-method',
- paymentAmount: 500,
- paymentNote: ''
-}
-
-const AddPaymentDrawer = ({ open, handleClose }: Props) => {
- // States
- const [formData, setFormData] = useState(initialData)
-
- const handleSubmit = (e: FormEvent) => {
- e.preventDefault()
- handleClose()
- setFormData(initialData)
- }
-
- const handleReset = () => {
- handleClose()
- setFormData(initialData)
- }
-
- return (
-
-
- Add New User
-
-
-
-
-
-
-
- )
-}
-
-export default AddPaymentDrawer
diff --git a/src/views/apps/invoice/shared/SendInvoiceDrawer.tsx b/src/views/apps/invoice/shared/SendInvoiceDrawer.tsx
deleted file mode 100644
index 361b503..0000000
--- a/src/views/apps/invoice/shared/SendInvoiceDrawer.tsx
+++ /dev/null
@@ -1,127 +0,0 @@
-// React Imports
-import { useState } from 'react'
-import type { FormEvent } from 'react'
-
-// MUI Imports
-import Drawer from '@mui/material/Drawer'
-import IconButton from '@mui/material/IconButton'
-import Typography from '@mui/material/Typography'
-import Button from '@mui/material/Button'
-import Chip from '@mui/material/Chip'
-import Divider from '@mui/material/Divider'
-
-// Component Imports
-import CustomTextField from '@core/components/mui/TextField'
-
-type Props = {
- open: boolean
- handleClose: () => void
-}
-
-type FormDataType = {
- from: string
- to: string
- subject: string
- message: string
-}
-
-// Vars
-const initialData: FormDataType = {
- from: 'shelbyComapny@email.com',
- to: 'qConsolidated@email.com',
- subject: 'Invoice of purchased Admin Templates',
- message: `Dear Queen Consolidated,
-
-Thank you for your business, always a pleasure to work with you!
-
-We have generated a new invoice in the amount of $95.59
-
-We would appreciate payment of this invoice by 05/11/2019`
-}
-
-const SendInvoiceDrawer = ({ open, handleClose }: Props) => {
- // States
- const [formData, setFormData] = useState(initialData)
-
- const handleSubmit = (e: FormEvent) => {
- e.preventDefault()
- handleClose()
- setFormData(initialData)
- }
-
- const handleReset = () => {
- handleClose()
- setFormData(initialData)
- }
-
- return (
-
-
- Send Invoice
-
-
-
-
-
-
-
- )
-}
-
-export default SendInvoiceDrawer
diff --git a/src/views/apps/kanban/KanbanBoard.tsx b/src/views/apps/kanban/KanbanBoard.tsx
deleted file mode 100644
index bdce193..0000000
--- a/src/views/apps/kanban/KanbanBoard.tsx
+++ /dev/null
@@ -1,85 +0,0 @@
-'use client'
-
-// React Imports
-import type { RefObject } from 'react'
-import { useEffect, useState } from 'react'
-
-// Third-party imports
-import { useDragAndDrop } from '@formkit/drag-and-drop/react'
-import { animations } from '@formkit/drag-and-drop'
-import { useDispatch, useSelector } from 'react-redux'
-
-// Type Imports
-import type { RootState } from '@/redux-store'
-
-// Slice Imports
-import { addColumn, updateColumns } from '@/redux-store/slices/kanban'
-
-// Component Imports
-import KanbanList from './KanbanList'
-import NewColumn from './NewColumn'
-import KanbanDrawer from './KanbanDrawer'
-
-const KanbanBoard = () => {
- // State
- const [drawerOpen, setDrawerOpen] = useState(false)
-
- // Hooks
- const kanbanStore = useSelector((state: RootState) => state.kanbanReducer)
- const dispatch = useDispatch()
-
- const [boardRef, columns, setColumns] = useDragAndDrop(kanbanStore.columns, {
- plugins: [animations()],
- dragHandle: '.list-handle'
- })
-
- // Add New Column
- const addNewColumn = (title: string) => {
- const maxId = Math.max(...kanbanStore.columns.map(column => column.id))
-
- dispatch(addColumn(title))
- setColumns([...columns, { id: maxId + 1, title, taskIds: [] }])
- }
-
- // To get the current task for the drawer
- const currentTask = kanbanStore.tasks.find(task => task.id === kanbanStore.currentTaskId)
-
- // Update Columns on Drag and Drop
- useEffect(() => {
- if (columns !== kanbanStore.columns) dispatch(updateColumns(columns))
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [columns])
-
- return (
-
-
} className='flex gap-6'>
- {columns.map(column => (
- kanbanStore.tasks.find(task => task.id === taskId))}
- />
- ))}
-
-
- {currentTask && (
-
- )}
-
- )
-}
-
-export default KanbanBoard
diff --git a/src/views/apps/kanban/KanbanDrawer.tsx b/src/views/apps/kanban/KanbanDrawer.tsx
deleted file mode 100644
index 333794f..0000000
--- a/src/views/apps/kanban/KanbanDrawer.tsx
+++ /dev/null
@@ -1,268 +0,0 @@
-// React Imports
-import { useEffect, useState, useRef } from 'react'
-import type { ChangeEvent } from 'react'
-
-// MUI Imports
-import Drawer from '@mui/material/Drawer'
-import Typography from '@mui/material/Typography'
-import MenuItem from '@mui/material/MenuItem'
-import Checkbox from '@mui/material/Checkbox'
-import ListItemText from '@mui/material/ListItemText'
-import Chip from '@mui/material/Chip'
-import IconButton from '@mui/material/IconButton'
-import Button from '@mui/material/Button'
-import Tooltip from '@mui/material/Tooltip'
-import InputAdornment from '@mui/material/InputAdornment'
-
-// Third-party Imports
-import { useForm, Controller } from 'react-hook-form'
-import { valibotResolver } from '@hookform/resolvers/valibot'
-import { minLength, nonEmpty, object, pipe, string } from 'valibot'
-import type { InferInput } from 'valibot'
-
-// Type Imports
-import type { ColumnType, TaskType } from '@/types/apps/kanbanTypes'
-import type { AppDispatch } from '@/redux-store'
-
-// Slice Imports
-import { editTask, deleteTask } from '@/redux-store/slices/kanban'
-
-// Component Imports
-import CustomAvatar from '@core/components/mui/Avatar'
-import CustomTextField from '@core/components/mui/TextField'
-import AppReactDatepicker from '@/libs/styles/AppReactDatepicker'
-
-// Data Imports
-import { chipColor } from './TaskCard'
-
-type KanbanDrawerProps = {
- drawerOpen: boolean
- dispatch: AppDispatch
- setDrawerOpen: (value: boolean) => void
- task: TaskType
- columns: ColumnType[]
- setColumns: (value: ColumnType[]) => void
-}
-
-type FormData = InferInput
-
-const schema = object({
- title: pipe(string(), nonEmpty('Title is required'), minLength(1))
-})
-
-const KanbanDrawer = (props: KanbanDrawerProps) => {
- // Props
- const { drawerOpen, dispatch, setDrawerOpen, task, columns, setColumns } = props
-
- // States
- const [date, setDate] = useState(task.dueDate)
- const [badgeText, setBadgeText] = useState(task.badgeText || [])
- const [fileName, setFileName] = useState('')
- const [comment, setComment] = useState('')
-
- // Refs
- const fileInputRef = useRef(null)
-
- // Hooks
- const {
- control,
- handleSubmit,
- reset,
- formState: { errors }
- } = useForm({
- defaultValues: {
- title: task.title
- },
- resolver: valibotResolver(schema)
- })
-
- // Handle File Upload
- const handleFileUpload = (event: ChangeEvent) => {
- const { files } = event.target
-
- if (files && files.length !== 0) {
- setFileName(files[0].name)
- }
- }
-
- // Close Drawer
- const handleClose = () => {
- setDrawerOpen(false)
- reset({ title: task.title })
- setBadgeText(task.badgeText || [])
- setDate(task.dueDate)
- setFileName('')
- setComment('')
-
- if (fileInputRef.current) {
- fileInputRef.current.value = ''
- }
- }
-
- // Update Task
- const updateTask = (data: FormData) => {
- dispatch(editTask({ id: task.id, title: data.title, badgeText, dueDate: date }))
- handleClose()
- }
-
- // Handle Reset
- const handleReset = () => {
- setDrawerOpen(false)
- dispatch(deleteTask(task.id))
-
- const updatedColumns = columns.map(column => {
- return {
- ...column,
- taskIds: column.taskIds.filter(taskId => taskId !== task.id)
- }
- })
-
- setColumns(updatedColumns)
- }
-
- // To set the initial values according to the task
- useEffect(() => {
- reset({ title: task.title })
- setBadgeText(task.badgeText || [])
- setDate(task.dueDate)
- }, [task, reset])
-
- return (
-
-
-
- Edit Task
-
-
-
-
-
-
-
- )
-}
-
-export default KanbanDrawer
diff --git a/src/views/apps/kanban/KanbanList.tsx b/src/views/apps/kanban/KanbanList.tsx
deleted file mode 100644
index e56456b..0000000
--- a/src/views/apps/kanban/KanbanList.tsx
+++ /dev/null
@@ -1,215 +0,0 @@
-// React Imports
-import { useEffect, useState } from 'react'
-import type { FormEvent, RefObject } from 'react'
-
-// MUI Imports
-import Typography from '@mui/material/Typography'
-import InputBase from '@mui/material/InputBase'
-import IconButton from '@mui/material/IconButton'
-
-// Third-party imports
-import { useDragAndDrop } from '@formkit/drag-and-drop/react'
-import { animations } from '@formkit/drag-and-drop'
-import classnames from 'classnames'
-
-// Type Imports
-import type { TaskType, ColumnType, KanbanType } from '@/types/apps/kanbanTypes'
-import type { AppDispatch } from '@/redux-store'
-
-// Slice Imports
-import { addTask, editColumn, deleteColumn, updateColumnTaskIds } from '@/redux-store/slices/kanban'
-
-// Component Imports
-import OptionMenu from '@core/components/option-menu'
-import TaskCard from './TaskCard'
-import NewTask from './NewTask'
-
-// Styles Imports
-import styles from './styles.module.css'
-
-type KanbanListProps = {
- column: ColumnType
- tasks: (TaskType | undefined)[]
- dispatch: AppDispatch
- store: KanbanType
- setDrawerOpen: (value: boolean) => void
- columns: ColumnType[]
- setColumns: (value: ColumnType[]) => void
- currentTask: TaskType | undefined
-}
-
-const KanbanList = (props: KanbanListProps) => {
- // Props
- const { column, tasks, dispatch, store, setDrawerOpen, columns, setColumns, currentTask } = props
-
- // States
- const [editDisplay, setEditDisplay] = useState(false)
- const [title, setTitle] = useState(column.title)
-
- // Hooks
- const [tasksListRef, tasksList, setTasksList] = useDragAndDrop(tasks, {
- group: 'tasksList',
- plugins: [animations()],
- draggable: el => el.classList.contains('item-draggable')
- })
-
- // Add New Task
- const addNewTask = (title: string) => {
- dispatch(addTask({ columnId: column.id, title: title }))
-
- setTasksList([...tasksList, { id: store.tasks[store.tasks.length - 1].id + 1, title }])
-
- const newColumns = columns.map(col => {
- if (col.id === column.id) {
- return { ...col, taskIds: [...col.taskIds, store.tasks[store.tasks.length - 1].id + 1] }
- }
-
- return col
- })
-
- setColumns(newColumns)
- }
-
- // Handle Submit Edit
- const handleSubmitEdit = (e: FormEvent) => {
- e.preventDefault()
- setEditDisplay(!editDisplay)
- dispatch(editColumn({ id: column.id, title }))
-
- const newColumn = columns.map(col => {
- if (col.id === column.id) {
- return { ...col, title }
- }
-
- return col
- })
-
- setColumns(newColumn)
- }
-
- // Cancel Edit
- const cancelEdit = () => {
- setEditDisplay(!editDisplay)
- setTitle(column.title)
- }
-
- // Delete Column
- const handleDeleteColumn = () => {
- dispatch(deleteColumn({ columnId: column.id }))
- setColumns(columns.filter(col => col.id !== column.id))
- }
-
- // Update column taskIds on drag and drop
- useEffect(() => {
- if (tasksList !== tasks) {
- dispatch(updateColumnTaskIds({ id: column.id, tasksList }))
- }
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [tasksList])
-
- // To update the tasksList when a task is edited
- useEffect(() => {
- const newTasks = tasksList.map(task => {
- if (task?.id === currentTask?.id) {
- return currentTask
- }
-
- return task
- })
-
- if (currentTask !== tasksList.find(task => task?.id === currentTask?.id)) {
- setTasksList(newTasks)
- }
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [currentTask])
-
- // To update the tasksList when columns are updated
- useEffect(() => {
- let taskIds: ColumnType['taskIds'] = []
-
- columns.map(col => {
- taskIds = [...taskIds, ...col.taskIds]
- })
-
- const newTasksList = tasksList.filter(task => task && taskIds.includes(task.id))
-
- setTasksList(newTasksList)
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [columns])
-
- return (
- } className='flex flex-col is-[16.5rem]'>
- {editDisplay ? (
-
- ) : (
-
-
- {column.title}
-
-
-
- setEditDisplay(!editDisplay)
- }
- },
- {
- text: 'Delete',
- icon: 'tabler-trash',
- menuItemProps: { className: 'flex items-center gap-2', onClick: handleDeleteColumn }
- }
- ]}
- />
-
-
- )}
- {tasksList.map(
- task =>
- task && (
-
- )
- )}
-
-
- )
-}
-
-export default KanbanList
diff --git a/src/views/apps/kanban/NewColumn.tsx b/src/views/apps/kanban/NewColumn.tsx
deleted file mode 100644
index e8f12f1..0000000
--- a/src/views/apps/kanban/NewColumn.tsx
+++ /dev/null
@@ -1,118 +0,0 @@
-// React Imports
-import { useState } from 'react'
-
-// MUI Imports
-import Button from '@mui/material/Button'
-import { styled } from '@mui/material/styles'
-import Typography from '@mui/material/Typography'
-
-// Third-party Imports
-import { useForm, Controller } from 'react-hook-form'
-import { valibotResolver } from '@hookform/resolvers/valibot'
-import { object, string, minLength, pipe, nonEmpty } from 'valibot'
-import type { InferInput } from 'valibot'
-
-// Component Imports
-import CustomTextField from '@core/components/mui/TextField'
-
-// Styled CustomTextField component
-const CustomTextFieldStyled = styled(CustomTextField)({
- '& .MuiInputBase-root.MuiFilledInput-root': {
- backgroundColor: 'var(--mui-palette-background-paper) !important'
- }
-})
-
-type FormData = InferInput
-
-const schema = object({
- title: pipe(string(), nonEmpty('Title is required'), minLength(1))
-})
-
-const NewColumn = ({ addNewColumn }: { addNewColumn: (title: string) => void }) => {
- // States
- const [display, setDisplay] = useState(false)
-
- // Hooks
- const {
- control,
- handleSubmit,
- reset,
- formState: { errors }
- } = useForm({
- defaultValues: {
- title: ''
- },
- resolver: valibotResolver(schema)
- })
-
- // Display the Add New form
- const toggleDisplay = () => {
- setDisplay(!display)
- }
-
- // Handle the Add New form
- const onSubmit = (data: FormData) => {
- addNewColumn(data.title)
- setDisplay(false)
- reset({ title: '' })
- }
-
- // Handle reset
- const handleReset = () => {
- toggleDisplay()
- reset({ title: '' })
- }
-
- return (
-
-
-
- Add New
-
- {display && (
-
- )}
-
- )
-}
-
-export default NewColumn
diff --git a/src/views/apps/kanban/NewTask.tsx b/src/views/apps/kanban/NewTask.tsx
deleted file mode 100644
index 3a63efb..0000000
--- a/src/views/apps/kanban/NewTask.tsx
+++ /dev/null
@@ -1,122 +0,0 @@
-// React Imports
-import { useState } from 'react'
-
-// MUI Imports
-import Button from '@mui/material/Button'
-import { styled } from '@mui/material/styles'
-import Typography from '@mui/material/Typography'
-
-// Third-party Imports
-import { useForm, Controller } from 'react-hook-form'
-import { valibotResolver } from '@hookform/resolvers/valibot'
-import { object, string, minLength, pipe, nonEmpty } from 'valibot'
-import type { InferInput } from 'valibot'
-
-// Component Imports
-import CustomTextField from '@core/components/mui/TextField'
-
-// Styled CustomTextField component
-const CustomTextFieldStyled = styled(CustomTextField)({
- '& .MuiInputBase-root.MuiFilledInput-root': {
- backgroundColor: 'var(--mui-palette-background-paper) !important'
- }
-})
-
-type FormData = InferInput
-
-const schema = object({
- content: pipe(string(), nonEmpty('Content is required'), minLength(1))
-})
-
-const NewTask = ({ addTask }: { addTask: (content: string) => void }) => {
- // States
- const [displayNewItem, setDisplayNewItem] = useState(false)
-
- // Hooks
- const {
- control,
- handleSubmit,
- reset,
- formState: { errors }
- } = useForm({
- defaultValues: {
- content: ''
- },
- resolver: valibotResolver(schema)
- })
-
- // Display the Add New Task form
- const toggleDisplay = () => {
- setDisplayNewItem(!displayNewItem)
- }
-
- // Handle the Add New Task form
- const onSubmit = (data: FormData) => {
- addTask(data.content)
- setDisplayNewItem(false)
- reset({ content: '' })
- }
-
- // Handle reset
- const handleReset = () => {
- toggleDisplay()
- reset({ content: '' })
- }
-
- return (
-
-
-
- Add New Item
-
- {displayNewItem && (
-
- )}
-
- )
-}
-
-export default NewTask
diff --git a/src/views/apps/kanban/TaskCard.tsx b/src/views/apps/kanban/TaskCard.tsx
deleted file mode 100644
index 871dd6f..0000000
--- a/src/views/apps/kanban/TaskCard.tsx
+++ /dev/null
@@ -1,202 +0,0 @@
-// React Imports
-import { useState } from 'react'
-
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardContent from '@mui/material/CardContent'
-import Chip from '@mui/material/Chip'
-import Typography from '@mui/material/Typography'
-import AvatarGroup from '@mui/material/AvatarGroup'
-import Tooltip from '@mui/material/Tooltip'
-import IconButton from '@mui/material/IconButton'
-import Menu from '@mui/material/Menu'
-import MenuItem from '@mui/material/MenuItem'
-
-// Third-Party Imports
-import classnames from 'classnames'
-
-// Type Imports
-import type { ColumnType, TaskType } from '@/types/apps/kanbanTypes'
-import type { AppDispatch } from '@/redux-store'
-import type { ThemeColor } from '@core/types'
-
-// Slice Imports
-import { getCurrentTask, deleteTask } from '@/redux-store/slices/kanban'
-
-// Component Imports
-import CustomAvatar from '@core/components/mui/Avatar'
-
-// Styles Imports
-import styles from './styles.module.css'
-
-type chipColorType = {
- color: ThemeColor
-}
-
-type TaskCardProps = {
- task: TaskType
- dispatch: AppDispatch
- column: ColumnType
- setColumns: (value: ColumnType[]) => void
- columns: ColumnType[]
- setDrawerOpen: (value: boolean) => void
- tasksList: (TaskType | undefined)[]
- setTasksList: (value: (TaskType | undefined)[]) => void
-}
-
-export const chipColor: { [key: string]: chipColorType } = {
- UX: { color: 'success' },
- 'Code Review': { color: 'error' },
- Dashboard: { color: 'info' },
- Images: { color: 'warning' },
- App: { color: 'secondary' },
- 'Charts & Map': { color: 'primary' }
-}
-
-const TaskCard = (props: TaskCardProps) => {
- // Props
- const { task, dispatch, column, setColumns, columns, setDrawerOpen, tasksList, setTasksList } = props
-
- // States
- const [anchorEl, setAnchorEl] = useState(null)
- const [menuOpen, setMenuOpen] = useState(false)
-
- // Handle menu click
- const handleClick = (e: any) => {
- setMenuOpen(true)
- setAnchorEl(e.currentTarget)
- }
-
- // Handle menu close
- const handleClose = () => {
- setAnchorEl(null)
- setMenuOpen(false)
- }
-
- // Handle Task Click
- const handleTaskClick = () => {
- setDrawerOpen(true)
- dispatch(getCurrentTask(task.id))
- }
-
- // Delete Task
- const handleDeleteTask = () => {
- dispatch(deleteTask(task.id))
- setTasksList(tasksList.filter(taskItem => taskItem?.id !== task.id))
-
- const newTaskIds = column.taskIds.filter(taskId => taskId !== task.id)
- const newColumn = { ...column, taskIds: newTaskIds }
- const newColumns = columns.map(col => (col.id === column.id ? newColumn : col))
-
- setColumns(newColumns)
- }
-
- // Handle Delete
- const handleDelete = () => {
- handleClose()
- handleDeleteTask()
- }
-
- return (
- <>
- handleTaskClick()}
- >
-
- {task.badgeText && task.badgeText.length > 0 && (
-
- {task.badgeText.map(
- (badge, index) =>
- chipColor[badge]?.color && (
-
- )
- )}
-
- )}
- e.stopPropagation()}>
-
-
-
-
-
-
- {task.image && }
-
- {task.title}
-
- {(task.attachments !== undefined && task.attachments > 0) ||
- (task.comments !== undefined && task.comments > 0) ||
- (task.assigned !== undefined && task.assigned.length > 0) ? (
-
- {(task.attachments !== undefined && task.attachments > 0) ||
- (task.comments !== undefined && task.comments > 0) ? (
-
- {task.attachments !== undefined && task.attachments > 0 && (
-
-
- {task.attachments}
-
- )}
- {task.comments !== undefined && task.comments > 0 && (
-
-
- {task.comments}
-
- )}
-
- ) : null}
- {task.assigned !== undefined && task.assigned.length > 0 && (
-
- {task.assigned?.map((avatar, index) => (
-
-
-
- ))}
-
- )}
-
- ) : null}
-
-
- >
- )
-}
-
-export default TaskCard
diff --git a/src/views/apps/kanban/styles.module.css b/src/views/apps/kanban/styles.module.css
deleted file mode 100644
index 6f04dad..0000000
--- a/src/views/apps/kanban/styles.module.css
+++ /dev/null
@@ -1,42 +0,0 @@
-.kanbanColumn {
- &:hover .drag {
- display: block !important;
- }
-
- .drag {
- display: none;
- cursor: grab;
- &:active {
- cursor: grabbing;
- }
- }
-}
-
-.card {
- &:hover {
- .menu {
- display: inline-flex !important;
- }
- }
- .menu {
- display: none !important;
-
- &.menuOpen {
- display: inline-flex !important;
- }
- }
-}
-
-.scroll::-webkit-scrollbar {
- inline-size: 6px;
- block-size: 6px;
-}
-
-.scroll::-webkit-scrollbar-track {
- box-shadow: none;
-}
-
-.scroll::-webkit-scrollbar-thumb {
- background-color: var(--mui-palette-divider);
- border-radius: 6px;
-}
diff --git a/src/views/apps/logistics/dashboard/LogisticsDeliveryExceptions.tsx b/src/views/apps/logistics/dashboard/LogisticsDeliveryExceptions.tsx
deleted file mode 100644
index 6977501..0000000
--- a/src/views/apps/logistics/dashboard/LogisticsDeliveryExceptions.tsx
+++ /dev/null
@@ -1,115 +0,0 @@
-'use client'
-
-// Next Imports
-import dynamic from 'next/dynamic'
-
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardHeader from '@mui/material/CardHeader'
-import CardContent from '@mui/material/CardContent'
-import { useTheme } from '@mui/material/styles'
-
-// Third Party Imports
-import type { ApexOptions } from 'apexcharts'
-
-// Components Imports
-import OptionMenu from '@core/components/option-menu'
-
-// Styled Component Imports
-const AppReactApexCharts = dynamic(() => import('@/libs/styles/AppReactApexCharts'))
-
-const deliveryExceptionsChartSeries = [13, 25, 22, 40]
-
-const LogisticsDeliveryExceptions = () => {
- // Hooks
- const theme = useTheme()
-
- const options: ApexOptions = {
- labels: ['Incorrect address', 'Weather conditions', 'Federal Holidays', 'Damage during transit'],
- stroke: {
- width: 0
- },
- colors: [
- 'var(--mui-palette-success-main)',
- 'rgba(var(--mui-palette-success-mainChannel) / 0.8)',
- 'rgba(var(--mui-palette-success-mainChannel) / 0.6)',
- 'rgba(var(--mui-palette-success-mainChannel) / 0.4)'
- ],
- dataLabels: {
- enabled: false,
- formatter(val: string) {
- return `${Number.parseInt(val)}%`
- }
- },
- legend: {
- show: true,
- position: 'bottom',
- offsetY: 10,
- markers: {
- width: 8,
- height: 8,
- offsetY: 1,
- offsetX: theme.direction === 'rtl' ? 8 : -4
- },
- itemMargin: {
- horizontal: 15,
- vertical: 5
- },
- fontSize: '13px',
- fontWeight: 400,
- labels: {
- colors: 'var()',
- useSeriesColors: false
- }
- },
- grid: {
- padding: {
- top: 15
- }
- },
- plotOptions: {
- pie: {
- donut: {
- size: '75%',
- labels: {
- show: true,
- value: {
- fontSize: '24px',
- color: 'var(--mui-palette-text-primary)',
- fontWeight: 500,
- offsetY: -20
- },
- name: { offsetY: 20 },
- total: {
- show: true,
- fontSize: '0.9375rem',
- fontWeight: 400,
- label: 'AVG. Exceptions',
- color: 'var(--mui-palette-text-secondary)',
- formatter() {
- return '30%'
- }
- }
- }
- }
- }
- }
- }
-
- return (
-
- } />
-
-
-
-
- )
-}
-
-export default LogisticsDeliveryExceptions
diff --git a/src/views/apps/logistics/dashboard/LogisticsDeliveryPerformance.tsx b/src/views/apps/logistics/dashboard/LogisticsDeliveryPerformance.tsx
deleted file mode 100644
index e035726..0000000
--- a/src/views/apps/logistics/dashboard/LogisticsDeliveryPerformance.tsx
+++ /dev/null
@@ -1,76 +0,0 @@
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardHeader from '@mui/material/CardHeader'
-import CardContent from '@mui/material/CardContent'
-import Typography from '@mui/material/Typography'
-
-// Third-party Imports
-import classnames from 'classnames'
-
-// Components Imports
-import OptionMenu from '@core/components/option-menu'
-import CustomAvatar from '@core/components/mui/Avatar'
-
-// Types Imports
-import type { ThemeColor } from '@core/types'
-
-type dataTypes = {
- title: string
- value: string
- change: number
- icon: string
- color: ThemeColor
-}
-
-const deliveryData: dataTypes[] = [
- { title: 'Packages in transit', value: '10k', change: 25.8, icon: 'tabler-box', color: 'primary' },
- { title: 'Packages out for delivery', value: '5k', change: 4.3, icon: 'tabler-truck', color: 'info' },
- { title: 'Packages delivered', value: '15k', change: -12.5, icon: 'tabler-circle-check', color: 'success' },
- { title: 'Delivery success rate', value: '95%', change: 35.6, icon: 'tabler-percentage', color: 'warning' },
- { title: 'Average delivery time', value: '2.5 Days', change: -2.15, icon: 'tabler-clock', color: 'secondary' },
- { title: 'Customer satisfaction', value: '4.5/5', change: 5.7, icon: 'tabler-users', color: 'error' }
-]
-
-const LogisticsDeliveryPerformance = () => {
- return (
-
- }
- />
-
- {deliveryData.map((data, index) => (
-
-
-
-
-
-
-
- {data.title}
-
-
- 0 ? 'tabler-chevron-up text-success' : 'tabler-chevron-down text-error'
- )}
- />
- 0 ? 'success.main' : 'error.main'}>
- {data.change}%
-
-
-
-
- {data.value}
-
-
-
- ))}
-
-
- )
-}
-
-export default LogisticsDeliveryPerformance
diff --git a/src/views/apps/logistics/dashboard/LogisticsOrdersByCountries.tsx b/src/views/apps/logistics/dashboard/LogisticsOrdersByCountries.tsx
deleted file mode 100644
index 7a0b181..0000000
--- a/src/views/apps/logistics/dashboard/LogisticsOrdersByCountries.tsx
+++ /dev/null
@@ -1,197 +0,0 @@
-'use client'
-
-// React Imports
-import { Fragment, useState } from 'react'
-import type { SyntheticEvent } from 'react'
-
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardHeader from '@mui/material/CardHeader'
-import CardContent from '@mui/material/CardContent'
-import Divider from '@mui/material/Divider'
-import { styled } from '@mui/material/styles'
-import Tab from '@mui/material/Tab'
-import TabList from '@mui/lab/TabList'
-import TabPanel from '@mui/lab/TabPanel'
-import TabContext from '@mui/lab/TabContext'
-import Typography from '@mui/material/Typography'
-import TimelineDot from '@mui/lab/TimelineDot'
-import TimelineItem from '@mui/lab/TimelineItem'
-import TimelineContent from '@mui/lab/TimelineContent'
-import TimelineSeparator from '@mui/lab/TimelineSeparator'
-import TimelineConnector from '@mui/lab/TimelineConnector'
-import MuiTimeline from '@mui/lab/Timeline'
-import type { TimelineProps } from '@mui/lab/Timeline'
-
-// Components Imports
-import OptionMenu from '@core/components/option-menu'
-
-type TimelineItemData = {
- name: string
- address: string
-}
-
-type TimelineData = Record<'sender' | 'receiver', TimelineItemData>
-
-type Data = Record<'new' | 'preparing' | 'shipping', TimelineData[]>
-
-// Styled Timeline component
-const Timeline = styled(MuiTimeline)({
- paddingLeft: 0,
- paddingRight: 0,
- '& .MuiTimelineItem-root': {
- width: '100%',
- '&:before': {
- display: 'none'
- }
- },
- '& .MuiTimelineDot-root': {
- border: 0,
- padding: 0
- }
-})
-
-// Vars
-const data: Data = {
- new: [
- {
- sender: {
- name: 'Micheal Hughes',
- address: '101 Boulder, California (CA), 933130'
- },
- receiver: {
- name: 'Daisy Coleman',
- address: '939 Orange, California (CA), 910614'
- }
- },
- {
- sender: {
- name: 'Glenn Todd',
- address: '1713 Garnet, California (CA), 939573'
- },
- receiver: {
- name: 'Arthur West',
- address: '156 Blaze, California (CA), 925878'
- }
- }
- ],
- preparing: [
- {
- sender: {
- name: 'Rose Cole',
- address: '61 Unions, California (CA), 922523'
- },
- receiver: {
- name: 'Polly Spencer',
- address: '865 Delta, California (CA), 932830'
- }
- },
- {
- sender: {
- name: 'Jerry Wood',
- address: '37 Marjory, California (CA), 951958'
- },
- receiver: {
- name: 'Sam McCormick',
- address: '926 Reynolds, California (CA), 910279'
- }
- }
- ],
- shipping: [
- {
- sender: {
- name: 'Alex Walton',
- address: '78 Judson, California (CA), 956084'
- },
- receiver: {
- name: 'Eula Griffin',
- address: '56 Bernard, California (CA), 965133'
- }
- },
- {
- sender: {
- name: 'Lula Barton',
- address: '95 Gaylord, California (CA), 991955'
- },
- receiver: {
- name: 'Craig Jacobs',
- address: '73 Sandy, California (CA), 954566'
- }
- }
- ]
-}
-
-const LogisticsOrdersByCountries = () => {
- // States
- const [value, setValue] = useState('new')
-
- const handleChange = (event: SyntheticEvent, newValue: string) => {
- setValue(newValue)
- }
-
- return (
-
- }
- className='pbe-4'
- />
-
-
-
-
-
-
-
-
- {data[value as keyof Data].map((item: TimelineData, index: number) => {
- return (
-
-
-
-
-
-
-
-
-
-
-
- Sender
-
-
- {item.sender.name}
-
- {item.sender.address}
-
-
-
-
-
-
-
-
-
-
- Receiver
-
-
- {item.receiver.name}
-
- {item.receiver.address}
-
-
-
- {index !== data[value as keyof Data].length - 1 && }
-
- )
- })}
-
-
-
-
- )
-}
-
-export default LogisticsOrdersByCountries
diff --git a/src/views/apps/logistics/dashboard/LogisticsOverviewTable.tsx b/src/views/apps/logistics/dashboard/LogisticsOverviewTable.tsx
deleted file mode 100644
index 02366d3..0000000
--- a/src/views/apps/logistics/dashboard/LogisticsOverviewTable.tsx
+++ /dev/null
@@ -1,272 +0,0 @@
-'use client'
-
-// React Imports
-import { useMemo, useState } from 'react'
-
-// Next Imports
-import Link from 'next/link'
-import { useParams } from 'next/navigation'
-
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardHeader from '@mui/material/CardHeader'
-import Checkbox from '@mui/material/Checkbox'
-import Chip from '@mui/material/Chip'
-import LinearProgress from '@mui/material/LinearProgress'
-import Typography from '@mui/material/Typography'
-
-// Third-party Imports
-import type { RankingInfo } from '@tanstack/match-sorter-utils'
-import { rankItem } from '@tanstack/match-sorter-utils'
-import type { ColumnDef, FilterFn } from '@tanstack/react-table'
-import {
- createColumnHelper,
- flexRender,
- getCoreRowModel,
- getFacetedMinMaxValues,
- getFacetedRowModel,
- getFacetedUniqueValues,
- getPaginationRowModel,
- getSortedRowModel,
- useReactTable
-} from '@tanstack/react-table'
-import classnames from 'classnames'
-
-// Type Imports
-import type { Vehicle } from '@/types/apps/logisticsTypes'
-import type { Locale } from '@configs/i18n'
-import type { ThemeColor } from '@core/types'
-
-// Components Imports
-import CustomAvatar from '@core/components/mui/Avatar'
-import OptionMenu from '@core/components/option-menu'
-
-// Util Imports
-import { getLocalizedUrl } from '@/utils/i18n'
-
-// Style Imports
-import tableStyles from '@core/styles/table.module.css'
-
-declare module '@tanstack/table-core' {
- interface FilterFns {
- fuzzy: FilterFn
- }
- interface FilterMeta {
- itemRank: RankingInfo
- }
-}
-
-type chipColorType = {
- color: ThemeColor
-}
-
-export const chipColor: { [key: string]: chipColorType } = {
- 'No Warnings': { color: 'success' },
- 'Fuel Problems': { color: 'primary' },
- 'Temperature Not Optimal': { color: 'warning' },
- 'Ecu Not Responding': { color: 'error' },
- 'Oil Leakage': { color: 'info' }
-}
-
-const fuzzyFilter: FilterFn = (row, columnId, value, addMeta) => {
- // Rank the item
- const itemRank = rankItem(row.getValue(columnId), value)
-
- // Store the itemRank info
- addMeta({
- itemRank
- })
-
- // Return if the item should be filtered in/out
- return itemRank.passed
-}
-
-// Column Definitions
-const columnHelper = createColumnHelper()
-
-const LogisticsOverviewTable = ({ vehicleData }: { vehicleData?: Vehicle[] }) => {
- // States
- const [rowSelection, setRowSelection] = useState({})
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
- const [data, setData] = useState(...[vehicleData])
-
- // Hooks
- const { lang: locale } = useParams()
-
- const columns = useMemo[]>(
- () => [
- {
- id: 'select',
- header: ({ table }) => (
-
- ),
- cell: ({ row }) => (
-
- )
- },
- columnHelper.accessor('location', {
- header: 'Location',
- cell: ({ row }) => (
-
-
-
-
-
- VOL-{row.original.location}
-
-
- )
- }),
- columnHelper.accessor('startCity', {
- header: 'Starting Route',
- cell: ({ row }) => {`${row.original.startCity}, ${row.original.startCountry}`}
- }),
- columnHelper.accessor('endCity', {
- header: 'Ending Route',
- cell: ({ row }) => {`${row.original.endCity}, ${row.original.endCountry}`}
- }),
- columnHelper.accessor('warnings', {
- header: 'Warnings',
- cell: ({ row }) => (
-
- )
- }),
- columnHelper.accessor('progress', {
- header: 'Progress',
- cell: ({ row }) => (
-
-
- {`${row.original.progress}%`}
-
- )
- })
- ],
- // eslint-disable-next-line react-hooks/exhaustive-deps
- []
- )
-
- const table = useReactTable({
- data: data as Vehicle[],
- columns,
- filterFns: {
- fuzzy: fuzzyFilter
- },
- state: {
- rowSelection
- },
- initialState: {
- pagination: {
- pageSize: 5
- }
- },
- enableRowSelection: true, //enable row selection for all rows
- // enableRowSelection: row => row.original.age > 18, // or enable row selection conditionally per row
- onRowSelectionChange: setRowSelection,
- getCoreRowModel: getCoreRowModel(),
- getSortedRowModel: getSortedRowModel(),
- getPaginationRowModel: getPaginationRowModel(),
- getFacetedRowModel: getFacetedRowModel(),
- getFacetedUniqueValues: getFacetedUniqueValues(),
- getFacetedMinMaxValues: getFacetedMinMaxValues()
- })
-
- return (
-
- } />
-
-
-
- {table.getHeaderGroups().map(headerGroup => (
-
- {headerGroup.headers.map(header => (
-
- {header.isPlaceholder ? null : (
- <>
-
- {flexRender(header.column.columnDef.header, header.getContext())}
- {{
- asc: ,
- desc:
- }[header.column.getIsSorted() as 'asc' | 'desc'] ?? null}
-
- >
- )}
-
- ))}
-
- ))}
-
- {table.getFilteredRowModel().rows.length === 0 ? (
-
-
-
- No data available
-
-
-
- ) : (
-
- {table
- .getRowModel()
- .rows.slice(0, table.getState().pagination.pageSize)
- .map(row => {
- return (
-
- {row.getVisibleCells().map(cell => (
- {flexRender(cell.column.columnDef.cell, cell.getContext())}
- ))}
-
- )
- })}
-
- )}
-
-
- {/* }
- count={table.getFilteredRowModel().rows.length}
- rowsPerPage={table.getState().pagination.pageSize}
- page={table.getState().pagination.pageIndex}
- onPageChange={(_, page) => {
- table.setPageIndex(page)
- }}
- /> */}
-
- )
-}
-
-export default LogisticsOverviewTable
diff --git a/src/views/apps/logistics/dashboard/LogisticsShipmentStatistics.tsx b/src/views/apps/logistics/dashboard/LogisticsShipmentStatistics.tsx
deleted file mode 100644
index 55d24dc..0000000
--- a/src/views/apps/logistics/dashboard/LogisticsShipmentStatistics.tsx
+++ /dev/null
@@ -1,238 +0,0 @@
-'use client'
-
-// React Imports
-import { useRef, useState } from 'react'
-import type { SyntheticEvent } from 'react'
-
-// Next Imports
-import dynamic from 'next/dynamic'
-
-// Mui Imports
-import Card from '@mui/material/Card'
-import CardHeader from '@mui/material/CardHeader'
-import CardContent from '@mui/material/CardContent'
-import Grow from '@mui/material/Grow'
-import Paper from '@mui/material/Paper'
-import Button from '@mui/material/Button'
-import Popper from '@mui/material/Popper'
-import MenuItem from '@mui/material/MenuItem'
-import MenuList from '@mui/material/MenuList'
-import ButtonGroup from '@mui/material/ButtonGroup'
-import ClickAwayListener from '@mui/material/ClickAwayListener'
-import { useTheme } from '@mui/material/styles'
-
-// Third Party Imports
-import type { ApexOptions } from 'apexcharts'
-
-// Styled Component Imports
-const AppReactApexCharts = dynamic(() => import('@/libs/styles/AppReactApexCharts'))
-
-// Style Imports
-import './styles.css'
-
-const options = [
- 'January',
- 'February',
- 'March',
- 'April',
- 'May',
- 'June',
- 'July',
- 'August',
- 'September',
- 'October',
- 'November',
- 'December'
-]
-
-const MonthButton = () => {
- // States
- const [open, setOpen] = useState(false)
- const [selectedIndex, setSelectedIndex] = useState(0)
-
- // Refs
- const anchorRef = useRef(null)
-
- const handleMenuItemClick = (event: SyntheticEvent, index: number) => {
- setSelectedIndex(index)
- setOpen(false)
- }
-
- const handleToggle = () => {
- setOpen(prevOpen => !prevOpen)
- }
-
- const handleClose = () => {
- setOpen(false)
- }
-
- return (
- <>
-
- {options[selectedIndex]}
-
-
-
-
-
- {({ TransitionProps, placement }) => (
-
-
-
-
-
-
-
- )}
-
- >
- )
-}
-
-const series = [
- {
- name: 'Shipment',
- type: 'column',
- data: [38, 45, 33, 38, 32, 48, 45, 40, 42, 37]
- },
- {
- name: 'Delivery',
- type: 'line',
- data: [23, 28, 23, 32, 25, 42, 32, 32, 26, 24]
- }
-]
-
-const LogisticsShipmentStatistics = () => {
- // Hooks
- const theme = useTheme()
-
- const options: ApexOptions = {
- chart: {
- type: 'line',
- stacked: false,
- parentHeightOffset: 0,
- toolbar: {
- show: false
- },
- zoom: {
- enabled: false
- }
- },
- markers: {
- size: 5,
- colors: '#fff',
- strokeColors: 'var(--mui-palette-primary-main)',
- hover: {
- size: 6
- },
- radius: 4
- },
- stroke: {
- curve: 'smooth',
- width: [0, 3],
- lineCap: 'round'
- },
- legend: {
- show: true,
- position: 'bottom',
- markers: {
- width: 8,
- height: 8,
- offsetY: 1,
- offsetX: theme.direction === 'rtl' ? 8 : -4
- },
- height: 40,
- itemMargin: {
- horizontal: 10,
- vertical: 0
- },
- fontSize: '15px',
- fontFamily: 'Open Sans',
- fontWeight: 400,
- labels: {
- colors: 'var(--mui-palette-text-primary)'
- },
- offsetY: 10
- },
- grid: {
- strokeDashArray: 8,
- borderColor: 'var(--mui-palette-divider)'
- },
- colors: ['var(--mui-palette-warning-main)', 'var(--mui-palette-primary-main)'],
- fill: {
- opacity: [1, 1]
- },
- plotOptions: {
- bar: {
- columnWidth: '30%',
- borderRadius: 4,
- borderRadiusApplication: 'end'
- }
- },
- dataLabels: {
- enabled: false
- },
- xaxis: {
- tickAmount: 10,
- categories: ['1 Jan', '2 Jan', '3 Jan', '4 Jan', '5 Jan', '6 Jan', '7 Jan', '8 Jan', '9 Jan', '10 Jan'],
- labels: {
- style: {
- colors: 'var(--mui-palette-text-disabled)',
- fontSize: '13px',
- fontWeight: 400
- }
- },
- axisBorder: {
- show: false
- },
- axisTicks: {
- show: false
- }
- },
- yaxis: {
- tickAmount: 5,
- labels: {
- style: {
- colors: 'var(--mui-palette-text-disabled)',
- fontSize: '13px',
- fontWeight: 400
- }
- }
- }
- }
-
- return (
-
- } />
-
-
-
-
- )
-}
-
-export default LogisticsShipmentStatistics
diff --git a/src/views/apps/logistics/dashboard/LogisticsStatisticsCard.tsx b/src/views/apps/logistics/dashboard/LogisticsStatisticsCard.tsx
deleted file mode 100644
index 03e71ee..0000000
--- a/src/views/apps/logistics/dashboard/LogisticsStatisticsCard.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-// MUI Imports
-import Grid from '@mui/material/Grid2'
-
-// Types Imports
-import type { CardStatsHorizontalWithBorderProps } from '@/types/pages/widgetTypes'
-
-// Components Imports
-import HorizontalWithBorder from '@components/card-statistics/HorizontalWithBorder'
-
-const LogisticsStatisticsCard = ({ data }: { data?: CardStatsHorizontalWithBorderProps[] }) => {
- return (
- data && (
-
- {data.map((item, index) => (
-
-
-
- ))}
-
- )
- )
-}
-
-export default LogisticsStatisticsCard
diff --git a/src/views/apps/logistics/dashboard/LogisticsVehicleOverview.tsx b/src/views/apps/logistics/dashboard/LogisticsVehicleOverview.tsx
deleted file mode 100644
index 97625d3..0000000
--- a/src/views/apps/logistics/dashboard/LogisticsVehicleOverview.tsx
+++ /dev/null
@@ -1,140 +0,0 @@
-'use client'
-
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardHeader from '@mui/material/CardHeader'
-import CardContent from '@mui/material/CardContent'
-import LinearProgress from '@mui/material/LinearProgress'
-import Typography from '@mui/material/Typography'
-
-// Third-party Imports
-import classnames from 'classnames'
-
-// Components Imports
-import OptionMenu from '@core/components/option-menu'
-
-// Style Imports
-import tableStyles from '@core/styles/table.module.css'
-import styles from './styles.module.css'
-
-type dataTypes = {
- icon: string
- heading: string
- time: string
- progressColor: string
- progressColorVariant: string
- progressData: string
- widthClass?: string
-}
-
-const data: dataTypes[] = [
- {
- icon: 'tabler-car',
- heading: 'On the way',
- time: '2hr 10min',
- progressColor: 'action',
- progressColorVariant: 'hover',
- progressData: '39.7%',
- widthClass: 'is-[39.7%]'
- },
- {
- icon: 'tabler-circle-arrow-down',
- heading: 'Unloading',
- time: '3hr 15min',
- progressColor: 'primary',
- progressColorVariant: 'main',
- progressData: '28.3%',
- widthClass: 'is-[28.3%]'
- },
- {
- icon: 'tabler-circle-arrow-up',
- heading: 'Loading',
- time: '1hr 24min',
- progressColor: 'info',
- progressColorVariant: 'main',
- progressData: '17.4%',
- widthClass: 'is-[17.4%]'
- },
- {
- icon: 'tabler-clock',
- heading: 'Waiting',
- time: '5hr 19min',
- progressColor: 'SnackbarContent',
- progressColorVariant: 'bg',
- progressData: '14.6%',
- widthClass: 'is-[14.6%]'
- }
-]
-
-const LogisticsVehicleOverview = () => {
- return (
-
- } />
-
-
-
- {data.map((item, index) => (
-
- {item.heading}
-
-
- index === 0
- ? 'var(--mui-palette-text-primary)'
- : item.progressColor === 'info'
- ? 'var(--mui-palette-common-white)'
- : // eslint-disable-next-line lines-around-comment
- // @ts-ignore
- theme.palette.getContrastText(theme.palette[item.progressColor][item.progressColorVariant])
- }}
- >
- {item.progressData}
-
-
- ))}
-
-
-
-
- {data.map((item, index) => (
-
-
-
- {item.heading}
-
-
-
- {item.time}
-
-
-
- {item.progressData}
-
-
- ))}
-
-
-
-
-
-
- )
-}
-
-export default LogisticsVehicleOverview
diff --git a/src/views/apps/logistics/dashboard/styles.css b/src/views/apps/logistics/dashboard/styles.css
deleted file mode 100644
index 1f26b13..0000000
--- a/src/views/apps/logistics/dashboard/styles.css
+++ /dev/null
@@ -1,7 +0,0 @@
-#shipment-statistics .apexcharts-legend .apexcharts-legend-series {
- border: 1px solid var(--mui-palette-divider);
- border-radius: 0.375rem;
- block-size: 83%;
- padding-block: 4px;
- padding-inline: 16px;
-}
diff --git a/src/views/apps/logistics/dashboard/styles.module.css b/src/views/apps/logistics/dashboard/styles.module.css
deleted file mode 100644
index 8445e9d..0000000
--- a/src/views/apps/logistics/dashboard/styles.module.css
+++ /dev/null
@@ -1,22 +0,0 @@
-.linearRound {
- &:first-child span {
- border-start-start-radius: 8px;
- border-end-start-radius: 8px;
- }
- &:last-child span {
- border-start-end-radius: 8px;
- border-end-end-radius: 8px;
- }
-}
-
-.header {
- &::after {
- content: '';
- position: absolute;
- inset-block-end: -14px;
- inset-inline-start: 0;
- block-size: 10px;
- inline-size: 2px;
- background-color: var(--mui-palette-divider);
- }
-}
diff --git a/src/views/apps/logistics/fleet/FleetMap.tsx b/src/views/apps/logistics/fleet/FleetMap.tsx
deleted file mode 100644
index 85d6279..0000000
--- a/src/views/apps/logistics/fleet/FleetMap.tsx
+++ /dev/null
@@ -1,78 +0,0 @@
-// React Imports
-import { useRef, useEffect } from 'react'
-
-// Third-party Imports
-import { Map, Marker } from 'react-map-gl'
-import type { MapRef } from 'react-map-gl'
-import 'mapbox-gl/dist/mapbox-gl.css'
-
-// Types Imports
-import type { viewStateType } from './index'
-
-// Style Imports
-import './styles.css'
-
-type Props = {
- viewState: viewStateType
- carIndex: number | false
- geojson: {
- type: string
- features: {
- type: string
- geometry: {
- type: string
- longitude: number
- latitude: number
- }
- }[]
- }
- mapboxAccessToken: string
-}
-
-const FleetMap = (props: Props) => {
- // Vars
- const { carIndex, viewState, geojson, mapboxAccessToken } = props
-
- // Hooks
- const mapRef = useRef()
-
- useEffect(() => {
- mapRef.current?.flyTo({ center: [viewState.longitude, viewState.latitude], zoom: 16 })
- }, [viewState])
-
- return (
-
-
- {geojson.features.map((item, index) => {
- return (
-
-
-
- )
- })}
-
-
- )
-}
-
-export default FleetMap
diff --git a/src/views/apps/logistics/fleet/FleetSidebar.tsx b/src/views/apps/logistics/fleet/FleetSidebar.tsx
deleted file mode 100644
index b4b7e41..0000000
--- a/src/views/apps/logistics/fleet/FleetSidebar.tsx
+++ /dev/null
@@ -1,321 +0,0 @@
-// React Imports
-import { useEffect } from 'react'
-import type { ReactNode, SyntheticEvent } from 'react'
-
-// Mui Imports
-import MuiAccordion from '@mui/material/Accordion'
-import MuiAccordionDetails from '@mui/material/AccordionDetails'
-import MuiAccordionSummary from '@mui/material/AccordionSummary'
-import Drawer from '@mui/material/Drawer'
-import IconButton from '@mui/material/IconButton'
-import LinearProgress from '@mui/material/LinearProgress'
-import { styled } from '@mui/material/styles'
-import Typography from '@mui/material/Typography'
-import MuiTimeline from '@mui/lab/Timeline'
-import TimelineItem from '@mui/lab/TimelineItem'
-import TimelineSeparator from '@mui/lab/TimelineSeparator'
-import TimelineDot from '@mui/lab/TimelineDot'
-import TimelineConnector from '@mui/lab/TimelineConnector'
-import TimelineContent from '@mui/lab/TimelineContent'
-import type { AccordionProps } from '@mui/material/Accordion'
-import type { AccordionSummaryProps } from '@mui/material/AccordionSummary'
-import type { AccordionDetailsProps } from '@mui/material/AccordionDetails'
-import type { TimelineProps } from '@mui/lab/Timeline'
-
-// Third-party Imports
-import PerfectScrollbar from 'react-perfect-scrollbar'
-
-// Types Imports
-import type { viewStateType } from './index'
-
-// Components Imports
-import CustomAvatar from '@core/components/mui/Avatar'
-
-type Props = {
- backdropOpen: boolean
- setBackdropOpen: (value: boolean) => void
- sidebarOpen: boolean
- setSidebarOpen: (value: boolean) => void
- isBelowLgScreen: boolean
- isBelowMdScreen: boolean
- isBelowSmScreen: boolean
- expanded: number | false
- setExpanded: (value: number | false) => void
- setViewState: (value: viewStateType) => void
- geojson: {
- type: string
- features: {
- type: string
- geometry: {
- type: string
- longitude: number
- latitude: number
- }
- }[]
- }
-}
-
-// Styled component for Accordion component
-const Accordion = styled(MuiAccordion)({
- boxShadow: 'none !important',
- border: 'none',
- '&:before': {
- content: 'none'
- },
- marginBlockEnd: '0px !important'
-})
-
-// Styled component for AccordionSummary component
-const AccordionSummary = styled(MuiAccordionSummary)(({ theme }) => ({
- paddingBlock: theme.spacing(0, 6),
- paddingInline: theme.spacing(0)
-}))
-
-// Styled component for AccordionDetails component
-const AccordionDetails = styled(MuiAccordionDetails)(({ theme }) => ({
- paddingBlock: theme.spacing(0, 1),
- paddingInline: theme.spacing(0)
-}))
-
-// Styled Timeline component
-const Timeline = styled(MuiTimeline)({
- paddingLeft: 0,
- paddingRight: 0,
- '& .MuiTimelineItem-root': {
- width: '100%',
- '&:before': {
- display: 'none'
- }
- },
- '& .MuiTimelineDot-root': {
- border: 0,
- padding: 0
- }
-})
-
-type VehicleTrackingDataType = {
- name: string
- location: string
- progress: number
- driverName: string
- passengerName: string
-}
-
-const vehicleTrackingData: VehicleTrackingDataType[] = [
- {
- name: 'VOL-342808',
- location: 'Chelsea, NY, USA',
- progress: 88,
- driverName: 'Veronica Herman',
- passengerName: 'Helen Jacobs'
- },
- {
- name: 'VOL-954784',
- location: 'Lincoln Harbor, NY, USA',
- progress: 90,
- driverName: 'Myrtle Ullrich',
- passengerName: 'William Miller'
- },
- {
- name: 'VOL-342808',
- location: 'Midtown East, NY, USA',
- progress: 60,
- driverName: 'Barry Schowalter',
- passengerName: 'Charles Anderson'
- },
- {
- name: 'VOL-343908',
- location: 'Hoboken, NY, USA',
- progress: 28,
- driverName: 'Frank Jones',
- passengerName: 'Edward Smith'
- }
-]
-
-const ScrollWrapper = ({ children, isBelowLgScreen }: { children: ReactNode; isBelowLgScreen: boolean }) => {
- if (isBelowLgScreen) {
- return {children}
- } else {
- return (
-
- {children}
-
- )
- }
-}
-
-const VehicleTracking = ({
- vehicleTrackingData,
- index,
- expanded,
- handleChange
-}: {
- vehicleTrackingData: VehicleTrackingDataType
- index: number
- expanded: number | false
- handleChange: (panel: number) => (event: SyntheticEvent, isExpanded: boolean) => void
-}) => {
- return (
-
-
-
-
-
-
-
- {vehicleTrackingData.name}
- {vehicleTrackingData.location}
-
-
-
-
-
-
- Delivery Process
- {vehicleTrackingData.progress}%
-
-
-
-
-
-
-
-
-
-
-
-
-
- Tracking Number Created
-
- {vehicleTrackingData.driverName}
- Sep 01, 7:53 AM
-
-
-
-
-
-
-
-
-
-
-
-
-
- Out For Delivery
-
- {vehicleTrackingData.driverName}
- Sep 03, 8:02 AM
-
-
-
-
-
-
-
-
-
-
-
-
- Arrived
-
- {vehicleTrackingData.passengerName}
- Sep 03, 8:02 AM
-
-
-
-
-
- )
-}
-
-const FleetSidebar = (props: Props) => {
- // Props
- const {
- backdropOpen,
- setBackdropOpen,
- sidebarOpen,
- setSidebarOpen,
- isBelowLgScreen,
- isBelowMdScreen,
- isBelowSmScreen,
- expanded,
- setExpanded,
- setViewState,
- geojson
- } = props
-
- const handleChange = (panel: number) => (event: SyntheticEvent, isExpanded: boolean) => {
- if (isExpanded) {
- setViewState({
- longitude: geojson.features[panel].geometry.longitude,
- latitude: geojson.features[panel].geometry.latitude,
- zoom: 16
- })
- }
-
- setExpanded(isExpanded ? panel : false)
- }
-
- useEffect(() => {
- if (!backdropOpen && sidebarOpen) {
- setSidebarOpen(false)
- }
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [backdropOpen])
-
- return (
- setSidebarOpen(false)}
- variant={!isBelowMdScreen ? 'permanent' : 'persistent'}
- ModalProps={{
- disablePortal: true,
- keepMounted: true // Better open performance on mobile.
- }}
- sx={{
- zIndex: isBelowMdScreen && sidebarOpen ? 11 : 10,
- position: !isBelowMdScreen ? 'static' : 'absolute',
- ...(isBelowSmScreen && sidebarOpen && { width: '100%' }),
- '& .MuiDrawer-paper': {
- borderRight: 'none',
- boxShadow: 'none',
- overflow: 'hidden',
- width: isBelowSmScreen ? '100%' : '360px',
- position: !isBelowMdScreen ? 'static' : 'absolute'
- }
- }}
- >
-
- Fleet
-
- {isBelowMdScreen ? (
- {
- setSidebarOpen(false)
- setBackdropOpen(false)
- }}
- >
-
-
- ) : null}
-
-
- {vehicleTrackingData.map((item, index) => (
-
- ))}
-
-
- )
-}
-
-export default FleetSidebar
diff --git a/src/views/apps/logistics/fleet/index.tsx b/src/views/apps/logistics/fleet/index.tsx
deleted file mode 100644
index 0c0acc0..0000000
--- a/src/views/apps/logistics/fleet/index.tsx
+++ /dev/null
@@ -1,144 +0,0 @@
-'use client'
-
-// React Imports
-import { useState, useEffect } from 'react'
-
-// MUI Imports
-import Backdrop from '@mui/material/Backdrop'
-import useMediaQuery from '@mui/material/useMediaQuery'
-import type { Theme } from '@mui/material/styles'
-
-// Third-party Imports
-import classNames from 'classnames'
-
-//Components Imports
-import CustomIconButton from '@core/components/mui/IconButton'
-import FleetSidebar from './FleetSidebar'
-import FleetMap from './FleetMap'
-
-// Hook Imports
-import { useSettings } from '@core/hooks/useSettings'
-
-// Util Imports
-import { commonLayoutClasses } from '@layouts/utils/layoutClasses'
-
-export type viewStateType = {
- longitude: number
- latitude: number
- zoom: number
-}
-
-const geojson = {
- type: 'FeatureCollection',
- features: [
- {
- type: 'Feature',
- geometry: {
- type: 'Point',
- longitude: -73.999024,
- latitude: 40.75249842
- }
- },
- {
- type: 'Feature',
- geometry: {
- type: 'Point',
- longitude: -74.03,
- latitude: 40.75699842
- }
- },
- {
- type: 'Feature',
- geometry: {
- type: 'Point',
- longitude: -73.967524,
- latitude: 40.7599842
- }
- },
- {
- type: 'Feature',
- geometry: {
- type: 'Point',
- longitude: -74.0325,
- latitude: 40.742992
- }
- }
- ]
-}
-
-const Fleet = ({ mapboxAccessToken }: { mapboxAccessToken: string }) => {
- // States
- const [backdropOpen, setBackdropOpen] = useState(false)
- const [sidebarOpen, setSidebarOpen] = useState(false)
- const [expanded, setExpanded] = useState(0)
-
- const [viewState, setViewState] = useState({
- longitude: -73.999024,
- latitude: 40.75249842,
- zoom: 12.5
- })
-
- // Hooks
- const { settings } = useSettings()
- const isBelowLgScreen = useMediaQuery((theme: Theme) => theme.breakpoints.down('lg'))
- const isBelowMdScreen = useMediaQuery((theme: Theme) => theme.breakpoints.down('md'))
- const isBelowSmScreen = useMediaQuery((theme: Theme) => theme.breakpoints.down('sm'))
-
- useEffect(() => {
- if (!isBelowMdScreen && backdropOpen && sidebarOpen) {
- setBackdropOpen(false)
- }
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [isBelowMdScreen])
-
- useEffect(() => {
- if (!isBelowSmScreen && sidebarOpen) {
- setBackdropOpen(true)
- }
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [isBelowSmScreen])
-
- return (
-
- {isBelowMdScreen ? (
- {
- setSidebarOpen(true)
- setBackdropOpen(true)
- }}
- >
-
-
- ) : null}
-
-
- setBackdropOpen(false)} className='absolute z-10' />
-
- )
-}
-
-export default Fleet
diff --git a/src/views/apps/logistics/fleet/styles.css b/src/views/apps/logistics/fleet/styles.css
deleted file mode 100644
index 0bc323d..0000000
--- a/src/views/apps/logistics/fleet/styles.css
+++ /dev/null
@@ -1,3 +0,0 @@
-.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl a.mapboxgl-ctrl-logo {
- display: none;
-}
diff --git a/src/views/apps/user/view/user-right/overview/index.tsx b/src/views/apps/user/view/user-right/overview/index.tsx
index 4500dfe..6c4d910 100644
--- a/src/views/apps/user/view/user-right/overview/index.tsx
+++ b/src/views/apps/user/view/user-right/overview/index.tsx
@@ -6,9 +6,6 @@ import ProjectListTable from './ProjectListTable'
import UserActivityTimeLine from './UserActivityTimeline'
import InvoiceListTable from './InvoiceListTable'
-// Data Imports
-import { getInvoiceData } from '@/app/server/actions'
-
/**
* ! If you need data using an API call, uncomment the below API code, update the `process.env.API_URL` variable in the
* ! `.env` file found at root of your project and also update the API endpoints like `/apps/invoice` in below example.
@@ -27,8 +24,6 @@ import { getInvoiceData } from '@/app/server/actions'
} */
const OverViewTab = async () => {
- // Vars
- const invoiceData = await getInvoiceData()
return (
@@ -39,7 +34,7 @@ const OverViewTab = async () => {
-
+
)
diff --git a/src/views/pages/account-settings/account/AccountDelete.tsx b/src/views/pages/account-settings/account/AccountDelete.tsx
deleted file mode 100644
index 6233e3d..0000000
--- a/src/views/pages/account-settings/account/AccountDelete.tsx
+++ /dev/null
@@ -1,67 +0,0 @@
-'use client'
-
-// React Imports
-import { useState } from 'react'
-
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardHeader from '@mui/material/CardHeader'
-import CardContent from '@mui/material/CardContent'
-import FormControlLabel from '@mui/material/FormControlLabel'
-import Checkbox from '@mui/material/Checkbox'
-import Button from '@mui/material/Button'
-import FormControl from '@mui/material/FormControl'
-import FormHelperText from '@mui/material/FormHelperText'
-
-// Third-party Imports
-import { useForm, Controller } from 'react-hook-form'
-
-// Component Imports
-import ConfirmationDialog from '@components/dialogs/confirmation-dialog'
-
-const AccountDelete = () => {
- // States
- const [open, setOpen] = useState(false)
-
- // Hooks
- const {
- control,
- watch,
- handleSubmit,
- formState: { errors }
- } = useForm({ defaultValues: { checkbox: false } })
-
- // Vars
- const checkboxValue = watch('checkbox')
-
- const onSubmit = () => {
- setOpen(true)
- }
-
- return (
-
-
-
-
-
-
- )
-}
-
-export default AccountDelete
diff --git a/src/views/pages/account-settings/account/AccountDetails.tsx b/src/views/pages/account-settings/account/AccountDetails.tsx
deleted file mode 100644
index 6cf1771..0000000
--- a/src/views/pages/account-settings/account/AccountDetails.tsx
+++ /dev/null
@@ -1,300 +0,0 @@
-'use client'
-
-// React Imports
-import { useState } from 'react'
-import type { ChangeEvent } from 'react'
-
-// MUI Imports
-import Grid from '@mui/material/Grid2'
-import Card from '@mui/material/Card'
-import CardContent from '@mui/material/CardContent'
-import Button from '@mui/material/Button'
-import Typography from '@mui/material/Typography'
-import MenuItem from '@mui/material/MenuItem'
-import Chip from '@mui/material/Chip'
-import type { SelectChangeEvent } from '@mui/material/Select'
-
-// Component Imports
-import CustomTextField from '@core/components/mui/TextField'
-
-type Data = {
- firstName: string
- lastName: string
- email: string
- organization: string
- phoneNumber: number | string
- address: string
- state: string
- zipCode: string
- country: string
- language: string
- timezone: string
- currency: string
-}
-
-// Vars
-const initialData: Data = {
- firstName: 'John',
- lastName: 'Doe',
- email: 'john.doe@example.com',
- organization: 'Pixinvent',
- phoneNumber: '+1 (917) 543-9876',
- address: '123 Main St, New York, NY 10001',
- state: 'New York',
- zipCode: '634880',
- country: 'usa',
- language: 'english',
- timezone: 'gmt-12',
- currency: 'usd'
-}
-
-const languageData = ['English', 'Arabic', 'French', 'German', 'Portuguese']
-
-const AccountDetails = () => {
- // States
- const [formData, setFormData] = useState(initialData)
- const [fileInput, setFileInput] = useState('')
- const [imgSrc, setImgSrc] = useState('/images/avatars/1.png')
- const [language, setLanguage] = useState(['English'])
-
- const handleDelete = (value: string) => {
- setLanguage(current => current.filter(item => item !== value))
- }
-
- const handleChange = (event: SelectChangeEvent) => {
- setLanguage(event.target.value as string[])
- }
-
- const handleFormChange = (field: keyof Data, value: Data[keyof Data]) => {
- setFormData({ ...formData, [field]: value })
- }
-
- const handleFileInputChange = (file: ChangeEvent) => {
- const reader = new FileReader()
- const { files } = file.target as HTMLInputElement
-
- if (files && files.length !== 0) {
- reader.onload = () => setImgSrc(reader.result as string)
- reader.readAsDataURL(files[0])
-
- if (reader.result !== null) {
- setFileInput(reader.result as string)
- }
- }
- }
-
- const handleFileInputReset = () => {
- setFileInput('')
- setImgSrc('/images/avatars/1.png')
- }
-
- return (
-
-
-
-
-
-
-
- Upload New Photo
-
-
-
- Reset
-
-
-
Allowed JPG, GIF or PNG. Max size of 800K
-
-
-
-
-
-
-
- )
-}
-
-export default AccountDetails
diff --git a/src/views/pages/account-settings/account/index.tsx b/src/views/pages/account-settings/account/index.tsx
deleted file mode 100644
index 32ffee2..0000000
--- a/src/views/pages/account-settings/account/index.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-// MUI Imports
-import Grid from '@mui/material/Grid2'
-
-// Component Imports
-import AccountDetails from './AccountDetails'
-import AccountDelete from './AccountDelete'
-
-const Account = () => {
- return (
-
-
-
-
-
-
-
-
- )
-}
-
-export default Account
diff --git a/src/views/pages/account-settings/billing-plans/Address.tsx b/src/views/pages/account-settings/billing-plans/Address.tsx
deleted file mode 100644
index abae6de..0000000
--- a/src/views/pages/account-settings/billing-plans/Address.tsx
+++ /dev/null
@@ -1,85 +0,0 @@
-'use client'
-
-// React Imports
-import { useState } from 'react'
-
-// MUI Imports
-import Grid from '@mui/material/Grid2'
-import Card from '@mui/material/Card'
-import CardHeader from '@mui/material/CardHeader'
-import CardContent from '@mui/material/CardContent'
-import Button from '@mui/material/Button'
-import MenuItem from '@mui/material/MenuItem'
-import InputAdornment from '@mui/material/InputAdornment'
-
-// Component Imports
-import CustomTextField from '@core/components/mui/TextField'
-
-const Address = () => {
- // States
- const [state, setState] = useState('')
-
- return (
-
-
-
-
-
-
- )
-}
-
-export default Address
diff --git a/src/views/pages/account-settings/billing-plans/CurrentPlan.tsx b/src/views/pages/account-settings/billing-plans/CurrentPlan.tsx
deleted file mode 100644
index 0c737b6..0000000
--- a/src/views/pages/account-settings/billing-plans/CurrentPlan.tsx
+++ /dev/null
@@ -1,96 +0,0 @@
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardHeader from '@mui/material/CardHeader'
-import CardContent from '@mui/material/CardContent'
-import Grid from '@mui/material/Grid2'
-import Typography from '@mui/material/Typography'
-import Button from '@mui/material/Button'
-import Chip from '@mui/material/Chip'
-import Alert from '@mui/material/Alert'
-import AlertTitle from '@mui/material/AlertTitle'
-import LinearProgress from '@mui/material/LinearProgress'
-import type { ButtonProps } from '@mui/material/Button'
-
-// Type Imports
-import type { PricingPlanType } from '@/types/pages/pricingTypes'
-import type { ThemeColor } from '@core/types'
-
-// Component Imports
-import ConfirmationDialog from '@components/dialogs/confirmation-dialog'
-import UpgradePlan from '@components/dialogs/upgrade-plan'
-import OpenDialogOnElementClick from '@components/dialogs/OpenDialogOnElementClick'
-
-const CurrentPlan = ({ data }: { data?: PricingPlanType[] }) => {
- const buttonProps = (children: string, color: ThemeColor, variant: ButtonProps['variant']): ButtonProps => ({
- children,
- variant,
- color
- })
-
- return (
-
-
-
-
-
-
-
- Your Current Plan is Basic
-
- A simple start for everyone
-
-
-
- Active until Dec 09, 2021
-
- We will send you a notification upon Subscription expiration
-
-
-
-
- $199 Per Month
-
-
-
-
Standard plan for small to medium businesses
-
-
-
-
- We need your attention!
- Your plan requires update
-
-
-
-
- Days
-
-
- 12 of 30 Days
-
-
-
-
18 days remaining until your plan requires update
-
-
-
-
-
-
-
-
-
- )
-}
-
-export default CurrentPlan
diff --git a/src/views/pages/account-settings/billing-plans/InvoiceListTable.tsx b/src/views/pages/account-settings/billing-plans/InvoiceListTable.tsx
deleted file mode 100644
index 12d6bec..0000000
--- a/src/views/pages/account-settings/billing-plans/InvoiceListTable.tsx
+++ /dev/null
@@ -1,461 +0,0 @@
-'use client'
-
-// React Imports
-import { useEffect, useMemo, useState } from 'react'
-
-// Next Imports
-import Link from 'next/link'
-import { useParams } from 'next/navigation'
-
-// MUI Imports
-import Button from '@mui/material/Button'
-import Card from '@mui/material/Card'
-import CardContent from '@mui/material/CardContent'
-import Checkbox from '@mui/material/Checkbox'
-import Chip from '@mui/material/Chip'
-import IconButton from '@mui/material/IconButton'
-import MenuItem from '@mui/material/MenuItem'
-import type { TextFieldProps } from '@mui/material/TextField'
-import Tooltip from '@mui/material/Tooltip'
-import Typography from '@mui/material/Typography'
-
-// Third-party Imports
-import type { RankingInfo } from '@tanstack/match-sorter-utils'
-import { rankItem } from '@tanstack/match-sorter-utils'
-import type { ColumnDef, FilterFn } from '@tanstack/react-table'
-import {
- createColumnHelper,
- flexRender,
- getCoreRowModel,
- getFacetedMinMaxValues,
- getFacetedRowModel,
- getFacetedUniqueValues,
- getFilteredRowModel,
- getPaginationRowModel,
- getSortedRowModel,
- useReactTable
-} from '@tanstack/react-table'
-import classnames from 'classnames'
-
-// Type Imports
-import type { InvoiceType } from '@/types/apps/invoiceTypes'
-import type { Locale } from '@configs/i18n'
-import type { ThemeColor } from '@core/types'
-
-// Component Imports
-import CustomAvatar from '@core/components/mui/Avatar'
-import CustomTextField from '@core/components/mui/TextField'
-import OptionMenu from '@core/components/option-menu'
-
-// Util Imports
-import { getInitials } from '@/utils/getInitials'
-import { getLocalizedUrl } from '@/utils/i18n'
-
-// Style Imports
-import tableStyles from '@core/styles/table.module.css'
-
-declare module '@tanstack/table-core' {
- interface FilterFns {
- fuzzy: FilterFn
- }
- interface FilterMeta {
- itemRank: RankingInfo
- }
-}
-
-type InvoiceTypeWithAction = InvoiceType & {
- action?: string
-}
-
-type InvoiceStatusObj = {
- [key: string]: {
- icon: string
- color: ThemeColor
- }
-}
-
-const fuzzyFilter: FilterFn = (row, columnId, value, addMeta) => {
- // Rank the item
- const itemRank = rankItem(row.getValue(columnId), value)
-
- // Store the itemRank info
- addMeta({
- itemRank
- })
-
- // Return if the item should be filtered in/out
- return itemRank.passed
-}
-
-const DebouncedInput = ({
- value: initialValue,
- onChange,
- debounce = 500,
- ...props
-}: {
- value: string | number
- onChange: (value: string | number) => void
- debounce?: number
-} & Omit) => {
- // States
- const [value, setValue] = useState(initialValue)
-
- useEffect(() => {
- setValue(initialValue)
- }, [initialValue])
-
- useEffect(() => {
- const timeout = setTimeout(() => {
- onChange(value)
- }, debounce)
-
- return () => clearTimeout(timeout)
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [value])
-
- return setValue(e.target.value)} />
-}
-
-// Vars
-const invoiceStatusObj: InvoiceStatusObj = {
- Sent: { color: 'secondary', icon: 'tabler-send-2' },
- Paid: { color: 'success', icon: 'tabler-check' },
- Draft: { color: 'primary', icon: 'tabler-mail' },
- 'Partial Payment': { color: 'warning', icon: 'tabler-chart-pie-2' },
- 'Past Due': { color: 'error', icon: 'tabler-alert-circle' },
- Downloaded: { color: 'info', icon: 'tabler-arrow-down' }
-}
-
-// Column Definitions
-const columnHelper = createColumnHelper()
-
-const InvoiceListTable = ({ invoiceData }: { invoiceData?: InvoiceType[] }) => {
- // States
- const [status, setStatus] = useState('')
- const [rowSelection, setRowSelection] = useState({})
- const [data, setData] = useState(...[invoiceData])
- const [filteredData, setFilteredData] = useState(data)
- const [globalFilter, setGlobalFilter] = useState('')
-
- // Hooks
- const { lang: locale } = useParams()
-
- const columns = useMemo[]>(
- () => [
- {
- id: 'select',
- header: ({ table }) => (
-
- ),
- cell: ({ row }) => (
-
- )
- },
- columnHelper.accessor('id', {
- header: '#',
- cell: ({ row }) => (
- {`#${row.original.id}`}
- )
- }),
- columnHelper.accessor('invoiceStatus', {
- header: 'Status',
- cell: ({ row }) => (
-
-
- {row.original.invoiceStatus}
-
-
-
- Balance:
- {' '}
- {row.original.balance}
-
-
- Due Date:
- {' '}
- {row.original.dueDate}
-
- }
- >
-
-
-
-
- )
- }),
- columnHelper.accessor('name', {
- header: 'Client',
- cell: ({ row }) => (
-
- {getAvatar({ avatar: row.original.avatar, name: row.original.name })}
-
-
- {row.original.name}
-
- {row.original.companyEmail}
-
-
- )
- }),
- columnHelper.accessor('total', {
- header: 'Total',
- cell: ({ row }) => {`$${row.original.total}`}
- }),
- columnHelper.accessor('issuedDate', {
- header: 'Issued Date',
- cell: ({ row }) => {row.original.issuedDate}
- }),
- columnHelper.accessor('balance', {
- header: 'Balance',
- cell: ({ row }) => {
- return row.original.balance === 0 ? (
-
- ) : (
- {row.original.balance}
- )
- }
- }),
- columnHelper.accessor('action', {
- header: 'Action',
- cell: ({ row }) => (
-
- setData(data?.filter(invoice => invoice.id !== row.original.id))}>
-
-
-
-
-
-
-
-
-
- ),
- enableSorting: false
- })
- ],
- // eslint-disable-next-line react-hooks/exhaustive-deps
- [data, filteredData]
- )
-
- const table = useReactTable({
- data: filteredData as InvoiceType[],
- columns,
- filterFns: {
- fuzzy: fuzzyFilter
- },
- state: {
- rowSelection,
- globalFilter
- },
- initialState: {
- pagination: {
- pageSize: 10
- }
- },
- enableRowSelection: true, //enable row selection for all rows
- // enableRowSelection: row => row.original.age > 18, // or enable row selection conditionally per row
- globalFilterFn: fuzzyFilter,
- onRowSelectionChange: setRowSelection,
- getCoreRowModel: getCoreRowModel(),
- onGlobalFilterChange: setGlobalFilter,
- getFilteredRowModel: getFilteredRowModel(),
- getSortedRowModel: getSortedRowModel(),
- getPaginationRowModel: getPaginationRowModel(),
- getFacetedRowModel: getFacetedRowModel(),
- getFacetedUniqueValues: getFacetedUniqueValues(),
- getFacetedMinMaxValues: getFacetedMinMaxValues()
- })
-
- const getAvatar = (params: Pick) => {
- const { avatar, name } = params
-
- if (avatar) {
- return
- } else {
- return (
-
- {getInitials(name as string)}
-
- )
- }
- }
-
- useEffect(() => {
- const filteredData = data?.filter(invoice => {
- if (status && invoice.invoiceStatus.toLowerCase().replace(/\s+/g, '-') !== status) return false
-
- return true
- })
-
- setFilteredData(filteredData)
- }, [status, data])
-
- return (
-
-
-
-
- Show
- table.setPageSize(Number(e.target.value))}
- className='max-sm:is-full sm:is-[70px]'
- >
- 10
- 25
- 50
-
-
-
}
- href={getLocalizedUrl('apps/invoice/add', locale as Locale)}
- className='max-sm:is-full'
- >
- Create Invoice
-
-
-
- setGlobalFilter(String(value))}
- placeholder='Search Invoice'
- className='max-sm:is-full sm:is-[250px]'
- />
- setStatus(e.target.value)}
- className='max-sm:is-full sm:is-[160px]'
- slotProps={{
- select: { displayEmpty: true }
- }}
- >
- Invoice Status
- Downloaded
- Draft
- Paid
- Partial Payment
- Past Due
- Sent
-
-
-
-
-
-
- {table.getHeaderGroups().map(headerGroup => (
-
- {headerGroup.headers.map(header => (
-
- {header.isPlaceholder ? null : (
- <>
-
- {flexRender(header.column.columnDef.header, header.getContext())}
- {{
- asc: ,
- desc:
- }[header.column.getIsSorted() as 'asc' | 'desc'] ?? null}
-
- >
- )}
-
- ))}
-
- ))}
-
- {table.getFilteredRowModel().rows.length === 0 ? (
-
-
-
- No data available
-
-
-
- ) : (
-
- {table
- .getRowModel()
- .rows.slice(0, table.getState().pagination.pageSize)
- .map(row => {
- return (
-
- {row.getVisibleCells().map(cell => (
- {flexRender(cell.column.columnDef.cell, cell.getContext())}
- ))}
-
- )
- })}
-
- )}
-
-
- {/* }
- count={table.getFilteredRowModel().rows.length}
- rowsPerPage={table.getState().pagination.pageSize}
- page={table.getState().pagination.pageIndex}
- onPageChange={(_, page) => {
- table.setPageIndex(page)
- }}
- onRowsPerPageChange={e => table.setPageSize(Number(e.target.value))}
- /> */}
-
- )
-}
-
-export default InvoiceListTable
diff --git a/src/views/pages/account-settings/billing-plans/PaymentMethod.tsx b/src/views/pages/account-settings/billing-plans/PaymentMethod.tsx
deleted file mode 100644
index f367b25..0000000
--- a/src/views/pages/account-settings/billing-plans/PaymentMethod.tsx
+++ /dev/null
@@ -1,225 +0,0 @@
-'use client'
-
-// React Imports
-import { useState } from 'react'
-
-// MUI Imports
-import Card from '@mui/material/Card'
-import Chip from '@mui/material/Chip'
-import Grid from '@mui/material/Grid2'
-import Radio from '@mui/material/Radio'
-import Switch from '@mui/material/Switch'
-import Button from '@mui/material/Button'
-import RadioGroup from '@mui/material/RadioGroup'
-import Typography from '@mui/material/Typography'
-import CardHeader from '@mui/material/CardHeader'
-import CardContent from '@mui/material/CardContent'
-import FormControlLabel from '@mui/material/FormControlLabel'
-import type { ButtonProps } from '@mui/material/Button'
-
-// Type Imports
-import type { ThemeColor } from '@core/types'
-
-// Component Imports
-import BillingCard from '@components/dialogs/billing-card'
-import OpenDialogOnElementClick from '@components/dialogs/OpenDialogOnElementClick'
-import CustomTextField from '@core/components/mui/TextField'
-
-type DataType = {
- cardNumber?: string
- name?: string
- expiryDate?: string
- cardCvv?: string
- imgSrc?: string
- imgAlt?: string
- cardStatus?: string
- badgeColor?: ThemeColor
-}
-
-// Vars
-const data: DataType[] = [
- {
- cardCvv: '587',
- name: 'Tom McBride',
- expiryDate: '12/24',
- imgAlt: 'Mastercard',
- badgeColor: 'primary',
- cardStatus: 'Primary',
- cardNumber: '5577 0000 5577 9865',
- imgSrc: '/images/logos/mastercard.png'
- },
- {
- cardCvv: '681',
- name: 'Mildred Wagner',
- expiryDate: '02/24',
- imgAlt: 'Visa card',
- cardNumber: '4532 3616 2070 5678',
- imgSrc: '/images/logos/visa.png'
- }
-]
-
-const PaymentMethod = () => {
- // States
- const [paymentMethod, setPaymentMethod] = useState<'credit' | 'cod'>('credit')
- const [creditCard, setCreditCard] = useState(0)
-
- // Hooks
- const [cardData, setCardData] = useState({
- cardNumber: '',
- name: '',
- expiryDate: '',
- cardCvv: ''
- })
-
- const handleReset = () => {
- setCardData({
- cardNumber: '',
- name: '',
- expiryDate: '',
- cardCvv: ''
- })
- }
-
- const buttonProps = (index: number): ButtonProps => ({
- variant: 'tonal',
- children: 'Edit',
- size: 'small',
- onClick: () => setCreditCard(index)
- })
-
- return (
-
-
-
-
-
-
-
- setPaymentMethod(e.target.value as 'credit' | 'cod')}
- className='flex gap-4'
- >
- } label='Credit/Debit/ATM Card' />
- } label='COD/Cheque' />
-
-
- {paymentMethod === 'credit' ? (
- <>
-
- setCardData({ ...cardData, cardNumber: e.target.value })}
- />
-
-
- setCardData({ ...cardData, name: e.target.value })}
- />
-
-
- setCardData({ ...cardData, expiryDate: e.target.value })}
- />
-
-
- setCardData({ ...cardData, cardCvv: e.target.value })}
- />
-
-
- } label='Save Card for future billing?' />
-
- >
- ) : (
-
-
- Cash on delivery is a mode of payment where you make the payment after the goods/services are
- received.
-
-
- You can pay cash or make the payment via debit/credit card directly to the delivery person.
-
-
- )}
-
-
- Save Changes
-
-
- Cancel
-
-
-
-
-
-
-
- My Cards
-
- {data.map((item: DataType, index: number) => (
-
-
-
-
- {item.name}
- {item.cardStatus ? (
-
- ) : null}
-
-
- {item.cardNumber && item.cardNumber.slice(0, -4).replace(/[0-9]/g, '*') + item.cardNumber.slice(-4)}
-
-
-
-
-
-
- Delete
-
-
-
Card expires at {item.expiryDate}
-
-
- ))}
-
-
-
-
- )
-}
-
-export default PaymentMethod
diff --git a/src/views/pages/account-settings/billing-plans/index.tsx b/src/views/pages/account-settings/billing-plans/index.tsx
deleted file mode 100644
index 713a7ca..0000000
--- a/src/views/pages/account-settings/billing-plans/index.tsx
+++ /dev/null
@@ -1,65 +0,0 @@
-// MUI Imports
-import Grid from '@mui/material/Grid2'
-
-// Component Imports
-import CurrentPlan from './CurrentPlan'
-import Address from './Address'
-import PaymentMethod from './PaymentMethod'
-import InvoiceListTable from './InvoiceListTable'
-
-// Data Imports
-import { getPricingData, getInvoiceData } from '@/app/server/actions'
-
-/**
- * ! If you need data using an API call, uncomment the below API code, update the `process.env.API_URL` variable in the
- * ! `.env` file found at root of your project and also update the API endpoints like `/pages/pricing` in below example.
- * ! Also, remove the above server action import and the action itself from the `src/app/server/actions.ts` file to clean up unused code
- * ! because we've used the server action for getting our static data.
- */
-
-/* const getPricingData = async () => {
- // Vars
- const res = await fetch(`${process.env.API_URL}/pages/pricing`)
-
- if (!res.ok) {
- throw new Error('Failed to fetch data')
- }
-
- return res.json()
-} */
-
-/* const getInvoiceData = async () => {
- // Vars
- const res = await fetch(`${process.env.API_URL}/apps/invoice`)
-
- if (!res.ok) {
- throw new Error('Failed to fetch invoice data')
- }
-
- return res.json()
-} */
-
-const BillingPlans = async () => {
- // Vars
- const data = await getPricingData()
- const invoiceData = await getInvoiceData()
-
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- )
-}
-
-export default BillingPlans
diff --git a/src/views/pages/account-settings/connections/index.tsx b/src/views/pages/account-settings/connections/index.tsx
deleted file mode 100644
index d8cd005..0000000
--- a/src/views/pages/account-settings/connections/index.tsx
+++ /dev/null
@@ -1,156 +0,0 @@
-// Next Imports
-import Link from 'next/link'
-
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardHeader from '@mui/material/CardHeader'
-import CardContent from '@mui/material/CardContent'
-import Grid from '@mui/material/Grid2'
-import Typography from '@mui/material/Typography'
-import Switch from '@mui/material/Switch'
-
-// Component Imports
-import CustomIconButton from '@core/components/mui/IconButton'
-
-type ConnectedAccountsType = {
- title: string
- logo: string
- checked: boolean
- subtitle: string
-}
-
-type SocialAccountsType = {
- title: string
- logo: string
- username?: string
- isConnected: boolean
- href?: string
-}
-
-// Vars
-const connectedAccountsArr: ConnectedAccountsType[] = [
- {
- checked: true,
- title: 'Google',
- logo: '/images/logos/google.png',
- subtitle: 'Calendar and Contacts'
- },
- {
- checked: false,
- title: 'Slack',
- logo: '/images/logos/slack.png',
- subtitle: 'Communications'
- },
- {
- checked: true,
- title: 'Github',
- logo: '/images/logos/github.png',
- subtitle: 'Manage your Git repositories'
- },
- {
- checked: true,
- title: 'Mailchimp',
- subtitle: 'Email marketing service',
- logo: '/images/logos/mailchimp.png'
- },
- {
- title: 'Asana',
- checked: false,
- subtitle: 'Task Communication',
- logo: '/images/logos/asana.png'
- }
-]
-
-const socialAccountsArr: SocialAccountsType[] = [
- {
- title: 'Facebook',
- isConnected: false,
- logo: '/images/logos/facebook.png'
- },
- {
- title: 'Twitter',
- isConnected: true,
- username: '@Pixinvent',
- logo: '/images/logos/twitter.png',
- href: 'https://twitter.com/pixinvents'
- },
- {
- title: 'Linkedin',
- isConnected: true,
- username: '@Pixinvent',
- logo: '/images/logos/linkedin.png',
- href: 'https://in.linkedin.com/company/pixinvent'
- },
- {
- title: 'Dribbble',
- isConnected: false,
- logo: '/images/logos/dribbble.png'
- },
- {
- title: 'Behance',
- isConnected: false,
- logo: '/images/logos/behance.png'
- }
-]
-
-const Connections = () => {
- return (
-
-
-
-
-
- {connectedAccountsArr.map((item, index) => (
-
-
-
-
- {item.title}
- {item.subtitle}
-
-
-
-
- ))}
-
-
-
-
-
- {socialAccountsArr.map((item, index) => (
-
-
-
-
- {item.title}
- {item.isConnected ? (
-
- {item.username}
-
- ) : (
- Not Connected
- )}
-
-
-
-
-
-
- ))}
-
-
-
-
- )
-}
-
-export default Connections
diff --git a/src/views/pages/account-settings/index.tsx b/src/views/pages/account-settings/index.tsx
deleted file mode 100644
index 2190bbd..0000000
--- a/src/views/pages/account-settings/index.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-'use client'
-
-// React Imports
-import { useState } from 'react'
-import type { SyntheticEvent, ReactElement } from 'react'
-
-// MUI Imports
-import Grid from '@mui/material/Grid2'
-import Tab from '@mui/material/Tab'
-import TabContext from '@mui/lab/TabContext'
-import TabPanel from '@mui/lab/TabPanel'
-
-// Component Imports
-import CustomTabList from '@core/components/mui/TabList'
-
-const AccountSettings = ({ tabContentList }: { tabContentList: { [key: string]: ReactElement } }) => {
- // States
- const [activeTab, setActiveTab] = useState('account')
-
- const handleChange = (event: SyntheticEvent, value: string) => {
- setActiveTab(value)
- }
-
- return (
-
-
-
-
- } iconPosition='start' value='account' />
- } iconPosition='start' value='security' />
- }
- iconPosition='start'
- value='billing-plans'
- />
- }
- iconPosition='start'
- value='notifications'
- />
- } iconPosition='start' value='connections' />
-
-
-
-
- {tabContentList[activeTab]}
-
-
-
-
- )
-}
-
-export default AccountSettings
diff --git a/src/views/pages/account-settings/notifications/index.tsx b/src/views/pages/account-settings/notifications/index.tsx
deleted file mode 100644
index 56b7e31..0000000
--- a/src/views/pages/account-settings/notifications/index.tsx
+++ /dev/null
@@ -1,123 +0,0 @@
-'use client'
-
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardHeader from '@mui/material/CardHeader'
-import CardContent from '@mui/material/CardContent'
-import Typography from '@mui/material/Typography'
-import Checkbox from '@mui/material/Checkbox'
-import MenuItem from '@mui/material/MenuItem'
-import Grid from '@mui/material/Grid2'
-import Button from '@mui/material/Button'
-
-// Component Imports
-import Link from '@components/Link'
-import Form from '@components/Form'
-import CustomTextField from '@core/components/mui/TextField'
-
-// Style Imports
-import tableStyles from '@core/styles/table.module.css'
-
-type TableDataType = {
- type: string
- app: boolean
- email: boolean
- browser: boolean
-}
-
-// Vars
-const tableData: TableDataType[] = [
- {
- app: true,
- email: true,
- browser: true,
- type: 'New for you'
- },
- {
- app: true,
- email: true,
- browser: true,
- type: 'Account activity'
- },
- {
- app: false,
- email: true,
- browser: true,
- type: 'A new browser used to sign in'
- },
- {
- app: false,
- email: true,
- browser: false,
- type: 'A new device is linked'
- }
-]
-
-const Notifications = () => {
- return (
-
-
- We need permission from your browser to show notifications.
- Request Permission
- >
- }
- />
-
-
- )
-}
-
-export default Notifications
diff --git a/src/views/pages/account-settings/security/ApiKeyList.tsx b/src/views/pages/account-settings/security/ApiKeyList.tsx
deleted file mode 100644
index 6c1407e..0000000
--- a/src/views/pages/account-settings/security/ApiKeyList.tsx
+++ /dev/null
@@ -1,70 +0,0 @@
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardHeader from '@mui/material/CardHeader'
-import CardContent from '@mui/material/CardContent'
-import Typography from '@mui/material/Typography'
-import Chip from '@mui/material/Chip'
-import IconButton from '@mui/material/IconButton'
-
-type ApiKeyListType = {
- title: string
- access: string
- date: string
- key: string
-}
-
-// Vars
-const apiKeyList: ApiKeyListType[] = [
- {
- title: 'Server Key 1',
- access: 'Full Access',
- date: '28 Apr 2021, 18:20 GTM+4:10',
- key: '23eaf7f0-f4f7-495e-8b86-fad3261282ac'
- },
- {
- title: 'Server Key 2',
- access: 'Read Only',
- date: '12 Feb 2021, 10:30 GTM+2:30',
- key: 'bb98e571-a2e2-4de8-90a9-2e231b5e99'
- },
- {
- title: 'Server Key 3',
- access: 'Full Access',
- date: '28 Dec 2021, 12:21 GTM+4:10',
- key: '2e915e59-3105-47f2-8838-6e46bf83b711'
- }
-]
-
-const ApiKeyList = () => {
- return (
-
-
-
-
- An API key is a simple encrypted string that identifies an application without any principal. They are useful
- for accessing public data anonymously, and are used to associate API requests with your project for quota and
- billing.
-
- {apiKeyList.map((item, index) => (
-
-
- {item.title}
-
-
-
-
{`Created on ${item.date}`}
-
- ))}
-
-
- )
-}
-
-export default ApiKeyList
diff --git a/src/views/pages/account-settings/security/ChangePasswordCard.tsx b/src/views/pages/account-settings/security/ChangePasswordCard.tsx
deleted file mode 100644
index cd4166c..0000000
--- a/src/views/pages/account-settings/security/ChangePasswordCard.tsx
+++ /dev/null
@@ -1,136 +0,0 @@
-'use client'
-
-// React Imports
-import { useState } from 'react'
-
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardHeader from '@mui/material/CardHeader'
-import CardContent from '@mui/material/CardContent'
-import Grid from '@mui/material/Grid2'
-import InputAdornment from '@mui/material/InputAdornment'
-import IconButton from '@mui/material/IconButton'
-import Typography from '@mui/material/Typography'
-import Button from '@mui/material/Button'
-
-//Component Imports
-import CustomTextField from '@core/components/mui/TextField'
-
-const ChangePasswordCard = () => {
- // States
- const [isCurrentPasswordShown, setIsCurrentPasswordShown] = useState(false)
- const [isConfirmPasswordShown, setIsConfirmPasswordShown] = useState(false)
- const [isNewPasswordShown, setIsNewPasswordShown] = useState(false)
-
- const handleClickShowCurrentPassword = () => {
- setIsCurrentPasswordShown(!isCurrentPasswordShown)
- }
-
- return (
-
-
-
-
-
-
- )
-}
-
-export default ChangePasswordCard
diff --git a/src/views/pages/account-settings/security/CreateApiKey.tsx b/src/views/pages/account-settings/security/CreateApiKey.tsx
deleted file mode 100644
index dea991f..0000000
--- a/src/views/pages/account-settings/security/CreateApiKey.tsx
+++ /dev/null
@@ -1,45 +0,0 @@
-'use client'
-
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardHeader from '@mui/material/CardHeader'
-import CardContent from '@mui/material/CardContent'
-import Grid from '@mui/material/Grid2'
-import Button from '@mui/material/Button'
-import MenuItem from '@mui/material/MenuItem'
-
-// Component Imports
-import CustomTextField from '@core/components/mui/TextField'
-
-const CreateApiKey = () => {
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
- )
-}
-
-export default CreateApiKey
diff --git a/src/views/pages/account-settings/security/RecentDevicesTable.tsx b/src/views/pages/account-settings/security/RecentDevicesTable.tsx
deleted file mode 100644
index ce8abb5..0000000
--- a/src/views/pages/account-settings/security/RecentDevicesTable.tsx
+++ /dev/null
@@ -1,109 +0,0 @@
-// React Imports
-import type { ReactElement } from 'react'
-
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardHeader from '@mui/material/CardHeader'
-import Typography from '@mui/material/Typography'
-
-// Style Imports
-import tableStyles from '@core/styles/table.module.css'
-
-type RecentDeviceDataType = {
- browserIcon: ReactElement
- browserName: string
- device: string
- location: string
- date: string
-}
-
-// Vars
-const recentDeviceData: RecentDeviceDataType[] = [
- {
- location: 'Switzerland',
- device: 'HP Spectre 360',
- date: '10, Sept 20:07',
- browserName: 'Chrome on Windows',
- browserIcon:
- },
- {
- location: 'Los Angeles, CA',
- device: 'Google Pixel 3a',
- date: '20 Apr 2022, 10:20',
- browserName: 'Chrome on Android',
- browserIcon:
- },
- {
- location: 'San Francisco, CA',
- device: 'iPhone 12x',
- date: '16 Apr 2022, 04:20',
- browserName: 'Chrome on iPhone',
- browserIcon:
- },
- {
- location: 'India',
- device: 'Apple iMac',
- date: '28 Apr 2022, 18:20',
- browserName: 'Chrome on MacOS',
- browserIcon:
- },
- {
- location: 'Switzerland',
- device: 'Macbook Pro',
- date: '20 Apr 2022, 10:20',
- browserName: 'Chrome on Windows',
- browserIcon:
- },
- {
- location: 'Dubai',
- device: 'Oneplus 9 Pro',
- date: '16 Apr 2022, 04:20',
- browserName: 'Chrome on Android',
- browserIcon:
- }
-]
-
-const RecentDevicesTable = () => {
- return (
-
-
-
-
-
-
- Browser
- Device
- Location
- Recent Activities
-
-
-
- {recentDeviceData.map((device, index) => (
-
-
-
- {device.browserIcon}
-
- {device.browserName}
-
-
-
-
- {device.device}
-
-
- {device.location}
-
-
- {device.date}
-
-
- ))}
-
-
-
-
- )
-}
-
-export default RecentDevicesTable
diff --git a/src/views/pages/account-settings/security/TwoFactorAuthenticationCard.tsx b/src/views/pages/account-settings/security/TwoFactorAuthenticationCard.tsx
deleted file mode 100644
index e5c77cb..0000000
--- a/src/views/pages/account-settings/security/TwoFactorAuthenticationCard.tsx
+++ /dev/null
@@ -1,45 +0,0 @@
-// MUI Imports
-import Card from '@mui/material/Card'
-import Button from '@mui/material/Button'
-import CardHeader from '@mui/material/CardHeader'
-import CardContent from '@mui/material/CardContent'
-import Typography from '@mui/material/Typography'
-import type { ButtonProps } from '@mui/material/Button'
-
-// Type Imports
-import Link from '@components/Link'
-
-// Component Imports
-import TwoFactorAuth from '@components/dialogs/two-factor-auth'
-import OpenDialogOnElementClick from '@components/dialogs/OpenDialogOnElementClick'
-
-const TwoFactorAuthenticationCard = () => {
- // Vars
- const buttonProps: ButtonProps = {
- variant: 'contained',
- children: 'Enable two-factor authentication'
- }
-
- return (
- <>
-
-
-
-
-
- Two factor authentication is not enabled yet.
-
-
- Two-factor authentication adds an additional layer of security to your account by requiring more than just
- a password to log in.
- Learn more.
-
-
-
-
-
- >
- )
-}
-
-export default TwoFactorAuthenticationCard
diff --git a/src/views/pages/account-settings/security/index.tsx b/src/views/pages/account-settings/security/index.tsx
deleted file mode 100644
index c3de52f..0000000
--- a/src/views/pages/account-settings/security/index.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-// MUI Imports
-import Grid from '@mui/material/Grid2'
-
-// Component Imports
-import ChangePasswordCard from './ChangePasswordCard'
-import TwoFactorAuthenticationCard from './TwoFactorAuthenticationCard'
-import CreateApiKey from './CreateApiKey'
-import ApiKeyList from './ApiKeyList'
-import RecentDevicesTable from './RecentDevicesTable'
-
-const Security = () => {
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- )
-}
-
-export default Security
diff --git a/src/views/pages/faq/FaqFooter.tsx b/src/views/pages/faq/FaqFooter.tsx
deleted file mode 100644
index 599d52c..0000000
--- a/src/views/pages/faq/FaqFooter.tsx
+++ /dev/null
@@ -1,48 +0,0 @@
-// MUI Imports
-import Chip from '@mui/material/Chip'
-import Grid from '@mui/material/Grid2'
-import Typography from '@mui/material/Typography'
-
-// Component Imports
-import CustomAvatar from '@core/components/mui/Avatar'
-
-const FaqFooter = () => {
- return (
- <>
-
-
- You still have a question?
-
- If you cannot find a question in our FAQ, you can always contact us. We will answer you shortly!
-
-
-
-
-
-
-
-
-
-
- + (810) 2548 2568
- We are always happy to help!
-
-
-
-
-
-
-
-
-
- hello@help.com
- Best way to get answer faster!
-
-
-
-
- >
- )
-}
-
-export default FaqFooter
diff --git a/src/views/pages/faq/FaqHeader.tsx b/src/views/pages/faq/FaqHeader.tsx
deleted file mode 100644
index e9ad4b9..0000000
--- a/src/views/pages/faq/FaqHeader.tsx
+++ /dev/null
@@ -1,60 +0,0 @@
-// MUI Imports
-import Card from '@mui/material/Card'
-import Typography from '@mui/material/Typography'
-import CardContent from '@mui/material/CardContent'
-import InputAdornment from '@mui/material/InputAdornment'
-import { styled } from '@mui/material/styles'
-import type { TextFieldProps } from '@mui/material/TextField'
-
-// Third-party Imports
-import classnames from 'classnames'
-
-// Styles imports
-import styles from './styles.module.css'
-import CustomTextField from '@core/components/mui/TextField'
-
-// Styled CustomTextField component
-const CustomTextFieldStyled = styled(CustomTextField)(({ theme }) => ({
- '& .MuiInputBase-root.MuiFilledInput-root': {
- width: '100%',
- backgroundColor: 'var(--mui-palette-background-paper) !important'
- },
- [theme.breakpoints.up('sm')]: {
- width: '55%'
- }
-}))
-
-type Props = {
- searchValue: string
- setSearchValue: (value: string) => void
-}
-
-const FaqHeader = ({ searchValue, setSearchValue }: Props) => {
- return (
-
-
-
- Hello, how can we help?
-
- or choose a category to quickly find the help you need
- setSearchValue(e.target.value)}
- slotProps={{
- input: {
- startAdornment: (
-
-
-
- )
- }
- }}
- />
-
-
- )
-}
-
-export default FaqHeader
diff --git a/src/views/pages/faq/Faqs.tsx b/src/views/pages/faq/Faqs.tsx
deleted file mode 100644
index 7837188..0000000
--- a/src/views/pages/faq/Faqs.tsx
+++ /dev/null
@@ -1,122 +0,0 @@
-// React Imports
-import { useMemo, useState } from 'react'
-import type { SyntheticEvent } from 'react'
-
-// MUI Imports
-import Grid from '@mui/material/Grid2'
-import Tab from '@mui/material/Tab'
-import TabPanel from '@mui/lab/TabPanel'
-import TabContext from '@mui/lab/TabContext'
-import Accordion from '@mui/material/Accordion'
-import Typography from '@mui/material/Typography'
-import AccordionSummary from '@mui/material/AccordionSummary'
-import AccordionDetails from '@mui/material/AccordionDetails'
-
-// Third-party Imports
-import classnames from 'classnames'
-
-// Type Imports
-import type { FaqType } from '@/types/pages/faqTypes'
-
-// Component Imports
-import CustomAvatar from '@core/components/mui/Avatar'
-import CustomTabList from '@core/components/mui/TabList'
-
-type props = {
- faqData?: FaqType[]
- searchValue: string
-}
-
-const FAQ = ({ faqData, searchValue }: props) => {
- // States
- const [activeTab, setActiveTab] = useState('payment')
-
- // Hooks
- const filteredData = useMemo(() => {
- let returnVal = faqData
-
- if (searchValue) {
- returnVal =
- faqData
- ?.filter(category =>
- category.questionsAnswers.some(item => item.question.toLowerCase().includes(searchValue.toLowerCase()))
- )
- .map(category => ({
- ...category,
- questionsAnswers: category.questionsAnswers.filter(item =>
- item.question.toLowerCase().includes(searchValue.toLowerCase())
- )
- })) ?? []
- }
-
- setActiveTab(returnVal?.[0]?.id ?? '')
-
- return returnVal
- }, [faqData, searchValue])
-
- const handleChange = (event: SyntheticEvent, newValue: string) => {
- setActiveTab(newValue)
- }
-
- return filteredData && filteredData.length > 0 ? (
-
-
-
-
- {filteredData?.map((faq, index) => (
- }
- className='flex-row justify-start !min-is-full'
- />
- ))}
-
-
-
-
- {filteredData?.map((faq, index) => (
-
-
-
-
-
-
- {faq.title}
- {faq.subtitle}
-
-
-
- {faq.questionsAnswers.map((items, index) => (
-
- }
- aria-controls='panel1a-content'
- >
- {items.question}
-
-
- {items.answer}
-
-
- ))}
-
-
- ))}
-
-
-
- ) : (
-
-
- No results found
-
- )
-}
-
-export default FAQ
diff --git a/src/views/pages/faq/index.tsx b/src/views/pages/faq/index.tsx
deleted file mode 100644
index c94549d..0000000
--- a/src/views/pages/faq/index.tsx
+++ /dev/null
@@ -1,36 +0,0 @@
-'use client'
-
-// React Imports
-import { useState } from 'react'
-
-// MUI Imports
-import Grid from '@mui/material/Grid2'
-
-// Type Imports
-import type { FaqType } from '@/types/pages/faqTypes'
-
-// Component Imports
-import FaqHeader from '@views/pages/faq/FaqHeader'
-import Faqs from '@views/pages/faq/Faqs'
-import FaqFooter from '@views/pages/faq/FaqFooter'
-
-const FAQ = ({ data }: { data?: FaqType[] }) => {
- // States
- const [searchValue, setSearchValue] = useState('')
-
- return (
-
-
-
-
-
-
-
-
-
-
-
- )
-}
-
-export default FAQ
diff --git a/src/views/pages/faq/styles.module.css b/src/views/pages/faq/styles.module.css
deleted file mode 100644
index 5ac1481..0000000
--- a/src/views/pages/faq/styles.module.css
+++ /dev/null
@@ -1,3 +0,0 @@
-.bgImage {
- background: url('/images/pages/faq-header.png');
-}
diff --git a/src/views/pages/pricing/index.tsx b/src/views/pages/pricing/index.tsx
deleted file mode 100644
index a8c6577..0000000
--- a/src/views/pages/pricing/index.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-'use client'
-
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardContent from '@mui/material/CardContent'
-
-// Type Imports
-import type { PricingPlanType } from '@/types/pages/pricingTypes'
-
-// Component Imports
-import Pricing from '@components/pricing'
-
-const PricingPage = ({ data }: { data?: PricingPlanType[] }) => {
- return (
-
-
-
-
-
- )
-}
-
-export default PricingPage
diff --git a/src/views/pages/user-profile/UserProfileHeader.tsx b/src/views/pages/user-profile/UserProfileHeader.tsx
deleted file mode 100644
index 26d76e0..0000000
--- a/src/views/pages/user-profile/UserProfileHeader.tsx
+++ /dev/null
@@ -1,47 +0,0 @@
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardMedia from '@mui/material/CardMedia'
-import CardContent from '@mui/material/CardContent'
-import Typography from '@mui/material/Typography'
-import Button from '@mui/material/Button'
-
-// Type Imports
-import type { ProfileHeaderType } from '@/types/pages/profileTypes'
-
-const UserProfileHeader = ({ data }: { data?: ProfileHeaderType }) => {
- return (
-
-
-
-
-
-
-
-
-
{data?.fullName}
-
-
- {data?.designationIcon && }
- {data?.designation}
-
-
-
- {data?.location}
-
-
-
- {data?.joiningDate}
-
-
-
-
-
- Connected
-
-
-
-
- )
-}
-
-export default UserProfileHeader
diff --git a/src/views/pages/user-profile/connections/index.tsx b/src/views/pages/user-profile/connections/index.tsx
deleted file mode 100644
index 57e8b0b..0000000
--- a/src/views/pages/user-profile/connections/index.tsx
+++ /dev/null
@@ -1,86 +0,0 @@
-// MUI Imports
-import Grid from '@mui/material/Grid2'
-import Avatar from '@mui/material/Avatar'
-import Chip from '@mui/material/Chip'
-import Card from '@mui/material/Card'
-import CardContent from '@mui/material/CardContent'
-import Typography from '@mui/material/Typography'
-import Button from '@mui/material/Button'
-
-// Type Imports
-import type { ConnectionsTabType } from '@/types/pages/profileTypes'
-
-// Component Imports
-import OptionMenu from '@core/components/option-menu'
-import Link from '@components/Link'
-import CustomIconButton from '@core/components/mui/IconButton'
-
-const Connections = ({ data }: { data?: ConnectionsTabType[] }) => {
- return (
-
- {data &&
- data.map((item, index) => {
- return (
-
-
-
-
-
-
- {item.name}
- {item.designation}
-
-
- {item.chips.map((chip, index) => (
-
-
-
- ))}
-
-
-
- {item.projects}
- Projects
-
-
- {item.tasks}
- Tasks
-
-
- {item.connections}
- Connections
-
-
-
- }
- >
- {item.isConnected ? 'Connected' : 'Connect'}
-
-
-
-
-
-
-
-
- )
- })}
-
- )
-}
-
-export default Connections
diff --git a/src/views/pages/user-profile/index.tsx b/src/views/pages/user-profile/index.tsx
deleted file mode 100644
index 49cf004..0000000
--- a/src/views/pages/user-profile/index.tsx
+++ /dev/null
@@ -1,85 +0,0 @@
-'use client'
-
-// React Imports
-import { useState } from 'react'
-import type { ReactElement, SyntheticEvent } from 'react'
-
-// MUI Imports
-import Grid from '@mui/material/Grid2'
-import Tab from '@mui/material/Tab'
-import TabContext from '@mui/lab/TabContext'
-import TabPanel from '@mui/lab/TabPanel'
-
-// Type Imports
-import type { Data } from '@/types/pages/profileTypes'
-
-// Component Imports
-import UserProfileHeader from './UserProfileHeader'
-import CustomTabList from '@core/components/mui/TabList'
-
-const UserProfile = ({ tabContentList, data }: { tabContentList: { [key: string]: ReactElement }; data?: Data }) => {
- // States
- const [activeTab, setActiveTab] = useState('profile')
-
- const handleChange = (event: SyntheticEvent, value: string) => {
- setActiveTab(value)
- }
-
- return (
-
-
-
-
- {activeTab === undefined ? null : (
-
-
-
-
-
- Profile
-
- }
- value='profile'
- />
-
-
- Teams
-
- }
- value='teams'
- />
-
-
- Projects
-
- }
- value='projects'
- />
-
-
- Connections
-
- }
- value='connections'
- />
-
-
-
- {tabContentList[activeTab]}
-
-
-
- )}
-
- )
-}
-
-export default UserProfile
diff --git a/src/views/pages/user-profile/profile/AboutOverview.tsx b/src/views/pages/user-profile/profile/AboutOverview.tsx
deleted file mode 100644
index 9dd9199..0000000
--- a/src/views/pages/user-profile/profile/AboutOverview.tsx
+++ /dev/null
@@ -1,88 +0,0 @@
-// MUI Imports
-import Grid from '@mui/material/Grid2'
-import Card from '@mui/material/Card'
-import Typography from '@mui/material/Typography'
-import CardContent from '@mui/material/CardContent'
-
-// Type Imports
-import type { ProfileTeamsType, ProfileCommonType, ProfileTabType } from '@/types/pages/profileTypes'
-
-const renderList = (list: ProfileCommonType[]) => {
- return (
- list.length > 0 &&
- list.map((item, index) => {
- return (
-
-
-
-
- {`${item.property.charAt(0).toUpperCase() + item.property.slice(1)}:`}
-
- {item.value.charAt(0).toUpperCase() + item.value.slice(1)}
-
-
- )
- })
- )
-}
-
-const renderTeams = (teams: ProfileTeamsType[]) => {
- return (
- teams.length > 0 &&
- teams.map((item, index) => {
- return (
-
-
- {item.property.charAt(0).toUpperCase() + item.property.slice(1)}
-
- {item.value.charAt(0).toUpperCase() + item.value.slice(1)}
-
- )
- })
- )
-}
-
-const AboutOverview = ({ data }: { data?: ProfileTabType }) => {
- return (
-
-
-
-
-
-
- About
-
- {data?.about && renderList(data?.about)}
-
-
-
- Contacts
-
- {data?.contacts && renderList(data?.contacts)}
-
-
-
- Teams
-
- {data?.teams && renderTeams(data?.teams)}
-
-
-
-
-
-
-
-
-
- Overview
-
- {data?.overview && renderList(data?.overview)}
-
-
-
-
-
- )
-}
-
-export default AboutOverview
diff --git a/src/views/pages/user-profile/profile/ActivityTimeline.tsx b/src/views/pages/user-profile/profile/ActivityTimeline.tsx
deleted file mode 100644
index cbc0b67..0000000
--- a/src/views/pages/user-profile/profile/ActivityTimeline.tsx
+++ /dev/null
@@ -1,106 +0,0 @@
-'use client'
-
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardHeader from '@mui/material/CardHeader'
-import CardContent from '@mui/material/CardContent'
-import Typography from '@mui/material/Typography'
-import TimelineItem from '@mui/lab/TimelineItem'
-import TimelineSeparator from '@mui/lab/TimelineSeparator'
-import TimelineConnector from '@mui/lab/TimelineConnector'
-import TimelineContent from '@mui/lab/TimelineContent'
-import TimelineDot from '@mui/lab/TimelineDot'
-import Avatar from '@mui/material/Avatar'
-import AvatarGroup from '@mui/material/AvatarGroup'
-import { styled } from '@mui/material/styles'
-import MuiTimeline from '@mui/lab/Timeline'
-import type { TimelineProps } from '@mui/lab/Timeline'
-
-//Component Imports
-import CustomAvatar from '@core/components/mui/Avatar'
-
-// Styled Components
-const Timeline = styled(MuiTimeline)({
- '& .MuiTimelineItem-root': {
- '&:before': {
- display: 'none'
- }
- }
-})
-
-const ActivityTimeline = () => {
- return (
-
- }
- titleTypographyProps={{ variant: 'h5' }}
- />
-
-
-
-
-
-
-
-
-
- 12 Invoices have been paid
- 12 min ago
-
- Invoices have been paid to the company.
-
-
-
-
invoice.pdf
-
-
-
-
-
-
-
-
-
-
-
- Client Meeting
- 45 min ago
-
- Project meeting with john @10:15am
-
-
-
-
- Lester McCarthy (Client)
-
- CEO of Pixinvent
-
-
-
-
-
-
-
-
-
-
-
- Create a new project for client
- 2 Day Ago
-
- 6 team members in a project
-
-
-
-
-
-
-
-
-
-
- )
-}
-
-export default ActivityTimeline
diff --git a/src/views/pages/user-profile/profile/ConnectionsTeams.tsx b/src/views/pages/user-profile/profile/ConnectionsTeams.tsx
deleted file mode 100644
index a5c3427..0000000
--- a/src/views/pages/user-profile/profile/ConnectionsTeams.tsx
+++ /dev/null
@@ -1,96 +0,0 @@
-// MUI Imports
-import Card from '@mui/material/Card'
-import CardHeader from '@mui/material/CardHeader'
-import CardContent from '@mui/material/CardContent'
-import CardActions from '@mui/material/CardActions'
-import Typography from '@mui/material/Typography'
-import Grid from '@mui/material/Grid2'
-import Chip from '@mui/material/Chip'
-
-// Type Imports
-import type { ProfileTeamsTechType, ProfileConnectionsType } from '@/types/pages/profileTypes'
-
-// Component Imports
-import OptionMenu from '@core/components/option-menu'
-import CustomAvatar from '@core/components/mui/Avatar'
-import CustomIconButton from '@core/components/mui/IconButton'
-import Link from '@components/Link'
-
-type Props = {
- teamsTech?: ProfileTeamsTechType[]
- connections?: ProfileConnectionsType[]
-}
-
-const ConnectionsTeams = (props: Props) => {
- // props
- const { teamsTech, connections } = props
-
- return (
- <>
-
-
- }
- />
-
- {connections &&
- connections.map((connection, index) => (
-
-
-
-
-
- {connection.name}
-
- {connection.connections} Connections
-
-
-
-
-
-
- ))}
-
-
-
- View all connections
-
-
-
-
-
-
- }
- />
-
- {teamsTech &&
- teamsTech.map((team: ProfileTeamsTechType, index) => (
-
-
-
-
-
- {team.title}
-
- {team.members} Members
-
-
-
-
- ))}
-
-
-
- View all teams
-
-
-
-
- >
- )
-}
-
-export default ConnectionsTeams
diff --git a/src/views/pages/user-profile/profile/ProjectsTables.tsx b/src/views/pages/user-profile/profile/ProjectsTables.tsx
deleted file mode 100644
index 987dbb1..0000000
--- a/src/views/pages/user-profile/profile/ProjectsTables.tsx
+++ /dev/null
@@ -1,289 +0,0 @@
-'use client'
-
-// React Imports
-import { useEffect, useMemo, useState } from 'react'
-
-// MUI Imports
-import AvatarGroup from '@mui/material/AvatarGroup'
-import Card from '@mui/material/Card'
-import CardHeader from '@mui/material/CardHeader'
-import Checkbox from '@mui/material/Checkbox'
-import LinearProgress from '@mui/material/LinearProgress'
-import type { TextFieldProps } from '@mui/material/TextField'
-import Typography from '@mui/material/Typography'
-
-// Third-party Imports
-import type { RankingInfo } from '@tanstack/match-sorter-utils'
-import { rankItem } from '@tanstack/match-sorter-utils'
-import type { ColumnDef, FilterFn } from '@tanstack/react-table'
-import {
- createColumnHelper,
- flexRender,
- getCoreRowModel,
- getFacetedMinMaxValues,
- getFacetedRowModel,
- getFacetedUniqueValues,
- getFilteredRowModel,
- getPaginationRowModel,
- getSortedRowModel,
- useReactTable
-} from '@tanstack/react-table'
-import classnames from 'classnames'
-
-// Type Imports
-import type { ProjectTableRowType } from '@/types/pages/profileTypes'
-
-// Component Imports
-import CustomAvatar from '@core/components/mui/Avatar'
-import CustomTextField from '@core/components/mui/TextField'
-import OptionMenu from '@core/components/option-menu'
-
-// Style Imports
-import tableStyles from '@core/styles/table.module.css'
-
-declare module '@tanstack/table-core' {
- interface FilterFns {
- fuzzy: FilterFn
- }
- interface FilterMeta {
- itemRank: RankingInfo
- }
-}
-
-const fuzzyFilter: FilterFn = (row, columnId, value, addMeta) => {
- // Rank the item
- const itemRank = rankItem(row.getValue(columnId), value)
-
- // Store the itemRank info
- addMeta({
- itemRank
- })
-
- // Return if the item should be filtered in/out
- return itemRank.passed
-}
-
-const DebouncedInput = ({
- value: initialValue,
- onChange,
- debounce = 500,
- ...props
-}: {
- value: string | number
- onChange: (value: string | number) => void
- debounce?: number
-} & Omit) => {
- // States
- const [value, setValue] = useState(initialValue)
-
- useEffect(() => {
- setValue(initialValue)
- }, [initialValue])
-
- useEffect(() => {
- const timeout = setTimeout(() => {
- onChange(value)
- }, debounce)
-
- return () => clearTimeout(timeout)
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [value])
-
- return setValue(e.target.value)} />
-}
-
-// Column Definitions
-const columnHelper = createColumnHelper()
-
-const ProjectTables = ({ projectTable }: { projectTable?: ProjectTableRowType[] }) => {
- // States
- const [rowSelection, setRowSelection] = useState({})
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
- const [data, setData] = useState(...[projectTable])
- const [globalFilter, setGlobalFilter] = useState('')
-
- // Hooks
- const columns = useMemo[]>(
- () => [
- {
- id: 'select',
- header: ({ table }) => (
-
- ),
- cell: ({ row }) => (
-
- )
- },
- columnHelper.accessor('title', {
- header: 'Project',
- cell: ({ row }) => (
-
-
-
-
- {row.original.title}
-
- {row.original.subtitle}
-
-
- )
- }),
- columnHelper.accessor('leader', {
- header: 'Leader',
- cell: ({ row }) => {row.original.leader}
- }),
- columnHelper.accessor('avatarGroup', {
- header: 'Team',
- cell: ({ row }) => (
-
- {row.original.avatarGroup.map((avatar, index) => (
-
- ))}
-
- ),
- enableSorting: false
- }),
- columnHelper.accessor('status', {
- header: 'Progress',
- cell: ({ row }) => (
-
-
- {`${row.original.status}%`}
-
- )
- }),
- columnHelper.accessor('actions', {
- header: 'Actions',
- cell: () => (
-
- ),
- enableSorting: false
- })
- ],
- // eslint-disable-next-line react-hooks/exhaustive-deps
- []
- )
-
- const table = useReactTable({
- data: data as ProjectTableRowType[],
- columns,
- filterFns: {
- fuzzy: fuzzyFilter
- },
- state: {
- rowSelection,
- globalFilter
- },
- initialState: {
- pagination: {
- pageSize: 7
- }
- },
- enableRowSelection: true, //enable row selection for all rows
- // enableRowSelection: row => row.original.age > 18, // or enable row selection conditionally per row
- globalFilterFn: fuzzyFilter,
- onRowSelectionChange: setRowSelection,
- getCoreRowModel: getCoreRowModel(),
- onGlobalFilterChange: setGlobalFilter,
- getFilteredRowModel: getFilteredRowModel(),
- getSortedRowModel: getSortedRowModel(),
- getPaginationRowModel: getPaginationRowModel(),
- getFacetedRowModel: getFacetedRowModel(),
- getFacetedUniqueValues: getFacetedUniqueValues(),
- getFacetedMinMaxValues: getFacetedMinMaxValues()
- })
-
- return (
-
- setGlobalFilter(String(value))}
- placeholder='Search Project'
- />
- }
- />
-
-
-
-
- {table.getHeaderGroups().map(headerGroup => (
-
- {headerGroup.headers.map(header => (
-
- {header.isPlaceholder ? null : (
-
- {flexRender(header.column.columnDef.header, header.getContext())}
- {{
- asc: ,
- desc:
- }[header.column.getIsSorted() as 'asc' | 'desc'] ?? null}
-
- )}
-
- ))}
-
- ))}
-
-
- {table
- .getRowModel()
- .rows.slice(0, table.getState().pagination.pageSize)
- .map(row => {
- return (
-
- {row.getVisibleCells().map(cell => (
- {flexRender(cell.column.columnDef.cell, cell.getContext())}
- ))}
-
- )
- })}
-
-
-
- {/* }
- count={table.getFilteredRowModel().rows.length}
- rowsPerPage={table.getState().pagination.pageSize}
- page={table.getState().pagination.pageIndex}
- onPageChange={(_, page) => {
- table.setPageIndex(page)
- }}
- onRowsPerPageChange={e => table.setPageSize(Number(e.target.value))}
- /> */}
-
- )
-}
-
-export default ProjectTables
diff --git a/src/views/pages/user-profile/profile/index.tsx b/src/views/pages/user-profile/profile/index.tsx
deleted file mode 100644
index d86d2e8..0000000
--- a/src/views/pages/user-profile/profile/index.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-// MUI Imports
-import Grid from '@mui/material/Grid2'
-
-// Type Imports
-import type { ProfileTabType } from '@/types/pages/profileTypes'
-
-// Component Imports
-import AboutOverview from './AboutOverview'
-import ActivityTimeline from './ActivityTimeline'
-import ConnectionsTeams from './ConnectionsTeams'
-import ProjectsTable from './ProjectsTables'
-
-const ProfileTab = ({ data }: { data?: ProfileTabType }) => {
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- )
-}
-
-export default ProfileTab
diff --git a/src/views/pages/user-profile/projects/index.tsx b/src/views/pages/user-profile/projects/index.tsx
deleted file mode 100644
index 9cd5237..0000000
--- a/src/views/pages/user-profile/projects/index.tsx
+++ /dev/null
@@ -1,141 +0,0 @@
-// MUI Imports
-import Grid from '@mui/material/Grid2'
-import Chip from '@mui/material/Chip'
-import Card from '@mui/material/Card'
-import CardContent from '@mui/material/CardContent'
-import Typography from '@mui/material/Typography'
-import Divider from '@mui/material/Divider'
-import LinearProgress from '@mui/material/LinearProgress'
-import AvatarGroup from '@mui/material/AvatarGroup'
-import Tooltip from '@mui/material/Tooltip'
-
-// Type Imports
-import type { ProjectsTabType } from '@/types/pages/profileTypes'
-
-// Component Imports
-import OptionMenu from '@core/components/option-menu'
-import CustomAvatar from '@core/components/mui/Avatar'
-import Link from '@components/Link'
-
-const Projects = ({ data }: { data?: ProjectsTabType[] }) => {
- return (
-
- {data &&
- data.map((item, index) => {
- return (
-
-
-
-
-
-
-
-
- {item.title}
-
-
- Client:
- {item.client}
-
-
-
-
-
-
-
-
-
- {item.budgetSpent}
-
- {`/${item.budget}`}
-
-
Total Budget
-
-
-
-
- Start Date:
-
- {item.startDate}
-
-
-
- Deadline:
-
- {item.deadline}
-
-
-
- {item.description}
-
-
-
-
-
-
- All Hours:
-
- {item.hours}
-
-
-
-
-
- {`Tasks: ${item.completedTask}/${item.totalTask}`}
- {`${Math.round((item.completedTask / item.totalTask) * 100)}% Completed`}
-
-
-
-
-
-
- {item.avatarGroup.map((person, index) => {
- return (
-
-
-
- )
- })}
-
-
- {item.members}
-
-
-
-
- {item.comments}
-
-
-
-
-
- )
- })}
-
- )
-}
-
-export default Projects
diff --git a/src/views/pages/user-profile/teams/index.tsx b/src/views/pages/user-profile/teams/index.tsx
deleted file mode 100644
index bf92197..0000000
--- a/src/views/pages/user-profile/teams/index.tsx
+++ /dev/null
@@ -1,85 +0,0 @@
-// MUI Imports
-import Grid from '@mui/material/Grid2'
-import Card from '@mui/material/Card'
-import CardContent from '@mui/material/CardContent'
-import Avatar from '@mui/material/Avatar'
-import Typography from '@mui/material/Typography'
-import IconButton from '@mui/material/IconButton'
-import AvatarGroup from '@mui/material/AvatarGroup'
-import Tooltip from '@mui/material/Tooltip'
-import Chip from '@mui/material/Chip'
-
-// Type Imports
-import type { TeamsTabType } from '@/types/pages/profileTypes'
-
-// Component Imports
-import OptionMenu from '@core/components/option-menu'
-import Link from '@components/Link'
-
-const Teams = ({ data }: { data?: TeamsTabType[] }) => {
- return (
-
- {data &&
- data.map((item, index) => {
- return (
-
-
-
-
- {item.description}
-
-
- {item.avatarGroup.map((person, index) => {
- return (
-
-
-
- )
- })}
-
-
- {item.chips.map((chip, index) => (
-
-
-
- ))}
-
-
-
-
-
- )
- })}
-
- )
-}
-
-export default Teams
diff --git a/src/views/pages/widget-examples/charts/VehicleOverview.tsx b/src/views/pages/widget-examples/charts/VehicleOverview.tsx
index 1c4289a..28c1381 100644
--- a/src/views/pages/widget-examples/charts/VehicleOverview.tsx
+++ b/src/views/pages/widget-examples/charts/VehicleOverview.tsx
@@ -15,7 +15,6 @@ import OptionMenu from '@core/components/option-menu'
// Style Imports
import tableStyles from '@core/styles/table.module.css'
-import styles from '@views/apps/logistics/dashboard/styles.module.css'
type dataTypes = {
icon: string
@@ -76,9 +75,9 @@ const VehicleOverview = () => {
{data.map((item, index) => (
- {item.heading}
+ {item.heading}