├── LICENSE ├── README.md ├── components ├── calender │ ├── Calendar.css │ └── Calendar.jsx ├── circularBtn │ ├── CircularBtn.css │ └── CircularBtn.jsx ├── glance │ ├── Glance.css │ ├── Glance.jsx │ ├── GlanceFeed.css │ └── GlanceFeed.jsx ├── loading │ ├── Loading.css │ └── Loading.jsx ├── navButton │ ├── NavButton.css │ └── NavButton.jsx ├── navbar │ ├── Navbar.css │ └── Navbar.jsx ├── overlay │ ├── Overlay.css │ └── Overlay.jsx ├── quickAccess │ ├── QuickAccess.css │ ├── QuickAccess.jsx │ ├── QuickAccessCards.css │ └── QuickAccessCards.jsx ├── taskForm │ ├── TaskForm.css │ └── TaskForm.jsx └── taskShow │ ├── TaskFeed.css │ ├── TaskFeed.jsx │ ├── Tasks.css │ └── Tasks.jsx ├── config └── firebase │ └── firebase.js ├── index.html ├── package-lock.json ├── package.json ├── pages ├── home │ ├── Home.css │ └── Home.jsx └── login │ ├── Login.css │ └── Login.jsx ├── src ├── App.css ├── App.jsx ├── assets │ └── react.svg ├── index.css └── main.jsx └── vite.config.js /LICENSE: -------------------------------------------------------------------------------- 1 | GNU AFFERO GENERAL PUBLIC LICENSE 2 | Version 3, 19 November 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU Affero General Public License is a free, copyleft license for 11 | software and other kinds of works, specifically designed to ensure 12 | cooperation with the community in the case of network server software. 13 | 14 | The licenses for most software and other practical works are designed 15 | to take away your freedom to share and change the works. By contrast, 16 | our General Public Licenses are intended to guarantee your freedom to 17 | share and change all versions of a program--to make sure it remains free 18 | software for all its users. 19 | 20 | When we speak of free software, we are referring to freedom, not 21 | price. Our General Public Licenses are designed to make sure that you 22 | have the freedom to distribute copies of free software (and charge for 23 | them if you wish), that you receive source code or can get it if you 24 | want it, that you can change the software or use pieces of it in new 25 | free programs, and that you know you can do these things. 26 | 27 | Developers that use our General Public Licenses protect your rights 28 | with two steps: (1) assert copyright on the software, and (2) offer 29 | you this License which gives you legal permission to copy, distribute 30 | and/or modify the software. 31 | 32 | A secondary benefit of defending all users' freedom is that 33 | improvements made in alternate versions of the program, if they 34 | receive widespread use, become available for other developers to 35 | incorporate. Many developers of free software are heartened and 36 | encouraged by the resulting cooperation. However, in the case of 37 | software used on network servers, this result may fail to come about. 38 | The GNU General Public License permits making a modified version and 39 | letting the public access it on a server without ever releasing its 40 | source code to the public. 41 | 42 | The GNU Affero General Public License is designed specifically to 43 | ensure that, in such cases, the modified source code becomes available 44 | to the community. It requires the operator of a network server to 45 | provide the source code of the modified version running there to the 46 | users of that server. Therefore, public use of a modified version, on 47 | a publicly accessible server, gives the public access to the source 48 | code of the modified version. 49 | 50 | An older license, called the Affero General Public License and 51 | published by Affero, was designed to accomplish similar goals. This is 52 | a different license, not a version of the Affero GPL, but Affero has 53 | released a new version of the Affero GPL which permits relicensing under 54 | this license. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | TERMS AND CONDITIONS 60 | 61 | 0. Definitions. 62 | 63 | "This License" refers to version 3 of the GNU Affero General Public License. 64 | 65 | "Copyright" also means copyright-like laws that apply to other kinds of 66 | works, such as semiconductor masks. 67 | 68 | "The Program" refers to any copyrightable work licensed under this 69 | License. Each licensee is addressed as "you". "Licensees" and 70 | "recipients" may be individuals or organizations. 71 | 72 | To "modify" a work means to copy from or adapt all or part of the work 73 | in a fashion requiring copyright permission, other than the making of an 74 | exact copy. The resulting work is called a "modified version" of the 75 | earlier work or a work "based on" the earlier work. 76 | 77 | A "covered work" means either the unmodified Program or a work based 78 | on the Program. 79 | 80 | To "propagate" a work means to do anything with it that, without 81 | permission, would make you directly or secondarily liable for 82 | infringement under applicable copyright law, except executing it on a 83 | computer or modifying a private copy. Propagation includes copying, 84 | distribution (with or without modification), making available to the 85 | public, and in some countries other activities as well. 86 | 87 | To "convey" a work means any kind of propagation that enables other 88 | parties to make or receive copies. Mere interaction with a user through 89 | a computer network, with no transfer of a copy, is not conveying. 90 | 91 | An interactive user interface displays "Appropriate Legal Notices" 92 | to the extent that it includes a convenient and prominently visible 93 | feature that (1) displays an appropriate copyright notice, and (2) 94 | tells the user that there is no warranty for the work (except to the 95 | extent that warranties are provided), that licensees may convey the 96 | work under this License, and how to view a copy of this License. If 97 | the interface presents a list of user commands or options, such as a 98 | menu, a prominent item in the list meets this criterion. 99 | 100 | 1. Source Code. 101 | 102 | The "source code" for a work means the preferred form of the work 103 | for making modifications to it. "Object code" means any non-source 104 | form of a work. 105 | 106 | A "Standard Interface" means an interface that either is an official 107 | standard defined by a recognized standards body, or, in the case of 108 | interfaces specified for a particular programming language, one that 109 | is widely used among developers working in that language. 110 | 111 | The "System Libraries" of an executable work include anything, other 112 | than the work as a whole, that (a) is included in the normal form of 113 | packaging a Major Component, but which is not part of that Major 114 | Component, and (b) serves only to enable use of the work with that 115 | Major Component, or to implement a Standard Interface for which an 116 | implementation is available to the public in source code form. A 117 | "Major Component", in this context, means a major essential component 118 | (kernel, window system, and so on) of the specific operating system 119 | (if any) on which the executable work runs, or a compiler used to 120 | produce the work, or an object code interpreter used to run it. 121 | 122 | The "Corresponding Source" for a work in object code form means all 123 | the source code needed to generate, install, and (for an executable 124 | work) run the object code and to modify the work, including scripts to 125 | control those activities. However, it does not include the work's 126 | System Libraries, or general-purpose tools or generally available free 127 | programs which are used unmodified in performing those activities but 128 | which are not part of the work. For example, Corresponding Source 129 | includes interface definition files associated with source files for 130 | the work, and the source code for shared libraries and dynamically 131 | linked subprograms that the work is specifically designed to require, 132 | such as by intimate data communication or control flow between those 133 | subprograms and other parts of the work. 134 | 135 | The Corresponding Source need not include anything that users 136 | can regenerate automatically from other parts of the Corresponding 137 | Source. 138 | 139 | The Corresponding Source for a work in source code form is that 140 | same work. 141 | 142 | 2. Basic Permissions. 143 | 144 | All rights granted under this License are granted for the term of 145 | copyright on the Program, and are irrevocable provided the stated 146 | conditions are met. This License explicitly affirms your unlimited 147 | permission to run the unmodified Program. The output from running a 148 | covered work is covered by this License only if the output, given its 149 | content, constitutes a covered work. This License acknowledges your 150 | rights of fair use or other equivalent, as provided by copyright law. 151 | 152 | You may make, run and propagate covered works that you do not 153 | convey, without conditions so long as your license otherwise remains 154 | in force. You may convey covered works to others for the sole purpose 155 | of having them make modifications exclusively for you, or provide you 156 | with facilities for running those works, provided that you comply with 157 | the terms of this License in conveying all material for which you do 158 | not control copyright. Those thus making or running the covered works 159 | for you must do so exclusively on your behalf, under your direction 160 | and control, on terms that prohibit them from making any copies of 161 | your copyrighted material outside their relationship with you. 162 | 163 | Conveying under any other circumstances is permitted solely under 164 | the conditions stated below. Sublicensing is not allowed; section 10 165 | makes it unnecessary. 166 | 167 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 168 | 169 | No covered work shall be deemed part of an effective technological 170 | measure under any applicable law fulfilling obligations under article 171 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 172 | similar laws prohibiting or restricting circumvention of such 173 | measures. 174 | 175 | When you convey a covered work, you waive any legal power to forbid 176 | circumvention of technological measures to the extent such circumvention 177 | is effected by exercising rights under this License with respect to 178 | the covered work, and you disclaim any intention to limit operation or 179 | modification of the work as a means of enforcing, against the work's 180 | users, your or third parties' legal rights to forbid circumvention of 181 | technological measures. 182 | 183 | 4. Conveying Verbatim Copies. 184 | 185 | You may convey verbatim copies of the Program's source code as you 186 | receive it, in any medium, provided that you conspicuously and 187 | appropriately publish on each copy an appropriate copyright notice; 188 | keep intact all notices stating that this License and any 189 | non-permissive terms added in accord with section 7 apply to the code; 190 | keep intact all notices of the absence of any warranty; and give all 191 | recipients a copy of this License along with the Program. 192 | 193 | You may charge any price or no price for each copy that you convey, 194 | and you may offer support or warranty protection for a fee. 195 | 196 | 5. Conveying Modified Source Versions. 197 | 198 | You may convey a work based on the Program, or the modifications to 199 | produce it from the Program, in the form of source code under the 200 | terms of section 4, provided that you also meet all of these conditions: 201 | 202 | a) The work must carry prominent notices stating that you modified 203 | it, and giving a relevant date. 204 | 205 | b) The work must carry prominent notices stating that it is 206 | released under this License and any conditions added under section 207 | 7. This requirement modifies the requirement in section 4 to 208 | "keep intact all notices". 209 | 210 | c) You must license the entire work, as a whole, under this 211 | License to anyone who comes into possession of a copy. This 212 | License will therefore apply, along with any applicable section 7 213 | additional terms, to the whole of the work, and all its parts, 214 | regardless of how they are packaged. This License gives no 215 | permission to license the work in any other way, but it does not 216 | invalidate such permission if you have separately received it. 217 | 218 | d) If the work has interactive user interfaces, each must display 219 | Appropriate Legal Notices; however, if the Program has interactive 220 | interfaces that do not display Appropriate Legal Notices, your 221 | work need not make them do so. 222 | 223 | A compilation of a covered work with other separate and independent 224 | works, which are not by their nature extensions of the covered work, 225 | and which are not combined with it such as to form a larger program, 226 | in or on a volume of a storage or distribution medium, is called an 227 | "aggregate" if the compilation and its resulting copyright are not 228 | used to limit the access or legal rights of the compilation's users 229 | beyond what the individual works permit. Inclusion of a covered work 230 | in an aggregate does not cause this License to apply to the other 231 | parts of the aggregate. 232 | 233 | 6. Conveying Non-Source Forms. 234 | 235 | You may convey a covered work in object code form under the terms 236 | of sections 4 and 5, provided that you also convey the 237 | machine-readable Corresponding Source under the terms of this License, 238 | in one of these ways: 239 | 240 | a) Convey the object code in, or embodied in, a physical product 241 | (including a physical distribution medium), accompanied by the 242 | Corresponding Source fixed on a durable physical medium 243 | customarily used for software interchange. 244 | 245 | b) Convey the object code in, or embodied in, a physical product 246 | (including a physical distribution medium), accompanied by a 247 | written offer, valid for at least three years and valid for as 248 | long as you offer spare parts or customer support for that product 249 | model, to give anyone who possesses the object code either (1) a 250 | copy of the Corresponding Source for all the software in the 251 | product that is covered by this License, on a durable physical 252 | medium customarily used for software interchange, for a price no 253 | more than your reasonable cost of physically performing this 254 | conveying of source, or (2) access to copy the 255 | Corresponding Source from a network server at no charge. 256 | 257 | c) Convey individual copies of the object code with a copy of the 258 | written offer to provide the Corresponding Source. This 259 | alternative is allowed only occasionally and noncommercially, and 260 | only if you received the object code with such an offer, in accord 261 | with subsection 6b. 262 | 263 | d) Convey the object code by offering access from a designated 264 | place (gratis or for a charge), and offer equivalent access to the 265 | Corresponding Source in the same way through the same place at no 266 | further charge. You need not require recipients to copy the 267 | Corresponding Source along with the object code. If the place to 268 | copy the object code is a network server, the Corresponding Source 269 | may be on a different server (operated by you or a third party) 270 | that supports equivalent copying facilities, provided you maintain 271 | clear directions next to the object code saying where to find the 272 | Corresponding Source. Regardless of what server hosts the 273 | Corresponding Source, you remain obligated to ensure that it is 274 | available for as long as needed to satisfy these requirements. 275 | 276 | e) Convey the object code using peer-to-peer transmission, provided 277 | you inform other peers where the object code and Corresponding 278 | Source of the work are being offered to the general public at no 279 | charge under subsection 6d. 280 | 281 | A separable portion of the object code, whose source code is excluded 282 | from the Corresponding Source as a System Library, need not be 283 | included in conveying the object code work. 284 | 285 | A "User Product" is either (1) a "consumer product", which means any 286 | tangible personal property which is normally used for personal, family, 287 | or household purposes, or (2) anything designed or sold for incorporation 288 | into a dwelling. In determining whether a product is a consumer product, 289 | doubtful cases shall be resolved in favor of coverage. For a particular 290 | product received by a particular user, "normally used" refers to a 291 | typical or common use of that class of product, regardless of the status 292 | of the particular user or of the way in which the particular user 293 | actually uses, or expects or is expected to use, the product. A product 294 | is a consumer product regardless of whether the product has substantial 295 | commercial, industrial or non-consumer uses, unless such uses represent 296 | the only significant mode of use of the product. 297 | 298 | "Installation Information" for a User Product means any methods, 299 | procedures, authorization keys, or other information required to install 300 | and execute modified versions of a covered work in that User Product from 301 | a modified version of its Corresponding Source. The information must 302 | suffice to ensure that the continued functioning of the modified object 303 | code is in no case prevented or interfered with solely because 304 | modification has been made. 305 | 306 | If you convey an object code work under this section in, or with, or 307 | specifically for use in, a User Product, and the conveying occurs as 308 | part of a transaction in which the right of possession and use of the 309 | User Product is transferred to the recipient in perpetuity or for a 310 | fixed term (regardless of how the transaction is characterized), the 311 | Corresponding Source conveyed under this section must be accompanied 312 | by the Installation Information. But this requirement does not apply 313 | if neither you nor any third party retains the ability to install 314 | modified object code on the User Product (for example, the work has 315 | been installed in ROM). 316 | 317 | The requirement to provide Installation Information does not include a 318 | requirement to continue to provide support service, warranty, or updates 319 | for a work that has been modified or installed by the recipient, or for 320 | the User Product in which it has been modified or installed. Access to a 321 | network may be denied when the modification itself materially and 322 | adversely affects the operation of the network or violates the rules and 323 | protocols for communication across the network. 324 | 325 | Corresponding Source conveyed, and Installation Information provided, 326 | in accord with this section must be in a format that is publicly 327 | documented (and with an implementation available to the public in 328 | source code form), and must require no special password or key for 329 | unpacking, reading or copying. 330 | 331 | 7. Additional Terms. 332 | 333 | "Additional permissions" are terms that supplement the terms of this 334 | License by making exceptions from one or more of its conditions. 335 | Additional permissions that are applicable to the entire Program shall 336 | be treated as though they were included in this License, to the extent 337 | that they are valid under applicable law. If additional permissions 338 | apply only to part of the Program, that part may be used separately 339 | under those permissions, but the entire Program remains governed by 340 | this License without regard to the additional permissions. 341 | 342 | When you convey a copy of a covered work, you may at your option 343 | remove any additional permissions from that copy, or from any part of 344 | it. (Additional permissions may be written to require their own 345 | removal in certain cases when you modify the work.) You may place 346 | additional permissions on material, added by you to a covered work, 347 | for which you have or can give appropriate copyright permission. 348 | 349 | Notwithstanding any other provision of this License, for material you 350 | add to a covered work, you may (if authorized by the copyright holders of 351 | that material) supplement the terms of this License with terms: 352 | 353 | a) Disclaiming warranty or limiting liability differently from the 354 | terms of sections 15 and 16 of this License; or 355 | 356 | b) Requiring preservation of specified reasonable legal notices or 357 | author attributions in that material or in the Appropriate Legal 358 | Notices displayed by works containing it; or 359 | 360 | c) Prohibiting misrepresentation of the origin of that material, or 361 | requiring that modified versions of such material be marked in 362 | reasonable ways as different from the original version; or 363 | 364 | d) Limiting the use for publicity purposes of names of licensors or 365 | authors of the material; or 366 | 367 | e) Declining to grant rights under trademark law for use of some 368 | trade names, trademarks, or service marks; or 369 | 370 | f) Requiring indemnification of licensors and authors of that 371 | material by anyone who conveys the material (or modified versions of 372 | it) with contractual assumptions of liability to the recipient, for 373 | any liability that these contractual assumptions directly impose on 374 | those licensors and authors. 375 | 376 | All other non-permissive additional terms are considered "further 377 | restrictions" within the meaning of section 10. If the Program as you 378 | received it, or any part of it, contains a notice stating that it is 379 | governed by this License along with a term that is a further 380 | restriction, you may remove that term. If a license document contains 381 | a further restriction but permits relicensing or conveying under this 382 | License, you may add to a covered work material governed by the terms 383 | of that license document, provided that the further restriction does 384 | not survive such relicensing or conveying. 385 | 386 | If you add terms to a covered work in accord with this section, you 387 | must place, in the relevant source files, a statement of the 388 | additional terms that apply to those files, or a notice indicating 389 | where to find the applicable terms. 390 | 391 | Additional terms, permissive or non-permissive, may be stated in the 392 | form of a separately written license, or stated as exceptions; 393 | the above requirements apply either way. 394 | 395 | 8. Termination. 396 | 397 | You may not propagate or modify a covered work except as expressly 398 | provided under this License. Any attempt otherwise to propagate or 399 | modify it is void, and will automatically terminate your rights under 400 | this License (including any patent licenses granted under the third 401 | paragraph of section 11). 402 | 403 | However, if you cease all violation of this License, then your 404 | license from a particular copyright holder is reinstated (a) 405 | provisionally, unless and until the copyright holder explicitly and 406 | finally terminates your license, and (b) permanently, if the copyright 407 | holder fails to notify you of the violation by some reasonable means 408 | prior to 60 days after the cessation. 409 | 410 | Moreover, your license from a particular copyright holder is 411 | reinstated permanently if the copyright holder notifies you of the 412 | violation by some reasonable means, this is the first time you have 413 | received notice of violation of this License (for any work) from that 414 | copyright holder, and you cure the violation prior to 30 days after 415 | your receipt of the notice. 416 | 417 | Termination of your rights under this section does not terminate the 418 | licenses of parties who have received copies or rights from you under 419 | this License. If your rights have been terminated and not permanently 420 | reinstated, you do not qualify to receive new licenses for the same 421 | material under section 10. 422 | 423 | 9. Acceptance Not Required for Having Copies. 424 | 425 | You are not required to accept this License in order to receive or 426 | run a copy of the Program. Ancillary propagation of a covered work 427 | occurring solely as a consequence of using peer-to-peer transmission 428 | to receive a copy likewise does not require acceptance. However, 429 | nothing other than this License grants you permission to propagate or 430 | modify any covered work. These actions infringe copyright if you do 431 | not accept this License. Therefore, by modifying or propagating a 432 | covered work, you indicate your acceptance of this License to do so. 433 | 434 | 10. Automatic Licensing of Downstream Recipients. 435 | 436 | Each time you convey a covered work, the recipient automatically 437 | receives a license from the original licensors, to run, modify and 438 | propagate that work, subject to this License. You are not responsible 439 | for enforcing compliance by third parties with this License. 440 | 441 | An "entity transaction" is a transaction transferring control of an 442 | organization, or substantially all assets of one, or subdividing an 443 | organization, or merging organizations. If propagation of a covered 444 | work results from an entity transaction, each party to that 445 | transaction who receives a copy of the work also receives whatever 446 | licenses to the work the party's predecessor in interest had or could 447 | give under the previous paragraph, plus a right to possession of the 448 | Corresponding Source of the work from the predecessor in interest, if 449 | the predecessor has it or can get it with reasonable efforts. 450 | 451 | You may not impose any further restrictions on the exercise of the 452 | rights granted or affirmed under this License. For example, you may 453 | not impose a license fee, royalty, or other charge for exercise of 454 | rights granted under this License, and you may not initiate litigation 455 | (including a cross-claim or counterclaim in a lawsuit) alleging that 456 | any patent claim is infringed by making, using, selling, offering for 457 | sale, or importing the Program or any portion of it. 458 | 459 | 11. Patents. 460 | 461 | A "contributor" is a copyright holder who authorizes use under this 462 | License of the Program or a work on which the Program is based. The 463 | work thus licensed is called the contributor's "contributor version". 464 | 465 | A contributor's "essential patent claims" are all patent claims 466 | owned or controlled by the contributor, whether already acquired or 467 | hereafter acquired, that would be infringed by some manner, permitted 468 | by this License, of making, using, or selling its contributor version, 469 | but do not include claims that would be infringed only as a 470 | consequence of further modification of the contributor version. For 471 | purposes of this definition, "control" includes the right to grant 472 | patent sublicenses in a manner consistent with the requirements of 473 | this License. 474 | 475 | Each contributor grants you a non-exclusive, worldwide, royalty-free 476 | patent license under the contributor's essential patent claims, to 477 | make, use, sell, offer for sale, import and otherwise run, modify and 478 | propagate the contents of its contributor version. 479 | 480 | In the following three paragraphs, a "patent license" is any express 481 | agreement or commitment, however denominated, not to enforce a patent 482 | (such as an express permission to practice a patent or covenant not to 483 | sue for patent infringement). To "grant" such a patent license to a 484 | party means to make such an agreement or commitment not to enforce a 485 | patent against the party. 486 | 487 | If you convey a covered work, knowingly relying on a patent license, 488 | and the Corresponding Source of the work is not available for anyone 489 | to copy, free of charge and under the terms of this License, through a 490 | publicly available network server or other readily accessible means, 491 | then you must either (1) cause the Corresponding Source to be so 492 | available, or (2) arrange to deprive yourself of the benefit of the 493 | patent license for this particular work, or (3) arrange, in a manner 494 | consistent with the requirements of this License, to extend the patent 495 | license to downstream recipients. "Knowingly relying" means you have 496 | actual knowledge that, but for the patent license, your conveying the 497 | covered work in a country, or your recipient's use of the covered work 498 | in a country, would infringe one or more identifiable patents in that 499 | country that you have reason to believe are valid. 500 | 501 | If, pursuant to or in connection with a single transaction or 502 | arrangement, you convey, or propagate by procuring conveyance of, a 503 | covered work, and grant a patent license to some of the parties 504 | receiving the covered work authorizing them to use, propagate, modify 505 | or convey a specific copy of the covered work, then the patent license 506 | you grant is automatically extended to all recipients of the covered 507 | work and works based on it. 508 | 509 | A patent license is "discriminatory" if it does not include within 510 | the scope of its coverage, prohibits the exercise of, or is 511 | conditioned on the non-exercise of one or more of the rights that are 512 | specifically granted under this License. You may not convey a covered 513 | work if you are a party to an arrangement with a third party that is 514 | in the business of distributing software, under which you make payment 515 | to the third party based on the extent of your activity of conveying 516 | the work, and under which the third party grants, to any of the 517 | parties who would receive the covered work from you, a discriminatory 518 | patent license (a) in connection with copies of the covered work 519 | conveyed by you (or copies made from those copies), or (b) primarily 520 | for and in connection with specific products or compilations that 521 | contain the covered work, unless you entered into that arrangement, 522 | or that patent license was granted, prior to 28 March 2007. 523 | 524 | Nothing in this License shall be construed as excluding or limiting 525 | any implied license or other defenses to infringement that may 526 | otherwise be available to you under applicable patent law. 527 | 528 | 12. No Surrender of Others' Freedom. 529 | 530 | If conditions are imposed on you (whether by court order, agreement or 531 | otherwise) that contradict the conditions of this License, they do not 532 | excuse you from the conditions of this License. If you cannot convey a 533 | covered work so as to satisfy simultaneously your obligations under this 534 | License and any other pertinent obligations, then as a consequence you may 535 | not convey it at all. For example, if you agree to terms that obligate you 536 | to collect a royalty for further conveying from those to whom you convey 537 | the Program, the only way you could satisfy both those terms and this 538 | License would be to refrain entirely from conveying the Program. 539 | 540 | 13. Remote Network Interaction; Use with the GNU General Public License. 541 | 542 | Notwithstanding any other provision of this License, if you modify the 543 | Program, your modified version must prominently offer all users 544 | interacting with it remotely through a computer network (if your version 545 | supports such interaction) an opportunity to receive the Corresponding 546 | Source of your version by providing access to the Corresponding Source 547 | from a network server at no charge, through some standard or customary 548 | means of facilitating copying of software. This Corresponding Source 549 | shall include the Corresponding Source for any work covered by version 3 550 | of the GNU General Public License that is incorporated pursuant to the 551 | following paragraph. 552 | 553 | Notwithstanding any other provision of this License, you have 554 | permission to link or combine any covered work with a work licensed 555 | under version 3 of the GNU General Public License into a single 556 | combined work, and to convey the resulting work. The terms of this 557 | License will continue to apply to the part which is the covered work, 558 | but the work with which it is combined will remain governed by version 559 | 3 of the GNU General Public License. 560 | 561 | 14. Revised Versions of this License. 562 | 563 | The Free Software Foundation may publish revised and/or new versions of 564 | the GNU Affero General Public License from time to time. Such new versions 565 | will be similar in spirit to the present version, but may differ in detail to 566 | address new problems or concerns. 567 | 568 | Each version is given a distinguishing version number. If the 569 | Program specifies that a certain numbered version of the GNU Affero General 570 | Public License "or any later version" applies to it, you have the 571 | option of following the terms and conditions either of that numbered 572 | version or of any later version published by the Free Software 573 | Foundation. If the Program does not specify a version number of the 574 | GNU Affero General Public License, you may choose any version ever published 575 | by the Free Software Foundation. 576 | 577 | If the Program specifies that a proxy can decide which future 578 | versions of the GNU Affero General Public License can be used, that proxy's 579 | public statement of acceptance of a version permanently authorizes you 580 | to choose that version for the Program. 581 | 582 | Later license versions may give you additional or different 583 | permissions. However, no additional obligations are imposed on any 584 | author or copyright holder as a result of your choosing to follow a 585 | later version. 586 | 587 | 15. Disclaimer of Warranty. 588 | 589 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 590 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 591 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 592 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 593 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 594 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 595 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 596 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 597 | 598 | 16. Limitation of Liability. 599 | 600 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 601 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 602 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 603 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 604 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 605 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 606 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 607 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 608 | SUCH DAMAGES. 609 | 610 | 17. Interpretation of Sections 15 and 16. 611 | 612 | If the disclaimer of warranty and limitation of liability provided 613 | above cannot be given local legal effect according to their terms, 614 | reviewing courts shall apply local law that most closely approximates 615 | an absolute waiver of all civil liability in connection with the 616 | Program, unless a warranty or assumption of liability accompanies a 617 | copy of the Program in return for a fee. 618 | 619 | END OF TERMS AND CONDITIONS 620 | 621 | How to Apply These Terms to Your New Programs 622 | 623 | If you develop a new program, and you want it to be of the greatest 624 | possible use to the public, the best way to achieve this is to make it 625 | free software which everyone can redistribute and change under these terms. 626 | 627 | To do so, attach the following notices to the program. It is safest 628 | to attach them to the start of each source file to most effectively 629 | state the exclusion of warranty; and each file should have at least 630 | the "copyright" line and a pointer to where the full notice is found. 631 | 632 | 633 | Copyright (C) 634 | 635 | This program is free software: you can redistribute it and/or modify 636 | it under the terms of the GNU Affero General Public License as published 637 | by the Free Software Foundation, either version 3 of the License, or 638 | (at your option) any later version. 639 | 640 | This program is distributed in the hope that it will be useful, 641 | but WITHOUT ANY WARRANTY; without even the implied warranty of 642 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 643 | GNU Affero General Public License for more details. 644 | 645 | You should have received a copy of the GNU Affero General Public License 646 | along with this program. If not, see . 647 | 648 | Also add information on how to contact you by electronic and paper mail. 649 | 650 | If your software can interact with users remotely through a computer 651 | network, you should also make sure that it provides a way for users to 652 | get its source. For example, if your program is a web application, its 653 | interface could display a "Source" link that leads users to an archive 654 | of the code. There are many ways you could offer source, and different 655 | solutions will be better for different programs; see section 13 for the 656 | specific requirements. 657 | 658 | You should also get your employer (if you work as a programmer) or school, 659 | if any, to sign a "copyright disclaimer" for the program, if necessary. 660 | For more information on this, and how to apply and follow the GNU AGPL, see 661 | . 662 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![Web App Live](https://img.shields.io/website?logo=vercel&style=for-the-badge&url=https%3A%2F%2Ferrand-puce.vercel.app%2F)](https://errand-puce.vercel.app) 4 | [![GNU License](https://img.shields.io/badge/license-GNU-brightgreen?style=for-the-badge&logo=gnu)](https://github.com/SomnathDas/errand/blob/main/LICENSE) 5 | [![Contributers](https://img.shields.io/github/contributors/SomnathDas/errand?style=for-the-badge)](https://github.com/SomnathDas/errand) 6 | 7 | 8 |
9 |
10 | 11 | Logo 12 | 13 | 14 |

Errand

15 | 16 |

17 | A Simple task-app created to remind yourself of a daily objective in your aimless life. On a serious note, it is a project to recall basic concepts of react, react hooks, create-read-update-delete operations in databases, to learn firebase and of implementing a design using html and css. 18 |
19 |
20 | Report Bug 21 | · 22 | Request Feature 23 |

24 |
25 | 26 | 27 |
28 | Table of Contents 29 |
    30 |
  1. 31 | About The Project 32 | 35 |
  2. 36 |
  3. 37 | Getting Started 38 | 42 |
  4. 43 |
  5. Contributing
  6. 44 |
  7. License
  8. 45 |
  9. Contact
  10. 46 |
  11. Acknowledgments
  12. 47 |
48 |
49 | 50 | 51 | 52 | 53 | ## About The Project 54 | 55 | ![Errand Mobile 1](https://i.imgur.com/cVoEho2.png) 56 | ![Errand Desktop 1](https://i.imgur.com/nNly5fW.png) 57 | ![Errand Desktop 2](https://i.imgur.com/9N4ibIm.png) 58 | 59 |

(back to top)

60 | 61 | ### Built With 62 | 63 | * ![React](https://img.shields.io/badge/react-%2320232a.svg?style=for-the-badge&logo=react&logoColor=%2361DAFB) 64 | * ![React Router](https://img.shields.io/badge/React_Router-CA4245?style=for-the-badge&logo=react-router&logoColor=white) 65 | * ![Firebase](https://img.shields.io/badge/Firebase-039BE5?style=for-the-badge&logo=Firebase&logoColor=white) 66 | * ![Vercel](https://img.shields.io/badge/vercel-%23000000.svg?style=for-the-badge&logo=vercel&logoColor=white) 67 | * ![HTML5](https://img.shields.io/badge/html5-%23E34F26.svg?style=for-the-badge&logo=html5&logoColor=white) 68 | * ![CSS3](https://img.shields.io/badge/css3-%231572B6.svg?style=for-the-badge&logo=css3&logoColor=white) 69 | * ![Vite](https://img.shields.io/badge/vite-%23646CFF.svg?style=for-the-badge&logo=vite&logoColor=white) 70 | 71 |

(back to top)

72 | 73 | 74 | 75 | ## Getting Started 76 | 77 | This is an example of how you may give instructions on setting up your project locally. 78 | To get a local copy up and running follow these simple example steps. 79 | 80 | ### Prerequisites 81 | 82 | This is an example of how to list things you need to use the software and how to install them. 83 | * npm 84 | ```sh 85 | npm install npm@latest -g 86 | ``` 87 | 88 | ### Installation 89 | 90 | 1. Set up firebase [https://firebase.google.com/](https://firebase.google.com/) 91 | 2. Clone the repo 92 | ```sh 93 | git clone https://github.com/SomnathDas/errand.git 94 | ``` 95 | 3. Install NPM packages 96 | ```sh 97 | npm install 98 | ``` 99 | 4. Create `.env` file in root dir of the project and enter the following in `.env` file 100 | ```.env 101 | VITE_API_KEY="YOUR API_KEY" 102 | VITE_AUTH_DOMAIN="YOUR AUTH_DOMAIN" 103 | VITE_PROJECT_ID="YOUR PROJECT_ID" 104 | VITE_STORAGE_BUCKET="YOUR STORAGE_BUCKET" 105 | VITE_MESSAGING_SENDER_ID="YOUR MESSAGING_SENDER_ID" 106 | VITE_APP_ID="YOUR APP_ID" 107 | VITE_MEASUREMENT_ID="YOUR MEASUREMENT_ID" 108 | ``` 109 | 5. Run the app by 110 | ```sh 111 | npm run dev 112 | ``` 113 | 114 |

(back to top)

115 | 116 | 117 | ## Contributing 118 | 119 | Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**. 120 | 121 | If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". 122 | Don't forget to give the project a star! Thanks again! 123 | 124 | 1. Fork the Project 125 | 2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`) 126 | 3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`) 127 | 4. Push to the Branch (`git push origin feature/AmazingFeature`) 128 | 5. Open a Pull Request 129 | 130 |

(back to top)

131 | 132 | 133 | ## License 134 | 135 | Distributed under the GNU Affero General Public License v3.0 License. See `LICENSE.txt` for more information. 136 | 137 |

(back to top)

138 | 139 | 140 | 141 | ## Contact 142 | 143 | Somnath Das - [@instagram_handle](https://instagram.com/samurai3247) 144 | 145 | Project Link: [https://github.com/SomnathDas/errand](https://github.com/SomnathDas/errand) 146 | 147 |

(back to top)

148 | 149 | 150 | 151 | ## Acknowledgments 152 | 153 | * [Design Inspired By Filip Legierski(Task Man)](https://dribbble.com/shots/18475404-Taskman) 154 | * [Login Page Side-Image By Joel Filipe](https://unsplash.com/photos/Lw7BruqPnJY) 155 | * [Image Hosting By Imgur](https://imgur.com) 156 | 157 |

(back to top)

158 | -------------------------------------------------------------------------------- /components/calender/Calendar.css: -------------------------------------------------------------------------------- 1 | .calendar-container { 2 | /* Variables */ 3 | --calendar-bg: white; 4 | --active: #1c5d99; 5 | --trans-active: #1c5d992c; 6 | /* Variables */ 7 | 8 | font-family: "Roboto", sans-serif; 9 | background-color: var(--calendar-bg); 10 | padding: 18px; 11 | border-radius: 20px; 12 | } 13 | 14 | .calendar-container.dark { 15 | background-color: var(--global-dark-bg, #080f0f); 16 | color: white; 17 | } 18 | 19 | .calendar-header { 20 | display: flex; 21 | justify-content: space-between; 22 | } 23 | 24 | .calendar-header h1 { 25 | font-weight: 500; 26 | font-size: 1.5rem; 27 | } 28 | 29 | .calendar { 30 | height: 300px; 31 | } 32 | 33 | .calendar-top { 34 | display: flex; 35 | justify-content: space-between; 36 | } 37 | 38 | .prev-next-btn-container { 39 | display: flex; 40 | gap: 20px; 41 | } 42 | 43 | .calendar-month { 44 | font-size: 400; 45 | font-size: 1.2rem; 46 | } 47 | 48 | .calendar-weeks { 49 | list-style: none; 50 | display: grid; 51 | grid-template-columns: repeat(7, 1fr); 52 | column-gap: 10px; 53 | } 54 | 55 | .calendar-days { 56 | list-style: none; 57 | display: grid; 58 | grid-template-columns: repeat(7, 1fr); 59 | } 60 | 61 | .calendar-days-elems { 62 | text-align: center; 63 | border-radius: 9999px; 64 | cursor: pointer; 65 | transition: all 50ms ease-in-out; 66 | } 67 | 68 | .calendar-days-elems:hover { 69 | background-color: var(--active); 70 | color: white; 71 | transition: all 50ms ease-in-out; 72 | } 73 | 74 | .calendar-days-elems.dark:hover { 75 | background-color: #2ec4b554; 76 | color: white; 77 | transition: all 50ms ease-in-out; 78 | } 79 | 80 | .calendar-weeks li { 81 | padding: 10px; 82 | font-weight: 500; 83 | color: #829399; 84 | } 85 | 86 | .calendar-days li { 87 | padding: 10px; 88 | font-weight: 500; 89 | } 90 | 91 | /* Utilities */ 92 | .prev-month-date { 93 | color: #829399; 94 | } 95 | 96 | .isToday { 97 | color: white; 98 | background-color: var(--active, #1c5d99); 99 | } 100 | 101 | .isToday.dark { 102 | color: white; 103 | background-color: var(--global-alt-blue, #2ec4b6); 104 | } 105 | /* Utilities */ 106 | 107 | /* Create Task Button */ 108 | .create-task-btn { 109 | background-color: var(--trans-active, #1c5d992c); 110 | border-radius: 9999px; 111 | border: transparent; 112 | height: 48px; 113 | width: 48px; 114 | display: flex; 115 | justify-content: center; 116 | align-items: center; 117 | cursor: pointer; 118 | transition: all 200ms cubic-bezier(0.165, 0.84, 0.44, 1); 119 | } 120 | 121 | .create-task-btn.dark { 122 | background-color: #2ec4b554; 123 | } 124 | 125 | .create-task-btn-label.dark { 126 | color: var(--global-alt-blue, #2ec4b6); 127 | } 128 | 129 | .create-task-icon.dark { 130 | color: white; 131 | border: dashed white 2px; 132 | } 133 | 134 | .create-task-btn-label { 135 | font-family: "Roboto", sans-serif; 136 | font-weight: 500; 137 | color: var(--active, #1c5d99); 138 | opacity: 0; 139 | transition: opacity 120ms cubic-bezier(0.075, 0.82, 0.165, 1); 140 | } 141 | 142 | .create-task-btn:hover .create-task-btn-label { 143 | opacity: 1; 144 | transition: opacity 120ms cubic-bezier(0.075, 0.82, 0.165, 1); 145 | } 146 | 147 | .create-task-icon { 148 | font-size: 28px; 149 | color: var(--active, #1c5d99); 150 | border: dashed #03427c 2px; 151 | border-radius: 9999px; 152 | } 153 | 154 | .create-task-btn:hover { 155 | width: 100px; 156 | transition: all 200ms cubic-bezier(0.165, 0.84, 0.44, 1); 157 | } 158 | 159 | .create-task-btn:hover .create-task-icon { 160 | display: none; 161 | } 162 | 163 | .create-task-btn:active { 164 | background-color: white; 165 | border: var(--active, #1c5d99); 166 | } 167 | /* Create Task Button */ 168 | 169 | /* Previous and Next Buttons */ 170 | .prev-next-btn { 171 | background-color: var(--trans-active, #1c5d992c); 172 | color: var(--active, #1c5d99); 173 | border-radius: 9999px; 174 | border: solid white; 175 | height: 38px; 176 | width: 38px; 177 | display: flex; 178 | justify-content: center; 179 | align-items: center; 180 | cursor: pointer; 181 | transition: all 200ms cubic-bezier(0.165, 0.84, 0.44, 1); 182 | } 183 | 184 | .prev-next-btn.dark { 185 | color: var(--global-alt-blue, #2ec4b6); 186 | border: solid #080f0f; 187 | background-color: #2ec4b554; 188 | } 189 | 190 | .prev-next-btn:hover { 191 | width: 80px; 192 | transition: all 200ms cubic-bezier(0.165, 0.84, 0.44, 1); 193 | } 194 | 195 | .prev-next-btn:disabled { 196 | background-color: gainsboro; 197 | color: black; 198 | border: solid gray 1px; 199 | } 200 | 201 | .prev-next-btn:active { 202 | background-color: white; 203 | border: var(--active, #1c5d99); 204 | } 205 | /* Previous and Next Buttons */ 206 | 207 | .calendar-days-elems { 208 | display: flex; 209 | flex-direction: column; 210 | justify-content: center; 211 | align-items: center; 212 | } 213 | 214 | .has-tasks { 215 | height: 10px; 216 | width: 10px; 217 | background-color: #1c5d99; 218 | border-radius: 100px; 219 | border: solid 1px white; 220 | } 221 | 222 | .has-tasks.dark { 223 | background-color: var(--global-alt-blue, #2ec4b6); 224 | } 225 | -------------------------------------------------------------------------------- /components/calender/Calendar.jsx: -------------------------------------------------------------------------------- 1 | import { useState, useEffect } from "react"; 2 | import "./Calendar.css"; 3 | 4 | const Calendar = ({ 5 | parentTaskFormOpen, 6 | setParentTaskForm, 7 | setParentNowDate, 8 | parentTasks, 9 | parentTheme, 10 | }) => { 11 | const [currentMonthIndex, setCurrentMonthIndex] = useState(); 12 | const [currentYear, setCurrentYear] = useState(); 13 | const [daysArray, setDaysArray] = useState([]); 14 | 15 | const [allTasks, setAllTasks] = useState(); 16 | 17 | useEffect(() => { 18 | setCurrentMonthYear(); 19 | }, []); 20 | 21 | useEffect(() => { 22 | let daysArrayTemp = []; 23 | let date = new Date(); 24 | 25 | if (currentMonthIndex > 11) { 26 | setCurrentMonthIndex(0); 27 | setCurrentYear(currentYear + 1); 28 | } 29 | 30 | if (currentMonthIndex < 0) { 31 | setCurrentMonthIndex(11); 32 | setCurrentYear(currentYear - 1); 33 | } 34 | 35 | let firstDayofMonth = new Date(currentYear, currentMonthIndex, 1).getDay(); 36 | let lastDateofMonth = new Date( 37 | currentYear, 38 | currentMonthIndex + 1, 39 | 0 40 | ).getDate(); 41 | let lastDayofMonth = new Date( 42 | currentYear, 43 | currentMonthIndex, 44 | lastDateofMonth 45 | ).getDay(); 46 | let lastDateofLastMonth = new Date( 47 | currentYear, 48 | currentMonthIndex, 49 | 0 50 | ).getDate(); 51 | 52 | /* Getting Days from Previous Month */ 53 | for (let i = firstDayofMonth; i > 0; i--) { 54 | let x = new Date( 55 | `${currentYear}-${currentMonthIndex}-${lastDateofLastMonth - i + 1}` 56 | ).toLocaleDateString(); 57 | 58 | daysArrayTemp.push({ 59 | date: lastDateofLastMonth - i + 1, 60 | class: `prev-month-date`, 61 | span: allTasks 62 | ?.map((obj) => 63 | x == obj["completionDate"].toLocaleDateString() ? "has-tasks" : "" 64 | ) 65 | .join(" "), 66 | }); 67 | } 68 | 69 | /* Getting Days from Current Month */ 70 | for (let i = 1; i <= lastDateofMonth; i++) { 71 | let x = new Date( 72 | `${currentYear}-${currentMonthIndex + 1}-${i}` 73 | ).toLocaleDateString(); 74 | 75 | if ( 76 | i === date.getDate() && 77 | currentMonthIndex === date.getMonth() && 78 | currentYear === date.getFullYear() 79 | ) { 80 | daysArrayTemp.push({ 81 | date: i, 82 | class: `isToday`, 83 | span: allTasks 84 | ?.map((obj) => 85 | x == obj["completionDate"].toLocaleDateString() ? "has-tasks" : "" 86 | ) 87 | .join(" "), 88 | }); 89 | } else { 90 | daysArrayTemp.push({ 91 | date: i, 92 | class: ``, 93 | span: allTasks 94 | ?.map((obj) => 95 | x == obj["completionDate"].toLocaleDateString() 96 | ? `has-tasks ${parentTheme} ` 97 | : "" 98 | ) 99 | .join(" "), 100 | }); 101 | } 102 | } 103 | 104 | /* Getting Days from Coming Month */ 105 | for (let i = lastDayofMonth; i < 6; i++) { 106 | let x = new Date( 107 | `${currentYear}-${currentMonthIndex + 2}-${i - lastDayofMonth + 1}` 108 | ).toLocaleDateString(); 109 | 110 | daysArrayTemp.push({ 111 | date: i - lastDayofMonth + 1, 112 | class: "prev-month-date", 113 | span: allTasks 114 | ?.map((obj) => 115 | x == obj["completionDate"].toLocaleDateString() ? "has-tasks" : "" 116 | ) 117 | .join(" "), 118 | }); 119 | } 120 | 121 | setDaysArray(daysArrayTemp); 122 | }, [currentMonthIndex, parentTasks]); 123 | 124 | const monthArray = [ 125 | "January", 126 | "February", 127 | "March", 128 | "April", 129 | "May", 130 | "June", 131 | "July", 132 | "August", 133 | "September", 134 | "October", 135 | "November", 136 | "December", 137 | ]; 138 | 139 | const setCurrentMonthYear = () => { 140 | const date = new Date(); 141 | setCurrentMonthIndex(date.getMonth()); 142 | setCurrentYear(date.getFullYear()); 143 | setParentNowDate({ 144 | date: date.getDate(), 145 | month: monthArray[date.getMonth()], 146 | }); 147 | }; 148 | 149 | const nextMonth = () => { 150 | setCurrentMonthIndex(currentMonthIndex + 1); 151 | }; 152 | 153 | const prevMonth = () => { 154 | setCurrentMonthIndex(currentMonthIndex - 1); 155 | }; 156 | 157 | const openTaskForm = () => { 158 | setParentTaskForm(!parentTaskFormOpen); 159 | }; 160 | 161 | useEffect(() => { 162 | if (parentTasks) { 163 | let tasksObj = parentTasks.map((obj) => ({ 164 | completionDate: new Date(obj["toBeDoneOn"].seconds * 1000), 165 | title: obj["title"], 166 | duration: obj["duration"], 167 | at: new Date(obj["toBeDoneOn"].seconds * 1000).toLocaleTimeString(), 168 | id: obj["id"], 169 | isDone: obj["isDone"], 170 | })); 171 | 172 | setAllTasks(tasksObj); 173 | 174 | if (allTasks) { 175 | let x = daysArray.map((day, index) => [ 176 | new Date( 177 | `${currentYear}-${currentMonthIndex}-${day.date}` 178 | ).toLocaleDateString(), 179 | index, 180 | currentMonthIndex, 181 | currentYear, 182 | day.date, 183 | ]); 184 | 185 | let y = allTasks.map((obj) => 186 | obj["completionDate"].toLocaleDateString() 187 | ); 188 | } 189 | 190 | /* `${currentYear}-0${currentMonthIndex}-${daysArray[11].date}` */ 191 | } 192 | }, [parentTasks, currentMonthIndex, currentYear, daysArray]); 193 | 194 | return ( 195 |
196 |
197 |

Calendar

198 | 209 |
210 |
211 |
212 |

213 | {monthArray[currentMonthIndex]} {currentYear} 214 |

215 |
216 | 222 | 223 | 229 |
230 |
231 | 232 |
    233 |
  • S
  • 234 |
  • M
  • 235 |
  • T
  • 236 |
  • W
  • 237 |
  • T
  • 238 |
  • F
  • 239 |
  • S
  • 240 |
241 |
    242 | {daysArray.map((value, index) => ( 243 |
  • 247 | {value.date} 248 | 249 |
  • 250 | ))} 251 |
252 |
253 |
254 | ); 255 | }; 256 | 257 | export default Calendar; 258 | -------------------------------------------------------------------------------- /components/circularBtn/CircularBtn.css: -------------------------------------------------------------------------------- 1 | .circular-btn { 2 | background-color: #1c5d99; 3 | border-radius: 100px; 4 | border: solid transparent; 5 | height: 48px; 6 | width: 48px; 7 | display: flex; 8 | justify-content: center; 9 | align-items: center; 10 | cursor: pointer; 11 | transition: all 100ms cubic-bezier(0.165, 0.84, 0.44, 1); 12 | } 13 | 14 | .circular-btn.dark { 15 | background-color: white; 16 | } 17 | 18 | .circular-btn-label.dark { 19 | color: black; 20 | } 21 | 22 | .circular-btn-icon.dark { 23 | color: black; 24 | } 25 | 26 | .circular-btn-label { 27 | position: fixed; 28 | font-family: "Roboto", sans-serif; 29 | font-weight: 500; 30 | color: white; 31 | opacity: 0; 32 | transition: opacity 120ms cubic-bezier(0.075, 0.82, 0.165, 1); 33 | } 34 | 35 | .circular-btn:hover .circular-btn-label { 36 | opacity: 1; 37 | transition: opacity 120ms cubic-bezier(0.075, 0.82, 0.165, 1); 38 | } 39 | 40 | .circular-btn-icon { 41 | font-size: 28px; 42 | color: white; 43 | border-radius: 9999px; 44 | transition: all 50ms linear; 45 | } 46 | 47 | .circular-btn:hover { 48 | width: 120px; 49 | transition: all 100ms cubic-bezier(0.165, 0.84, 0.44, 1); 50 | } 51 | 52 | .circular-btn:hover .circular-btn-icon { 53 | opacity: 0; 54 | transition: all 50ms linear; 55 | } 56 | 57 | .circular-btn:active { 58 | background-color: white; 59 | border: var(--active, #1c5d99) 1px dashed; 60 | } 61 | 62 | .circular-btn:active .circular-btn-label { 63 | color: black; 64 | } 65 | -------------------------------------------------------------------------------- /components/circularBtn/CircularBtn.jsx: -------------------------------------------------------------------------------- 1 | import "./CircularBtn.css"; 2 | 3 | const CircularBtn = ({ 4 | btnType, 5 | btnLabel, 6 | btnIconName, 7 | onClickFunc, 8 | parentTheme, 9 | }) => { 10 | return ( 11 | 21 | ); 22 | }; 23 | 24 | export default CircularBtn; 25 | -------------------------------------------------------------------------------- /components/glance/Glance.css: -------------------------------------------------------------------------------- 1 | .glance-container { 2 | height: 100%; 3 | overflow-y: scroll; 4 | padding: 20px; 5 | 6 | -webkit-box-shadow: inset 14px 40px 32px -47px rgba(0, 174, 255, 1); 7 | -moz-box-shadow: inset 14px 40px 32px -47px rgba(0, 174, 255, 1); 8 | box-shadow: inset 14px 40px 32px -47px rgba(0, 174, 255, 1); 9 | 10 | display: flex; 11 | flex-direction: column; 12 | gap: 20px; 13 | 14 | font-family: "Roboto", sans-serif; 15 | } 16 | 17 | .glance-container.dark { 18 | -webkit-box-shadow: inset 14px 40px 32px -47px rgb(0, 255, 200); 19 | -moz-box-shadow: inset 14px 40px 32px -47px rgba(0, 255, 200, 1); 20 | box-shadow: inset 14px 40px 32px -47px rgba(0, 255, 200, 1); 21 | 22 | color: white; 23 | } 24 | 25 | .glance-current-date { 26 | font-size: large; 27 | font-weight: lighter; 28 | } 29 | -------------------------------------------------------------------------------- /components/glance/Glance.jsx: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from "react"; 2 | import "./Glance.css"; 3 | import GlanceFeed from "./GlanceFeed"; 4 | 5 | const Glance = ({ nowDate, parentNowTasks, parentTheme }) => { 6 | const [nowTasks, setNowTasks] = useState([]); 7 | 8 | useEffect(() => { 9 | if (parentNowTasks) { 10 | let taskObj = parentNowTasks.map((obj) => ({ 11 | completionDate: new Date(obj["toBeDoneOn"].seconds * 1000), 12 | title: obj["title"], 13 | duration: obj["duration"], 14 | at: new Date(obj["toBeDoneOn"].seconds * 1000).toLocaleTimeString(), 15 | id: obj["id"], 16 | isDone: obj["isDone"], 17 | })); 18 | 19 | setNowTasks( 20 | taskObj.filter( 21 | (obj) => obj["completionDate"].getDate() === nowDate.date 22 | ) 23 | ); 24 | } 25 | }, [parentNowTasks]); 26 | return ( 27 |
28 |

29 | 30 | {nowDate.date} 31 | {`\n`} 32 | {nowDate.month} 33 | {" "} 34 | {`\n`}({nowTasks.length} Events) 35 |

36 | {nowTasks.map((data) => ( 37 | 38 | )) ||

Loading

} 39 |
40 | ); 41 | }; 42 | 43 | export default Glance; 44 | -------------------------------------------------------------------------------- /components/glance/GlanceFeed.css: -------------------------------------------------------------------------------- 1 | .glance-head { 2 | display: flex; 3 | gap: 10px; 4 | } 5 | 6 | .glance-body { 7 | background-color: #f7f6f9; 8 | padding: 1rem; 9 | border-radius: 50px; 10 | word-wrap: break-word; 11 | } 12 | 13 | .glance-body.dark { 14 | color: black; 15 | background-color: #2ec4b6; 16 | } 17 | 18 | .glance-head.dark { 19 | color: black; 20 | } 21 | -------------------------------------------------------------------------------- /components/glance/GlanceFeed.jsx: -------------------------------------------------------------------------------- 1 | import "./GlanceFeed.css"; 2 | 3 | const GlanceFeed = ({ taskData, parentTheme }) => { 4 | return ( 5 |
6 |
7 | 8 | {taskData.isDone ? "check_circle" : "check_circle_outline"} 9 | 10 |

{taskData.at}

11 |
12 |
13 |

{taskData.title}

14 |

{taskData.duration} mins

15 |
16 |
17 | ); 18 | }; 19 | 20 | export default GlanceFeed; 21 | -------------------------------------------------------------------------------- /components/loading/Loading.css: -------------------------------------------------------------------------------- 1 | .loading { 2 | height: 100vh; 3 | background-color: #080f0f; 4 | display: flex; 5 | justify-content: center; 6 | align-items: center; 7 | } 8 | 9 | .cube { 10 | height: 60px; 11 | animation: 2s lightIn cubic-bezier(0.1, 0.7, 0.8, 0.1) infinite alternate; 12 | } 13 | 14 | @keyframes lightIn { 15 | 0% { 16 | fill: #001219; 17 | } 18 | 50% { 19 | fill: #17bebb; 20 | } 21 | 100% { 22 | fill: #001219; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /components/loading/Loading.jsx: -------------------------------------------------------------------------------- 1 | import "./Loading.css"; 2 | 3 | const Loading = () => { 4 | return ( 5 |
6 | 13 | 14 | 15 |
16 | ); 17 | }; 18 | 19 | export default Loading; 20 | -------------------------------------------------------------------------------- /components/navButton/NavButton.css: -------------------------------------------------------------------------------- 1 | .button { 2 | background-color: var(--trans-active, #1c5d992c); 3 | border-radius: 9999px; 4 | border: solid transparent; 5 | height: 48px; 6 | width: 48px; 7 | display: flex; 8 | justify-content: center; 9 | align-items: center; 10 | cursor: pointer; 11 | transition: all 200ms cubic-bezier(0.165, 0.84, 0.44, 1); 12 | } 13 | 14 | .button.dark { 15 | background-color: #2ec4b554; 16 | } 17 | 18 | .button-label.dark { 19 | color: var(--global-alt-blue, #2ec4b6); 20 | } 21 | 22 | .button-icon.dark { 23 | color: var(--global-alt-blue, #2ec4b6); 24 | } 25 | 26 | .button-label { 27 | position: fixed; 28 | font-family: "Roboto", sans-serif; 29 | font-weight: 500; 30 | color: var(--active, #1c5d99); 31 | opacity: 0; 32 | transition: opacity 200ms cubic-bezier(0.075, 0.82, 0.165, 1); 33 | transform: rotate(270deg); 34 | } 35 | 36 | .button:hover .button-label { 37 | opacity: 1; 38 | transition: opacity 200ms cubic-bezier(0.075, 0.82, 0.165, 1); 39 | } 40 | 41 | .button-icon { 42 | font-size: 28px; 43 | color: var(--active, #1c5d99); 44 | border-radius: 9999px; 45 | transition: all 100ms linear; 46 | } 47 | 48 | @media screen and (min-width: 1000px) { 49 | .button:hover { 50 | height: 100px; 51 | transition: all 200ms cubic-bezier(0.165, 0.84, 0.44, 1); 52 | } 53 | } 54 | 55 | .button:hover .button-icon { 56 | opacity: 0; 57 | transition: all 100ms linear; 58 | } 59 | 60 | .button:active { 61 | background-color: white; 62 | border: var(--active, #1c5d99); 63 | } 64 | -------------------------------------------------------------------------------- /components/navButton/NavButton.jsx: -------------------------------------------------------------------------------- 1 | import "./NavButton.css"; 2 | 3 | const NavButton = ({ label, iconName, onClickHandler, parentTheme }) => { 4 | return ( 5 | 11 | ); 12 | }; 13 | 14 | export default NavButton; 15 | -------------------------------------------------------------------------------- /components/navbar/Navbar.css: -------------------------------------------------------------------------------- 1 | .navbar-container { 2 | position: fixed; 3 | } 4 | 5 | .navbar-list { 6 | display: flex; 7 | gap: 1rem; 8 | flex-direction: column; 9 | list-style: none; 10 | } 11 | 12 | .nav-user-profile-pic { 13 | border-radius: 100px; 14 | height: 48px; 15 | width: 48px; 16 | } 17 | 18 | @media screen and (max-width: 1000px) { 19 | .navbar-list { 20 | flex-direction: row; 21 | } 22 | 23 | .navbar-container { 24 | background-color: rgba(255, 255, 255, 0.726); 25 | width: 100%; 26 | display: flex; 27 | justify-content: center; 28 | padding: 12px; 29 | } 30 | 31 | .navbar-container.dark { 32 | background-color: #080f0f3d; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /components/navbar/Navbar.jsx: -------------------------------------------------------------------------------- 1 | import { signOut } from "firebase/auth"; 2 | import NavButton from "../navButton/NavButton"; 3 | import "./Navbar.css"; 4 | 5 | /* Firebase */ 6 | import { auth } from "../../config/firebase/firebase"; 7 | import { useAuthState } from "react-firebase-hooks/auth"; 8 | import { db } from "../../config/firebase/firebase"; 9 | import { doc, setDoc } from "firebase/firestore"; 10 | 11 | const Navbar = ({ 12 | parentIsLoggingOut, 13 | parentSetIsLoggingOut, 14 | parentTheme, 15 | parentChangeTheme, 16 | }) => { 17 | const [user, loading, error] = useAuthState(auth); 18 | const logout = async () => { 19 | parentSetIsLoggingOut(1); 20 | try { 21 | await signOut(auth); 22 | parentSetIsLoggingOut(0); 23 | } catch (err) { 24 | console.log(err); 25 | } 26 | }; 27 | 28 | const changeTheme = async () => { 29 | switch (parentTheme) { 30 | case "light": 31 | parentChangeTheme("dark"); 32 | break; 33 | case "dark": 34 | parentChangeTheme("light"); 35 | break; 36 | default: 37 | parentChangeTheme("dark"); 38 | break; 39 | } 40 | 41 | await setDoc(doc(db, "users", user.uid), { 42 | id: user.uid, 43 | theme: parentTheme === "dark" ? "light" : "dark", 44 | }); 45 | }; 46 | 47 | return ( 48 | 75 | ); 76 | }; 77 | 78 | export default Navbar; 79 | -------------------------------------------------------------------------------- /components/overlay/Overlay.css: -------------------------------------------------------------------------------- 1 | .overlay-background { 2 | position: fixed; 3 | height: 100vh; 4 | width: 100vw; 5 | background-color: rgba(0, 0, 0, 0.329); 6 | backdrop-filter: blur(6px); 7 | -webkit-backdrop-filter: blur(6px); 8 | z-index: 99; 9 | } 10 | 11 | .overlay-container { 12 | height: 100%; 13 | display: flex; 14 | justify-content: center; 15 | align-items: center; 16 | } 17 | -------------------------------------------------------------------------------- /components/overlay/Overlay.jsx: -------------------------------------------------------------------------------- 1 | import "./Overlay.css"; 2 | 3 | const Overlay = ({ isOpen, children }) => { 4 | return ( 5 | <> 6 | {isOpen ? ( 7 |
8 |
{children}
9 |
10 | ) : ( 11 | "" 12 | )} 13 | 14 | ); 15 | }; 16 | 17 | export default Overlay; 18 | -------------------------------------------------------------------------------- /components/quickAccess/QuickAccess.css: -------------------------------------------------------------------------------- 1 | .quick-access-container { 2 | padding: 24px; 3 | display: flex; 4 | flex-direction: column; 5 | gap: 20px; 6 | } 7 | 8 | .quick-access-head { 9 | font-family: "Roboto", sans-serif; 10 | } 11 | 12 | .quick-access-head h1 { 13 | font-size: 2rem; 14 | font-weight: 300; 15 | /* text-decoration: underline wavy var(--global-blue, #1c5d99) 2px; */ 16 | } 17 | 18 | .quick-access-cards { 19 | display: grid; 20 | grid-template-columns: repeat(3, auto); 21 | gap: 1rem; 22 | } 23 | 24 | @media screen and (max-width: 500px) { 25 | .quick-access-cards { 26 | display: grid; 27 | justify-content: center; 28 | grid-template-areas: 29 | "A A" 30 | "B C"; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /components/quickAccess/QuickAccess.jsx: -------------------------------------------------------------------------------- 1 | import "./QuickAccess.css"; 2 | import QuickAccessCards from "./QuickAccessCards"; 3 | 4 | /* Firebase */ 5 | import { useCollectionData } from "react-firebase-hooks/firestore"; 6 | import { auth, db } from "../../config/firebase/firebase"; 7 | import { collection, query, where } from "firebase/firestore"; 8 | import { useEffect, useState } from "react"; 9 | import { useAuthState } from "react-firebase-hooks/auth"; 10 | 11 | const QuickAccess = ({ parentFilter, parentSetFilter }) => { 12 | const [user, isUserLoading, isUserError] = useAuthState(auth); 13 | 14 | const [meetingAmt, setMeetingAmt] = useState(0); 15 | const [groceryAmt, setGroceryAmt] = useState(0); 16 | const [assignmentAmt, setAssignmentAmt] = useState(0); 17 | 18 | const [qForMeeting, setQForMeeting] = useState(); 19 | const [qForGrocery, setQForGrocery] = useState(); 20 | const [qForAssignment, setQForAssignment] = useState(); 21 | 22 | /* Firebase Database */ 23 | useEffect(() => { 24 | const tasksRef = collection(db, "users", user.uid, "tasks"); 25 | 26 | const qForMeeting = query(tasksRef, where("tag", "==", "meeting")); 27 | const qForGrocery = query(tasksRef, where("tag", "==", "grocery")); 28 | const qForAssignment = query(tasksRef, where("tag", "==", "assignment")); 29 | 30 | setQForMeeting(qForMeeting); 31 | setQForGrocery(qForGrocery); 32 | setQForAssignment(qForAssignment); 33 | }, [user]); 34 | 35 | const [tasksM, isTaskLoadingM, isTaskErrorM, snapshotM] = 36 | useCollectionData(qForMeeting); 37 | 38 | const [tasksG, isTaskLoadingG, isTaskErrorG, snapshotG] = 39 | useCollectionData(qForGrocery); 40 | 41 | const [tasksA, isTaskLoadingA, isTaskErrorA, snapshotA] = 42 | useCollectionData(qForAssignment); 43 | 44 | useEffect(() => { 45 | setMeetingAmt( 46 | snapshotM?.docs.map((doc) => ({ id: doc.id, ...doc.data() })).length 47 | ); 48 | setGroceryAmt( 49 | snapshotG?.docs.map((doc) => ({ id: doc.id, ...doc.data() })).length 50 | ); 51 | setAssignmentAmt( 52 | snapshotA?.docs.map((doc) => ({ id: doc.id, ...doc.data() })).length 53 | ); 54 | }, [snapshotM, snapshotG, snapshotA]); 55 | 56 | return ( 57 |
58 |
59 |

Quick Access

60 |
61 |
62 | parentSetFilter(parentFilter === 1 ? 0 : 1)} 71 | /> 72 | parentSetFilter(parentFilter === 2 ? 0 : 2)} 81 | /> 82 | parentSetFilter(parentFilter === 3 ? 0 : 3)} 91 | /> 92 |
93 |
94 | ); 95 | }; 96 | 97 | export default QuickAccess; 98 | -------------------------------------------------------------------------------- /components/quickAccess/QuickAccessCards.css: -------------------------------------------------------------------------------- 1 | .card-container { 2 | height: 148px; 3 | border-radius: 20px; 4 | padding: 20px; 5 | display: flex; 6 | flex-direction: column; 7 | justify-content: space-between; 8 | } 9 | 10 | .active { 11 | color: black !important; 12 | background-color: white !important; 13 | } 14 | 15 | .active .card-icon { 16 | color: black !important; 17 | } 18 | 19 | .active .card-content { 20 | color: black !important; 21 | } 22 | 23 | .active .card-option-icon { 24 | color: black !important; 25 | } 26 | 27 | .card-container:hover { 28 | background-color: white !important; 29 | cursor: pointer; 30 | } 31 | 32 | .card-container:hover .card-icon { 33 | color: black; 34 | } 35 | 36 | .card-container:hover .card-content { 37 | color: black; 38 | } 39 | 40 | .card-container:hover .card-option-icon { 41 | color: black; 42 | } 43 | 44 | .card-content { 45 | color: white; 46 | } 47 | 48 | .card-head { 49 | display: flex; 50 | justify-content: space-between; 51 | } 52 | 53 | .card-icon { 54 | color: white; 55 | } 56 | 57 | .card-option-icon { 58 | color: rgba(255, 255, 255, 0.548); 59 | } 60 | 61 | .card-content h1 { 62 | font-family: "Roboto", sans-serif; 63 | font-weight: 500; 64 | font-size: 1.5rem; 65 | } 66 | 67 | .card-content h2 { 68 | font-family: "Roboto", sans-serif; 69 | font-weight: 300; 70 | font-size: 1rem; 71 | } 72 | 73 | @media screen and (min-width: 500px) { 74 | .card-container { 75 | grid-area: unset !important; 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /components/quickAccess/QuickAccessCards.jsx: -------------------------------------------------------------------------------- 1 | import "./QuickAccessCards.css"; 2 | 3 | const QuickAccessCards = ({ 4 | id, 5 | iconName, 6 | cardColor, 7 | taskAmt, 8 | taskCategory, 9 | gridArea, 10 | parentFilter, 11 | onClickHandler, 12 | }) => { 13 | return ( 14 |
23 |
24 | {iconName} 25 | 26 | more_horiz 27 | 28 |
29 |
30 |

{taskAmt}

31 |

{taskCategory}

32 |
33 |
34 | ); 35 | }; 36 | 37 | export default QuickAccessCards; 38 | -------------------------------------------------------------------------------- /components/taskForm/TaskForm.css: -------------------------------------------------------------------------------- 1 | .container { 2 | display: flex; 3 | flex-direction: column; 4 | justify-content: center; 5 | align-items: center; 6 | height: 100%; 7 | width: 100%; 8 | } 9 | 10 | .task-form-container { 11 | display: grid; 12 | gap: 20px; 13 | width: 50%; 14 | font-family: "Roboto", sans-serif; 15 | } 16 | 17 | .task-form-container button { 18 | justify-self: center; 19 | } 20 | 21 | .task-form-container input, 22 | .task-form-container select { 23 | background-color: white; 24 | font-family: "Roboto", sans-serif; 25 | font-weight: bold; 26 | padding: 10px; 27 | border-radius: 18px; 28 | border: none; 29 | outline: none; 30 | } 31 | 32 | .task-form-container input:focus, 33 | .task-form-container select:focus { 34 | outline: lightcoral solid 1px; 35 | } 36 | 37 | .task-form-container label { 38 | font-size: 1rem; 39 | font-weight: bold; 40 | color: white; 41 | } 42 | -------------------------------------------------------------------------------- /components/taskForm/TaskForm.jsx: -------------------------------------------------------------------------------- 1 | import CircularBtn from "../circularBtn/CircularBtn"; 2 | import "./TaskForm.css"; 3 | import { useState, useEffect } from "react"; 4 | 5 | /* Firebase */ 6 | import { auth, db } from "../../config/firebase/firebase"; 7 | import { 8 | doc, 9 | addDoc, 10 | collection, 11 | Timestamp, 12 | serverTimestamp, 13 | } from "firebase/firestore"; 14 | 15 | const TaskForm = ({ isOpen, setIsOpen, parentTheme }) => { 16 | const [title, setTitle] = useState(""); 17 | const [duration, setDuration] = useState(); 18 | const [toBeDoneOn, setToBeDoneOn] = useState( 19 | new Date().toISOString().substring(0, 16) 20 | ); 21 | const [tag, setTag] = useState("assignment"); 22 | const [priority, setPriority] = useState(1); 23 | 24 | const createTask = async () => { 25 | if (title.trim().length < 2 || toBeDoneOn === null || priority === null) { 26 | return 0; 27 | } 28 | 29 | let date = new Date(toBeDoneOn); 30 | 31 | await addDoc(collection(db, "users", auth.currentUser.uid, "tasks"), { 32 | title: title, 33 | duration: parseInt(duration), 34 | toBeDoneOn: Timestamp.fromDate(date), 35 | tag: tag, 36 | priority: priority, 37 | isDone: 0, 38 | createdAt: serverTimestamp(), 39 | }); 40 | 41 | setTitle(""); 42 | setDuration(0); 43 | setToBeDoneOn("2023-06-"); 44 | 45 | setIsOpen(false); 46 | }; 47 | 48 | return ( 49 |
50 |
51 | setIsOpen(!isOpen)} 56 | parentTheme={parentTheme} 57 | /> 58 |
59 | 60 |
e.preventDefault()} 63 | > 64 | 65 | setTitle(e.target.value)} 72 | maxLength={128} 73 | required 74 | /> 75 | 76 | setToBeDoneOn(e.target.value)} 82 | required 83 | /> 84 | 85 | 86 | setDuration(e.target.value)} 93 | required 94 | /> 95 | 96 | 107 | 108 | 119 | createTask()} 124 | parentTheme={parentTheme} 125 | /> 126 | 127 |
128 | ); 129 | }; 130 | 131 | export default TaskForm; 132 | -------------------------------------------------------------------------------- /components/taskShow/TaskFeed.css: -------------------------------------------------------------------------------- 1 | .task-feed-container { 2 | display: flex; 3 | justify-content: space-between; 4 | background-color: white; 5 | border-radius: 20px; 6 | padding: 1.2rem; 7 | /*border: dashed 1.2px #1c5d99;*/ 8 | border: solid 1.2px transparent; 9 | gap: 10px; 10 | } 11 | 12 | .task-feed-container.dark { 13 | background-color: var(--global-alt-blue, #2ec4b6); 14 | } 15 | 16 | .task-feed-container:hover { 17 | border: solid 1.2px #1c5d99; 18 | cursor: pointer; 19 | } 20 | 21 | .task-head { 22 | display: flex; 23 | gap: 10px; 24 | justify-content: center; 25 | align-items: center; 26 | } 27 | 28 | .task-head h2 { 29 | font-family: "Poppins", sans-serif; 30 | font-weight: 500; 31 | font-size: 1.2rem; 32 | word-wrap: break-word; 33 | } 34 | 35 | #is-done { 36 | cursor: pointer; 37 | } 38 | 39 | #is-done:checked ~ #task-title { 40 | text-decoration: line-through; 41 | } 42 | 43 | @media screen and (max-width: 500px) { 44 | .task-head h2 { 45 | font-size: 1rem; 46 | word-break: break-word; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /components/taskShow/TaskFeed.jsx: -------------------------------------------------------------------------------- 1 | import "./TaskFeed.css"; 2 | import { useEffect, useState } from "react"; 3 | 4 | /* Firebase */ 5 | import { auth, db } from "../../config/firebase/firebase"; 6 | import { doc, updateDoc, deleteDoc } from "firebase/firestore"; 7 | import CircularBtn from "../circularBtn/CircularBtn"; 8 | 9 | const TaskFeed = ({ taskData, parentTheme }) => { 10 | const [taskDone, setTaskDone] = useState(taskData["isDone"]); 11 | 12 | useEffect(() => { 13 | const updateIsDone = async () => { 14 | await updateDoc( 15 | doc(db, "users", auth.currentUser.uid, "tasks", taskData["id"]), 16 | { 17 | isDone: taskDone, 18 | } 19 | ); 20 | }; 21 | updateIsDone(); 22 | }, [taskDone]); 23 | 24 | useEffect(() => { 25 | setTaskDone(taskData["isDone"]); 26 | }, [taskData]); 27 | 28 | const deleteTask = async () => { 29 | await deleteDoc( 30 | doc(db, "users", auth.currentUser.uid, "tasks", taskData["id"]) 31 | ); 32 | }; 33 | return ( 34 |
35 |
36 | setTaskDone(e.target.checked)} 43 | /> 44 |

{taskData.title}

45 |
46 |
47 | 54 |
55 |
56 | ); 57 | }; 58 | 59 | export default TaskFeed; 60 | -------------------------------------------------------------------------------- /components/taskShow/Tasks.css: -------------------------------------------------------------------------------- 1 | .tasks-container { 2 | font-family: "Roboto", sans-serif; 3 | padding: 24px; 4 | display: flex; 5 | flex-direction: column; 6 | gap: 20px; 7 | 8 | height: 100%; 9 | overflow-y: scroll; 10 | } 11 | 12 | .tasks-container h1 { 13 | font-size: 2rem; 14 | font-weight: 300; 15 | /* text-decoration: underline wavy var(--global-blue, #1c5d99) 2px; */ 16 | } 17 | 18 | .task-head { 19 | display: flex; 20 | justify-content: space-between; 21 | } 22 | 23 | .tasks-feed { 24 | display: flex; 25 | flex-direction: column; 26 | gap: 16px; 27 | padding: 12px; 28 | } 29 | 30 | /* Create Task Button */ 31 | .create-task-btn-mob { 32 | background-color: var(--trans-active, #1c5d992c); 33 | border-radius: 9999px; 34 | border: solid white 1px; 35 | padding: 12px; 36 | display: flex; 37 | justify-content: center; 38 | align-items: center; 39 | cursor: pointer; 40 | } 41 | 42 | .create-task-btn-label-mob { 43 | font-family: "Roboto", sans-serif; 44 | font-weight: 500; 45 | color: var(--active, #1c5d99); 46 | } 47 | 48 | .create-task-btn-mob:active { 49 | background-color: white; 50 | border: var(--active, #1c5d99) solid 1px; 51 | } 52 | 53 | .create-task-btn-mob.dark { 54 | background-color: #2ec4b554; 55 | } 56 | 57 | .create-task-btn-label-mob.dark { 58 | color: var(--global-alt-blue, #2ec4b6); 59 | } 60 | 61 | .create-task-btn-mob:active { 62 | border: var(--global-alt-blue, #2ec4b6); 63 | } 64 | 65 | /* Create Task Button */ 66 | 67 | @media screen and (max-width: 500px) { 68 | .tasks-container { 69 | height: auto; 70 | overflow-y: unset; 71 | } 72 | } 73 | 74 | @media screen and (min-width: 1000px) { 75 | .create-task-btn-mob { 76 | display: none; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /components/taskShow/Tasks.jsx: -------------------------------------------------------------------------------- 1 | import TaskFeed from "./TaskFeed"; 2 | import "./Tasks.css"; 3 | 4 | const Tasks = ({ 5 | setIsOpen, 6 | isOpen, 7 | parentTasks, 8 | isTaskLoading, 9 | parentFilter, 10 | parentTheme, 11 | }) => { 12 | return ( 13 |
14 |
15 |

16 | {parentFilter === 1 17 | ? `Meetings (${parentTasks.length})` 18 | : parentFilter === 2 19 | ? `Groceries (${parentTasks.length})` 20 | : parentFilter === 3 21 | ? `Assignments (${parentTasks.length})` 22 | : `All Tasks (${parentTasks.length})`} 23 |

24 | 30 |
31 | 32 |
33 | {parentTasks.length !== 0 || null ? ( 34 | parentTasks.map((doc) => ( 35 | 36 | )) 37 | ) : isTaskLoading ? ( 38 |

Tasks Loading

39 | ) : ( 40 |

No Tasks

41 | )} 42 |
43 |
44 | ); 45 | }; 46 | 47 | export default Tasks; 48 | -------------------------------------------------------------------------------- /config/firebase/firebase.js: -------------------------------------------------------------------------------- 1 | import { initializeApp } from "firebase/app"; 2 | import { getAuth, GoogleAuthProvider } from "firebase/auth"; 3 | import { getFirestore } from "firebase/firestore"; 4 | 5 | const firebaseConfig = { 6 | apiKey: import.meta.env.VITE_API_KEY, 7 | authDomain: import.meta.env.VITE_AUTH_DOMAIN, 8 | projectId: import.meta.env.VITE_PROJECT_ID, 9 | storageBucket: import.meta.env.VITE_STORAGE_BUCKET, 10 | messagingSenderId: import.meta.env.VITE_MESSAGING_SENDER_ID, 11 | appId: import.meta.env.VITE_APP_ID, 12 | measurementId: import.meta.env.VITE_MEASUREMENT_ID, 13 | }; 14 | 15 | const app = initializeApp(firebaseConfig); 16 | 17 | export const db = getFirestore(app); 18 | 19 | export const googleProvider = new GoogleAuthProvider(); 20 | export const auth = getAuth(app); 21 | 22 | export default app; 23 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 11 | Errand 12 | 13 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "errand", 3 | "private": true, 4 | "version": "0.0.1", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "preview": "vite preview" 10 | }, 11 | "dependencies": { 12 | "firebase": "^9.19.1", 13 | "react": "^18.2.0", 14 | "react-dom": "^18.2.0", 15 | "react-firebase-hooks": "^5.1.1", 16 | "react-router-dom": "^6.10.0", 17 | "react-scripts": "^5.0.1" 18 | }, 19 | "devDependencies": { 20 | "@types/react": "^18.0.28", 21 | "@types/react-dom": "^18.0.11", 22 | "@vitejs/plugin-react": "^3.1.0", 23 | "react-error-overlay": "^6.0.9", 24 | "vite": "^4.2.0" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /pages/home/Home.css: -------------------------------------------------------------------------------- 1 | .App { 2 | height: 100%; 3 | width: 100%; 4 | display: grid; 5 | grid-template-columns: 5% auto 25%; 6 | } 7 | 8 | .navbar { 9 | display: flex; 10 | justify-content: center; 11 | align-items: center; 12 | } 13 | 14 | .timeline { 15 | background-color: #f7f6f9; 16 | height: 100vh; 17 | padding: 0.5rem; 18 | overflow-y: hidden; 19 | display: flex; 20 | flex-direction: column; 21 | } 22 | 23 | .navbar.dark { 24 | background-color: var(--global-dark-bg, #080f0f); 25 | } 26 | 27 | .timeline.dark { 28 | background-color: var(--global-dark, #0b1313); 29 | color: white; 30 | } 31 | 32 | .sideline.dark { 33 | background-color: var(--global-dark-bg, #080f0f); 34 | } 35 | 36 | .sideline { 37 | height: 100vh; 38 | padding: 0.5rem; 39 | background-color: white; 40 | display: flex; 41 | flex-direction: column; 42 | gap: 20px; 43 | } 44 | 45 | @media screen and (max-width: 1000px) { 46 | .sideline { 47 | display: none; 48 | } 49 | .App { 50 | grid-template-columns: none; 51 | grid-template-rows: 10% auto; 52 | } 53 | } 54 | 55 | @media screen and (max-width: 1000px) { 56 | .timeline { 57 | height: auto; 58 | } 59 | } 60 | 61 | @media screen and (max-width: 500px) { 62 | .timeline { 63 | display: flex; 64 | flex-direction: column; 65 | height: auto; 66 | overflow: visible; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /pages/home/Home.jsx: -------------------------------------------------------------------------------- 1 | import "./Home.css"; 2 | 3 | import { useState, useEffect } from "react"; 4 | 5 | import Calendar from "../../components/calender/Calendar"; 6 | import Overlay from "../../components/overlay/Overlay"; 7 | import TaskForm from "../../components/taskForm/TaskForm"; 8 | import Navbar from "../../components/navbar/Navbar"; 9 | import Glance from "../../components/glance/Glance"; 10 | import Tasks from "../../components/taskShow/Tasks"; 11 | import QuickAccess from "../../components/quickAccess/QuickAccess"; 12 | import Loading from "../../components/loading/Loading"; 13 | 14 | /* Firebase */ 15 | import { useAuthState } from "react-firebase-hooks/auth"; 16 | import { auth } from "../../config/firebase/firebase"; 17 | import { useCollectionData } from "react-firebase-hooks/firestore"; 18 | import { db } from "../../config/firebase/firebase"; 19 | import { collection, orderBy, query, setDoc, doc } from "firebase/firestore"; 20 | 21 | /* React Router DOM */ 22 | import { useNavigate } from "react-router-dom"; 23 | 24 | const Home = () => { 25 | // Auth States 26 | const [user, loading, error] = useAuthState(auth); 27 | const navigate = useNavigate(); 28 | const [isLoggingOut, setIsLoggingOut] = useState(0); 29 | 30 | // Home States 31 | const [filter, setFilter] = useState(0); 32 | 33 | // Task States 34 | 35 | const [q, setQ] = useState(); 36 | const [qUsers, setQUsers] = useState(); 37 | 38 | useEffect(() => { 39 | if (!user) { 40 | navigate("/login"); 41 | } else { 42 | /* Firebase Database */ 43 | const tasksRef = collection(db, "users", user.uid, "tasks"); 44 | const usersRef = collection(db, "users"); 45 | 46 | const q = query(tasksRef, orderBy("priority", "desc")); 47 | const qUsers = query(usersRef); 48 | 49 | setQ(q); 50 | setQUsers(qUsers); 51 | } 52 | }, [user, loading]); 53 | 54 | const [users, isUsersLoading, isUsersError, snapshotUsers] = 55 | useCollectionData(qUsers); 56 | 57 | const [tasks, isTaskLoading, isTaskError, snapshot] = useCollectionData(q); 58 | 59 | const [filteredTasks, setFilteredTasks] = useState(); 60 | 61 | useEffect(() => { 62 | const allTasks = snapshot?.docs.map((doc) => ({ 63 | id: doc.id, 64 | ...doc.data(), 65 | })); 66 | if (filter === 1) { 67 | setFilteredTasks(allTasks.filter((obj) => obj["tag"] === "meeting")); 68 | } else if (filter === 2) { 69 | setFilteredTasks(allTasks.filter((obj) => obj["tag"] === "grocery")); 70 | } else if (filter === 3) { 71 | setFilteredTasks(allTasks.filter((obj) => obj["tag"] === "assignment")); 72 | } else { 73 | setFilteredTasks( 74 | snapshot?.docs.map((doc) => ({ id: doc.id, ...doc.data() })) 75 | ); 76 | } 77 | }, [filter, snapshot]); 78 | 79 | const [nowDate, setNowDate] = useState({ date: "", month: "" }); 80 | const [isCreateTask, setIsCreateTask] = useState(0); 81 | 82 | const [theme, setTheme] = useState("dark"); 83 | 84 | useEffect(() => { 85 | setTheme( 86 | users?.filter((user) => user.id == auth.currentUser.uid)[0] === undefined 87 | ? "dark" 88 | : users?.filter((user) => user.id == auth.currentUser.uid)[0]["theme"] 89 | ); 90 | }, [users]); 91 | 92 | return user ? ( 93 |
94 | 95 | setIsCreateTask(val)} 97 | isOpen={isCreateTask} 98 | parentTheme={theme} 99 | /> 100 | 101 |
102 | setIsLoggingOut(value)} 105 | parentTheme={theme} 106 | parentChangeTheme={(theme) => setTheme(theme)} 107 | /> 108 |
109 |
110 | setFilter(val)} 113 | /> 114 | setIsCreateTask(val)} 116 | isOpen={isCreateTask} 117 | parentTasks={filteredTasks || []} 118 | parentFilter={filter} 119 | isTaskLoading={isTaskLoading} 120 | parentTheme={theme} 121 | /> 122 |
123 |
124 | setIsCreateTask(isOpen)} 126 | parentTaskFormOpen={isCreateTask} 127 | setParentNowDate={(date) => setNowDate(date)} 128 | parentTasks={snapshot?.docs.map((doc) => ({ 129 | id: doc.id, 130 | ...doc.data(), 131 | }))} 132 | parentTheme={theme} 133 | > 134 | ({ 138 | id: doc.id, 139 | ...doc.data(), 140 | }))} 141 | /> 142 |
143 |
144 | ) : loading || isLoggingOut ? ( 145 | 146 | ) : ( 147 | "" 148 | ); 149 | }; 150 | 151 | export default Home; 152 | -------------------------------------------------------------------------------- /pages/login/Login.css: -------------------------------------------------------------------------------- 1 | .login-container { 2 | height: 100vh; 3 | display: flex; 4 | } 5 | 6 | .login { 7 | width: 60%; 8 | font-family: "Poppins", sans-serif; 9 | 10 | display: flex; 11 | flex-direction: column; 12 | justify-content: center; 13 | align-items: center; 14 | 15 | gap: 24px; 16 | } 17 | 18 | .google-btn { 19 | display: flex; 20 | justify-content: center; 21 | align-items: center; 22 | gap: 12px; 23 | padding: 12px; 24 | 25 | font-family: "Poppins", sans-serif; 26 | font-weight: bold; 27 | 28 | border-radius: 50px; 29 | border: solid transparent 2px; 30 | background: transparent; 31 | 32 | cursor: pointer; 33 | } 34 | 35 | .google-btn:hover { 36 | border: solid lightskyblue 2px; 37 | } 38 | 39 | .google-icon { 40 | height: 32px; 41 | width: 32px; 42 | background-image: url(https://www.svgrepo.com/download/448227/google.svg); 43 | background-size: cover; 44 | background-repeat: no-repeat; 45 | display: flex; 46 | justify-content: center; 47 | align-items: center; 48 | transition: all 120ms cubic-bezier(0.17, 0.67, 0.83, 0.67); 49 | } 50 | 51 | .login-title { 52 | font-size: 2rem; 53 | } 54 | 55 | .login-subtitle { 56 | font-size: 1.5rem; 57 | font-weight: lighter; 58 | } 59 | 60 | .side-bg { 61 | background: url(https://unsplash.com/photos/Lw7BruqPnJY/download?ixid=MnwxMjA3fDB8MXxzZWFyY2h8MjB8fGJsdWUlMjBjeWJlcnB1bmt8ZW58MHx8fHwxNjgxNzE1MTgz&force=true&w=1920); 62 | background-color: lightskyblue; 63 | background-position: center; 64 | background-size: cover; 65 | background-repeat: no-repeat; 66 | width: 40%; 67 | } 68 | 69 | @media screen and (max-width: 1000px) { 70 | .side-bg { 71 | display: none; 72 | } 73 | 74 | .login { 75 | padding: 15px; 76 | width: 100%; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /pages/login/Login.jsx: -------------------------------------------------------------------------------- 1 | import "./Login.css"; 2 | 3 | /* Firebase */ 4 | import { auth, googleProvider } from "../../config/firebase/firebase"; 5 | import { signInWithPopup, signOut } from "firebase/auth"; 6 | import { useEffect, useState } from "react"; 7 | import { useAuthState } from "react-firebase-hooks/auth"; 8 | 9 | /* React Router DOM */ 10 | import { useNavigate } from "react-router-dom"; 11 | import Loading from "../../components/loading/Loading"; 12 | 13 | const Login = () => { 14 | const [user, loading, error] = useAuthState(auth); 15 | const [isLoggingIn, setIsLoggingIn] = useState(0); 16 | const navigate = useNavigate(); 17 | 18 | useEffect(() => { 19 | if (user) { 20 | navigate("/"); 21 | } 22 | }, [user, loading]); 23 | 24 | const loginWithGoogle = async () => { 25 | setIsLoggingIn(1); 26 | try { 27 | await signInWithPopup(auth, googleProvider); 28 | setIsLoggingIn(0); 29 | } catch (err) { 30 | navigate(0); 31 | } 32 | }; 33 | 34 | return isLoggingIn || loading ? ( 35 | 36 | ) : ( 37 |
38 |
39 |
40 |

Login

41 |

42 | Please Continue with your Google Account 43 |

44 |
45 | 46 | 50 |
51 | 52 |
53 |
54 | ); 55 | }; 56 | 57 | export default Login; 58 | -------------------------------------------------------------------------------- /src/App.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SomnathDas/errand/c9e80b2d796a6279e99ea410273c387d24c40739/src/App.css -------------------------------------------------------------------------------- /src/App.jsx: -------------------------------------------------------------------------------- 1 | import Home from "../pages/home/Home"; 2 | import Login from "../pages/login/Login"; 3 | import "./App.css"; 4 | 5 | import { Routes, Route } from "react-router-dom"; 6 | 7 | const App = () => { 8 | return ( 9 | 10 | } /> 11 | } /> 12 | 13 | ); 14 | }; 15 | 16 | export default App; 17 | -------------------------------------------------------------------------------- /src/assets/react.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/index.css: -------------------------------------------------------------------------------- 1 | @import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;700&family=Roboto:wght@300;400;500;700&display=swap"); 2 | 3 | *, 4 | *::before, 5 | *::after { 6 | margin: 0; 7 | padding: 0; 8 | box-sizing: border-box; 9 | font-size: 100%; /* 1 */ 10 | line-height: 1.15; /* 1 */ 11 | } 12 | 13 | html, 14 | body { 15 | height: 100vh; 16 | width: 100vw; 17 | } 18 | 19 | :root { 20 | -webkit-font-smoothing: antialiased; 21 | -moz-osx-font-smoothing: grayscale; 22 | -webkit-text-size-adjust: 100%; 23 | 24 | --global-blue: #1c5d99; 25 | --global-dark: #0b1313; 26 | --global-alt-blue: #2ec4b6; 27 | --global-dark-bg: #080f0f; 28 | } 29 | 30 | #root { 31 | height: 100%; 32 | width: 100%; 33 | } 34 | -------------------------------------------------------------------------------- /src/main.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom/client"; 3 | import App from "./App"; 4 | import "./index.css"; 5 | 6 | import { BrowserRouter } from "react-router-dom"; 7 | 8 | ReactDOM.createRoot(document.getElementById("root")).render( 9 | 10 | 11 | 12 | 13 | 14 | ); 15 | -------------------------------------------------------------------------------- /vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import react from "@vitejs/plugin-react"; 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }); 8 | --------------------------------------------------------------------------------