diff --git a/LICENSE b/LICENSE index f288702d..3877ae0a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,674 +1,674 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/README.md b/README.md index 318644b6..d386f64a 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,305 @@ -# Project Sloth MDT - -For all support questions, ask in our Discord support chat. Do not create issues if you need help. Issues are for bug reporting and new features only. - - https://www.discord.gg/projectsloth - -## Dependencies - -- [QBCore](https://github.com/qbcore-framework/qb-core) -- [PS-Dispatch](https://github.com/Project-Sloth/ps-dispatch) [If you intend to use it, make sure this starts before the mdt!] -- [Ox MySQL](https://github.com/overextended/oxmysql) - -## FAQ -- **How do I add charges to a criminal in an Incident?** - After finding and adding the criminal citizen to the incident, right-click in the space under the criminal's name and select "Add Charge". - -![](https://i.imgur.com/WVEDLnJ.png) - -- **My dispatch calls are not being populated?** - You have not started the dispatch resource before the mdt or renamed the dispatch resource name and not made the necessary changes in mdt to reflect that. - -## EchoRP MDT QBCore Edit (WIP) - -EchoRP MDT Released by Flawws#9999 from Echo RP rewritten and restructured for QBCore. -This is no longer a fork so we are able to open issues on this repo. - -# DMCA Protection Certificate -![image](https://user-images.githubusercontent.com/82112471/183939077-c714b08b-77cc-49c6-a94a-3064856d90b9.png) - -[https://www.dmca.com/r/p3j2p4q](https://www.dmca.com/Protection/Status.aspx?ID=0ff6f6e1-2b54-4dda-bcd3-42728908f404&refurl=https://github.com/Project-Sloth/ps-mdt) +# Project Sloth MDT + +For all support questions, ask in our [Discord](https://www.discord.gg/projectsloth) support chat. Do not create issues if you need help. Issues are for bug reporting and new features only. + +## Dependencies + +- [QBCore](https://github.com/qbcore-framework/qb-core) +- [ps-dispatch](https://github.com/Project-Sloth/ps-dispatch) +- [oxmysql](https://github.com/overextended/oxmysql) +- [qb-apartments](https://github.com/qbcore-framework/qb-apartments) | [Config](https://github.com/Project-Sloth/ps-mdt/blob/0ce2ab88d2ca7b0a49abfb3f7f8939d0769c7b73/shared/config.lua#L3) available to enable or disable. +- [qb-communityservice](https://github.com/Zepherlah/qb-community-service) - If you're planning on sending to community service. + +# Installation +* Download ZIP +* Drag and drop resource into your server files, make sure to remove -main in the folder name +* Open the sql folder and run the SQL script which corresponds to your framework + +# Weapon Info Export + +Adds server export for inserting weaponinfo records, that can be used elsewhere in your server, such as weapon purchase, to add information to the mdt. Below is the syntax for this, all arguments are strings. + +```lua +exports['ps-mdt']:CreateWeaponInfo(serial, imageurl, notes, owner, weapClass, weapModel) +``` +![image](https://user-images.githubusercontent.com/82112471/226144189-0cf7a87c-d9bc-4d1f-a9fb-6f14f92cb68b.png) + +## Setup for [ox_inventory](https://github.com/overextended/ox_inventory) + +Set `Config.InventoryForWeaponsImages` to `"ox_inventory"` and `Config.RegisterCreatedWeapons` to true/false as desired. + +## Self Register Weapons +* Your citizens can self-register weapons found on their inventory. Event to trigger is below if you're using qb-target. There's also a command available named `registerweapon` but you'll need to uncomment if you want to use it. +```lua +ps-mdt:client:selfregister +``` + +https://user-images.githubusercontent.com/82112471/226150422-0c4776f0-0927-4b07-a272-972dd1c20077.mp4 + +# Automatic Mugshot Pictures +![image](https://user-images.githubusercontent.com/82112471/226207146-086c5508-7e6f-4345-a157-3ec2fd588138.png) + +## Setup for Automatic Mugshot +* Set Config.UseCQCMugshot to true, It is true by default. (Line 5 in Config.lua) +```lua +Config.UseCQCMugshot = true +``` +* Choose what photos you want by changing this: (Line 8 in Config.lua) +```lua +-- Front, Back Side. Use 4 for both sides, we recommend leaving at 1 for default. +Config.MugPhotos = 1 +``` +* Use Fivemerr to upload your mugshot pictures. Do not use Discord, images will expire. Documents for setup are [here.](https://docs.fivemerr.com/integrations/mdt-scripts/ps-mdt) +``` +Config.FivemerrMugShot = true +``` +* Create a Discord Webhook and add it [here](https://github.com/Project-Sloth/ps-mdt/blob/c10ea056705dd7b04894716266cd387b00109aff/server/main.lua#L16C26-L16C26) +```lua +-- Images for mug shots will be uploaded here. Add a Discord webhook. +local MugShotWebhook = '' +``` +# Fine & Citation via item + +* Add the item to your shared.lua > items.lua +```lua + ['mdtcitation'] = {['name'] = 'mdtcitation', ['label'] = 'Citation', ['weight'] = 1000, ['type'] = 'item', ['image'] = 'citation.png', ['unique'] = true, ['useable'] = false, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Citation from a police officer!'}, +``` +* Add the below code to your inventory > app.js. Should be somewhere around markedbills, see below for reference. +```lua + } else if (itemData.name == "mdtcitation") { + $(".item-info-title").html("

" + itemData.label + "

"); + $(".item-info-description").html( + '

Citizen ID: ' + itemData.info.citizenId + '

' + + '

Fine: ' + itemData.info.fine + '

' + + '

Citation Date: ' + itemData.info.date + '

' + + '

Incident ID: ' + itemData.info.incidentId + '

' + + '

Involved Officer: ' + itemData.info.officer + '

' + ); +``` +* Reference for proper placement. + +![image](https://user-images.githubusercontent.com/82112471/234807680-c943fac6-0da7-42f4-b815-d85769fe3779.png) + +# Clock In/Out & Leaderboard +* Triggers when officers Toggle Duty from inside the mdt. +* Create a Discord Webhook and add it here [here](https://github.com/Project-Sloth/ps-mdt/blob/c10ea056705dd7b04894716266cd387b00109aff/server/main.lua#L20) +```lua +local ClockinWebhook = '' +``` +![image](https://user-images.githubusercontent.com/82112471/228130546-6366ed1e-f5a8-428c-8680-0c384d2cff52.png) +![image](https://user-images.githubusercontent.com/82112471/228330602-1a914461-5d61-4e12-80d4-154c8da3dee1.png) + + +# Jailing & Community Service +* If you're getting kicked for attempted exploit abuse while jailing. Locate the following event below in qb-policejob > server > main.lua + +```lua +police:server:JailPlayer +``` + +* Then comment out around line [779](https://github.com/qbcore-framework/qb-policejob/blob/937499495aa73538710737c14bd1b26d233dd599/server/main.lua#L779) as seen below + +```lua +-- if #(playerCoords - targetCoords) > 2.5 then return DropPlayer(src, "Attempted exploit abuse") end +``` + +# Inventory Edit | Automatic Add Weapons with images +* [lj-inventory](https://github.com/loljoshie/lj-inventory) will come already with the changes needed for this to work. +* [qb-inventory](https://github.com/qbcore-framework/qb-inventory) follow instructions below. + +1. Edit the following event +```lua +RegisterNetEvent('inventory:server:SetInventoryData', function(fromInventory, toInventory, fromSlot, toSlot, fromAmount, toAmount) +``` +```lua + elseif QBCore.Shared.SplitStr(shopType, "_")[1] == "Itemshop" then + if Player.Functions.RemoveMoney("cash", price, "itemshop-bought-item") then + if QBCore.Shared.SplitStr(itemData.name, "_")[1] == "weapon" then + itemData.info.serie = tostring(QBCore.Shared.RandomInt(2) .. QBCore.Shared.RandomStr(3) .. QBCore.Shared.RandomInt(1) .. QBCore.Shared.RandomStr(2) .. QBCore.Shared.RandomInt(3) .. QBCore.Shared.RandomStr(4)) + itemData.info.quality = 100 + end + local serial = itemData.info.serie + local imageurl = ("https://cfx-nui-qb-inventory/html/images/%s.png"):format(itemData.name) + local notes = "Purchased at Ammunation" + local owner = Player.PlayerData.charinfo.firstname .. " " .. Player.PlayerData.charinfo.lastname + local weapClass = 1 + local weapModel = QBCore.Shared.Items[itemData.name].label + AddItem(src, itemData.name, fromAmount, toSlot, itemData.info) + TriggerClientEvent('qb-shops:client:UpdateShop', src, QBCore.Shared.SplitStr(shopType, "_")[2], itemData, fromAmount) + QBCore.Functions.Notify(src, itemInfo["label"] .. " bought!", "success") + exports['ps-mdt']:CreateWeaponInfo(serial, imageurl, notes, owner, weapClass, weapModel) + TriggerEvent("qb-log:server:CreateLog", "shops", "Shop item bought", "green", "**"..GetPlayerName(src) .. "** bought a " .. itemInfo["label"] .. " for $"..price) + elseif bankBalance >= price then + Player.Functions.RemoveMoney("bank", price, "itemshop-bought-item") + if QBCore.Shared.SplitStr(itemData.name, "_")[1] == "weapon" then + itemData.info.serie = tostring(QBCore.Shared.RandomInt(2) .. QBCore.Shared.RandomStr(3) .. QBCore.Shared.RandomInt(1) .. QBCore.Shared.RandomStr(2) .. QBCore.Shared.RandomInt(3) .. QBCore.Shared.RandomStr(4)) + itemData.info.quality = 100 + end + local serial = itemData.info.serie + local imageurl = ("https://cfx-nui-qb-inventory/html/images/%s.png"):format(itemData.name) + local notes = "Purchased at Ammunation" + local owner = Player.PlayerData.charinfo.firstname .. " " .. Player.PlayerData.charinfo.lastname + local weapClass = 1 + local weapModel = QBCore.Shared.Items[itemData.name].label + AddItem(src, itemData.name, fromAmount, toSlot, itemData.info) + TriggerClientEvent('qb-shops:client:UpdateShop', src, QBCore.Shared.SplitStr(shopType, "_")[2], itemData, fromAmount) + QBCore.Functions.Notify(src, itemInfo["label"] .. " bought!", "success") + exports['ps-mdt']:CreateWeaponInfo(serial, imageurl, notes, owner, weapClass, weapModel) + TriggerEvent("qb-log:server:CreateLog", "shops", "Shop item bought", "green", "**"..GetPlayerName(src) .. "** bought a " .. itemInfo["label"] .. " for $"..price) + else + QBCore.Functions.Notify(src, "You don't have enough cash..", "error") + end +```` + +# Wolfknight Plate Reader & Radar Compatibility + +Support for Wolfknight Radar & Plate Reader +https://github.com/WolfKnight98/wk_wars2x + +Plate reader automatically locks and alerts Police if: + +* Vehicle owner is Wanted +* Vehicle owner has no drivers licence +* Vehicle has a BOLO + +**IMPORTANT:** + +* Ensure you set "CONFIG.use_sonorancad = true" in wk_wars2x/config.lua + +This reduces the plate reader events to player's vehicles and doesn't query the database for hundreds of NPC vehicles + +### Video Demonstration +https://youtu.be/w9PAVc3ER_c + +![image](https://i.imgur.com/KZPMHQX.png) +![image](https://i.imgur.com/OIIrAcb.png) +![image](https://i.imgur.com/6maboG3.png) +![image](https://i.imgur.com/DkhQxDq.png) + +### Traffic Stop Radialmenu Alert + +* When initiating a traffic stop allows you to notify your fellow officers of your location and provide details about the current location and stopped vehicle through the radial menu. + + +1. Add the following code right above `function READER:Main()` on `cl_plate_reader.lua` + +```lua +local Vehicle = nil +local function GetFrontPlate() + local data = { + locked = READER.vars.cams["front"].locked, + plate = READER.vars.cams["front"].plate, + veh = Vehicle, + } + return data +end exports("GetFrontPlate", GetFrontPlate) +``` + +2. Add the following into `cl_plate_reader.lua` after `local veh = UTIL:GetVehicleInDirection( PLY.veh, start, offset )` on the function `function READER:Main()` +```lua + if i == 1 then + Vehicle = veh + end +``` + +* Should look like this after completing the above steps. +![image](https://i.imgur.com/ryefT3n.png) + +3. Add **ps-mdt:client:trafficStop** into the Radialmenu + +* Preview. + +![image](https://user-images.githubusercontent.com/82112471/230744641-72480046-966f-4145-a4a3-ad7fd329870c.png) + +# Roster and SOPs Setup + +* You need a Google Document / Sheet link that is viewable. + +Paste the link you got in the config here: +```lua +-- Google Docs Link +Config.sopLink = { + ['police'] = '', + ['ambulance'] = '', + ['bcso'] = '', + ['doj'] = '', + ['sast'] = '', + ['sasp'] = '', + ['doc'] = '', + ['lssd'] = '', + ['sapr'] = '', +} + +-- Google Docs Link +Config.RosterLink = { + ['police'] = '', + ['ambulance'] = '', + ['bcso'] = '', + ['doj'] = '', + ['sast'] = '', + ['sasp'] = '', + ['doc'] = '', + ['lssd'] = '', + ['sapr'] = '', +} +``` + +# Preview +![image](https://user-images.githubusercontent.com/82112471/217596976-5147fefa-24e2-4b98-b167-4e151b8a9a8c.png) +![image](https://user-images.githubusercontent.com/82112471/217597024-2c1493fc-4439-4b56-abbd-f9149e987b9e.png) +![image](https://user-images.githubusercontent.com/82112471/217597103-c271720a-4c1b-4a13-8e17-a27727cb0e95.png) +![image](https://user-images.githubusercontent.com/82112471/217597192-f9a63728-d2d0-4dfe-bd8b-373df1f9e969.png) +![image](https://user-images.githubusercontent.com/82112471/217597248-85d2d074-7fcd-4a54-ac57-8d1103047bc0.png) +![image](https://user-images.githubusercontent.com/82112471/217597338-aefcaed1-db9e-4b17-be45-3e0a66416b63.png) +![image](https://user-images.githubusercontent.com/82112471/217597379-d936fb8e-e33a-4817-8997-16447158afb8.png) +![image](https://user-images.githubusercontent.com/82112471/217597433-cd24bd41-a515-4fac-a896-807494501c39.png) + +# Multi Departments +* LSPD +![image](https://i.imgur.com/2HmsTa3.png) +* BCSO +![image](https://i.imgur.com/9WVU0Kz.png) +* SASP +![image](https://i.imgur.com/6tLNVkb.png) +* SAST +![image](https://i.imgur.com/G5b2vGU.png) +* SAPR +![image](https://i.imgur.com/cu1ZsfW.png) +* LSSD +![image](https://i.imgur.com/IsqZddu.png) +* DOC +![image](https://i.imgur.com/lFi4jDH.png) + +# FAQ +- **How do I add charges to a criminal in an Incident?** - After finding and adding the criminal citizen to the incident, right-click in the space under the criminal's name and select "Add Charge". + +![](https://i.imgur.com/WVEDLnJ.png) + +- **My dispatch calls are not being populated?** - You have not started the dispatch resource before the mdt or renamed the dispatch resource name and not made the necessary changes in mdt to reflect that. + +- **Getting a error about utf8mb4_unicode illegal collation?** - QBCore has decided to change their collations on the new txAdmin recipe, change your collation on your players table to utf8mb4_general_ci. Run this query below on your database to automatically change it. +```sql +ALTER TABLE players CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci +``` + + +# Reskins +The below repos are direct forks of ps-mdt and have been edited to fit certain countries/look. + +* [US](https://github.com/OK1ez/ps-mdt/tree/main) Different layout and different colors. +* [UK](https://github.com/Harraa/ps-mdt) + +# Credits +* Originally Echo RP MDT released by [Flawws#999](https://github.com/FlawwsX/erp_mdt) +* [CQC-Scripting](https://github.com/CQC-Scripting) for their [cqc-mugshot](https://github.com/CQC-Scripting/cqc-mugshot) +* [JoeSzymkowicz](https://github.com/JoeSzymkowicz) +* [MonkeyWhisper](https://github.com/MonkeyWhisper) +* [Snipe](https://github.com/pushkart2) +* [BackSH00TER](https://github.com/BackSH00TER) +* [nggcasey](https://github.com/nggcasey) +* [OK1ez](https://github.com/OK1ez) +* [Crayons0814](https://github.com/Crayons0814) +* [LeSiiN](https://github.com/LeSiiN) +* [ImXirvin](https://github.com/ImXirvin) +* [lenzh](https://github.com/lenzh) +* Everyone else that we may have missed, thank you! diff --git a/client/cl_impound.lua b/client/cl_impound.lua index 09fae552..6a9af104 100644 --- a/client/cl_impound.lua +++ b/client/cl_impound.lua @@ -1,75 +1,75 @@ -local currentGarage = 1 - -local function doCarDamage(currentVehicle, veh) - local smash = false - local damageOutside = false - local damageOutside2 = false - local engine = veh.engine + 0.0 - local body = veh.body + 0.0 - - if engine < 200.0 then engine = 200.0 end - if engine > 1000.0 then engine = 950.0 end - if body < 150.0 then body = 150.0 end - if body < 950.0 then smash = true end - if body < 920.0 then damageOutside = true end - if body < 920.0 then damageOutside2 = true end - - Citizen.Wait(100) - SetVehicleEngineHealth(currentVehicle, engine) - - if smash then - SmashVehicleWindow(currentVehicle, 0) - SmashVehicleWindow(currentVehicle, 1) - SmashVehicleWindow(currentVehicle, 2) - SmashVehicleWindow(currentVehicle, 3) - SmashVehicleWindow(currentVehicle, 4) - end - - if damageOutside then - SetVehicleDoorBroken(currentVehicle, 1, true) - SetVehicleDoorBroken(currentVehicle, 6, true) - SetVehicleDoorBroken(currentVehicle, 4, true) - end - - if damageOutside2 then - SetVehicleTyreBurst(currentVehicle, 1, false, 990.0) - SetVehicleTyreBurst(currentVehicle, 2, false, 990.0) - SetVehicleTyreBurst(currentVehicle, 3, false, 990.0) - SetVehicleTyreBurst(currentVehicle, 4, false, 990.0) - end - - if body < 1000 then - SetVehicleBodyHealth(currentVehicle, 985.1) - end -end - -local function TakeOutImpound(vehicle) - local coords = Config.ImpoundLocations[currentGarage] - if coords then - QBCore.Functions.SpawnVehicle(vehicle.vehicle, function(veh) - QBCore.Functions.TriggerCallback('qb-garage:server:GetVehicleProperties', function(properties) - QBCore.Functions.SetVehicleProperties(veh, properties) - SetVehicleNumberPlateText(veh, vehicle.plate) - SetEntityHeading(veh, coords.w) - exports[Config.Fuel]:SetFuel(veh, vehicle.fuel) - doCarDamage(veh, vehicle) - TriggerServerEvent('police:server:TakeOutImpound',vehicle.plate) - TriggerEvent("vehiclekeys:client:SetOwner", QBCore.Functions.GetPlate(veh)) - SetVehicleEngineOn(veh, true, true) - end, vehicle.plate) - end, coords, true) - end -end - -RegisterNetEvent('ps-mdt:client:TakeOutImpound', function(data) - local pos = GetEntityCoords(PlayerPedId()) - currentGarage = data.currentSelection - local takeDist = Config.ImpoundLocations[data.currentSelection] - takeDist = vector3(takeDist.x, takeDist.y, takeDist.z) - if #(pos - takeDist) <= 15.0 then - local vehicle = data.vehicle - TakeOutImpound(data) - else - QBCore.Functions.Notify("You are too far away from the impound location!") - end +local currentGarage = 1 + +local function doCarDamage(currentVehicle, veh) + local smash = false + local damageOutside = false + local damageOutside2 = false + local engine = veh.engine + 0.0 + local body = veh.body + 0.0 + + if engine < 200.0 then engine = 200.0 end + if engine > 1000.0 then engine = 950.0 end + if body < 150.0 then body = 150.0 end + if body < 950.0 then smash = true end + if body < 920.0 then damageOutside = true end + if body < 920.0 then damageOutside2 = true end + + Citizen.Wait(100) + SetVehicleEngineHealth(currentVehicle, engine) + + if smash then + SmashVehicleWindow(currentVehicle, 0) + SmashVehicleWindow(currentVehicle, 1) + SmashVehicleWindow(currentVehicle, 2) + SmashVehicleWindow(currentVehicle, 3) + SmashVehicleWindow(currentVehicle, 4) + end + + if damageOutside then + SetVehicleDoorBroken(currentVehicle, 1, true) + SetVehicleDoorBroken(currentVehicle, 6, true) + SetVehicleDoorBroken(currentVehicle, 4, true) + end + + if damageOutside2 then + SetVehicleTyreBurst(currentVehicle, 1, false, 990.0) + SetVehicleTyreBurst(currentVehicle, 2, false, 990.0) + SetVehicleTyreBurst(currentVehicle, 3, false, 990.0) + SetVehicleTyreBurst(currentVehicle, 4, false, 990.0) + end + + if body < 1000 then + SetVehicleBodyHealth(currentVehicle, 985.1) + end +end + +local function TakeOutImpound(vehicle) + local coords = Config.ImpoundLocations[currentGarage] + if coords then + QBCore.Functions.SpawnVehicle(vehicle.vehicle, function(veh) + QBCore.Functions.TriggerCallback('qb-garage:server:GetVehicleProperties', function(properties) + QBCore.Functions.SetVehicleProperties(veh, properties) + SetVehicleNumberPlateText(veh, vehicle.plate) + SetEntityHeading(veh, coords.w) + exports[Config.Fuel]:SetFuel(veh, vehicle.fuel) + doCarDamage(veh, vehicle) + TriggerServerEvent('police:server:TakeOutImpound',vehicle.plate) + TriggerEvent("vehiclekeys:client:SetOwner", QBCore.Functions.GetPlate(veh)) + SetVehicleEngineOn(veh, true, true) + end, vehicle.plate) + end, coords, true) + end +end + +RegisterNetEvent('ps-mdt:client:TakeOutImpound', function(data) + local pos = GetEntityCoords(PlayerPedId()) + currentGarage = data.currentSelection + local takeDist = Config.ImpoundLocations[data.currentSelection] + takeDist = vector3(takeDist.x, takeDist.y, takeDist.z) + if #(pos - takeDist) <= 15.0 then + local vehicle = data.vehicle + TakeOutImpound(data) + else + QBCore.Functions.Notify("You are too far away from the impound location!") + end end) \ No newline at end of file diff --git a/client/cl_mugshot.lua b/client/cl_mugshot.lua new file mode 100644 index 00000000..0c3ac329 --- /dev/null +++ b/client/cl_mugshot.lua @@ -0,0 +1,233 @@ +QBCore = exports['qb-core']:GetCoreObject() +local PlayerData = {} +local mugshotInProgress, createdCamera, MugshotArray, playerData = false, 0, {}, nil +local handle, board, board_scaleform, overlay, ped, pedcoords, x, y, z, r, suspectheading, suspectx, suspecty, suspectz, board_pos +local MugShots = {} + +-- Mugshot location ( Position is the default QBCore Prison Interior ) + x = 1828.69 + y = 2581.72 + z = 46.3 + r = {x = 0.0, y = 0.0, z = 92.23} + suspectheading = 265.00 + suspectx = 1827.63 + suspecty = 2581.7 + suspectz = 44.89 + +-- Mugshot functions + +local function TakeMugShot() + QBCore.Functions.TriggerCallback('ps-mdt:server:MugShotWebhook', function(webhookUrl, apiKey) + if Config.MugShotWebhook then + exports['screenshot-basic']:requestScreenshotUpload(webhookUrl, 'files[]', {encoding = 'jpg'}, function(data) + local resp = json.decode(data) + table.insert(MugshotArray, resp.attachments[1].url) + end) + elseif Config.FivemerrMugShot then + exports['screenshot-basic']:requestScreenshotUpload('https://api.fivemerr.com/v1/media/images', 'file', { + headers = { + Authorization = apiKey + }, + encoding = 'png' + }, function(data) + local resp = json.decode(data) + local link = (resp and resp.url) or 'invalid_url' + table.insert(MugshotArray, link) + end) + end + end) +end + +local function PhotoProcess(ped) + local rotation = suspectheading + for photo = 1, Config.MugPhotos, 1 do + Wait(1500) + TakeMugShot() + -- Transient error can occur if we don't wait long enough for the array to be pushed with the new mugshot + -- URL. So we wait until this has happened. + while #MugshotArray == 0 do + Wait(1000) + end + PlaySoundFromCoord(-1, "SHUTTER_FLASH", x, y, z, "CAMERA_FLASH_SOUNDSET", true, 5, 0) + rotation = rotation - 90.0 + SetEntityHeading(ped, rotation) + end +end + +local function MugShotCamera() + if createdCamera ~= 0 then + DestroyCam(createdCamera, 0) + createdCamera = 0 + end + local cam = CreateCam("DEFAULT_SCRIPTED_CAMERA", 1) + SetCamCoord(cam, x, y, z) + SetCamRot(cam, r.x, r.y, r.z, 2) + RenderScriptCams(1, 0, 0, 1, 1) + Wait(250) + createdCamera = cam + CreateThread(function() + FreezeEntityPosition(ped, true) + SetPauseMenuActive(false) + while mugshotInProgress do + DisableAllControlActions(0) + EnableControlAction(0, 249, true) + EnableControlAction(0, 46, true) + Wait(1) + end + end) +end + +local function CreateNamedRenderTargetForModel(name, model) + local handle = 0 + if not IsNamedRendertargetRegistered(name) then + RegisterNamedRendertarget(name, 0) + end + if not IsNamedRendertargetLinked(model) then + LinkNamedRendertarget(model) + end + if IsNamedRendertargetRegistered(name) then + handle = GetNamedRendertargetRenderId(name) + end + return handle +end + +local function LoadScaleform (scaleform) + local handle = RequestScaleformMovie(scaleform) + if handle ~= 0 then + while not HasScaleformMovieLoaded(handle) do + Wait(0) + end + end + return handle +end + +local function CallScaleformMethod (scaleform, method, ...) + local t + local args = { ... } + BeginScaleformMovieMethod(scaleform, method) + for k, v in ipairs(args) do + t = type(v) + if t == 'string' then + PushScaleformMovieMethodParameterString(v) + elseif t == 'number' then + if string.match(tostring(v), "%.") then + PushScaleformMovieFunctionParameterFloat(v) + else + PushScaleformMovieFunctionParameterInt(v) + end + elseif t == 'boolean' then + PushScaleformMovieMethodParameterBool(v) + end + end + EndScaleformMovieMethod() +end + +local function PrepBoard() + CreateThread(function() + board_scaleform = LoadScaleform("mugshot_board_01") + handle = CreateNamedRenderTargetForModel("ID_Text", `prop_police_id_text`) + while handle do + HideHudAndRadarThisFrame() + SetTextRenderId(handle) + Set_2dLayer(4) + SetScriptGfxDrawBehindPausemenu(1) + DrawScaleformMovie(board_scaleform, 0.405, 0.37, 0.81, 0.74, 255, 255, 255, 255, 0) + SetScriptGfxDrawBehindPausemenu(0) + SetTextRenderId(GetDefaultScriptRendertargetRenderId()) + SetScriptGfxDrawBehindPausemenu(1) + SetScriptGfxDrawBehindPausemenu(0) + Wait(0) + end + end) +end + +local function MakeBoard() + title = "Bolingbroke Penitentiary" + center = playerData.charinfo.firstname.. " ".. playerData.charinfo.lastname + footer = playerData.citizenid + header = playerData.charinfo.birthdate + CallScaleformMethod(board_scaleform, 'SET_BOARD', title, center, footer, header, 0, 1337, 116) +end + +local function PlayerBoard() + RequestModel(`prop_police_id_board`) + RequestModel(`prop_police_id_text`) + while not HasModelLoaded(`prop_police_id_board`) or not HasModelLoaded(`prop_police_id_text`) do + Wait(1) + end + board = CreateObject(`prop_police_id_board`, pedcoords, true, true, false) + overlay = CreateObject(`prop_police_id_text`, pedcoords, true, true, false) + AttachEntityToEntity(overlay, board, -1, 4103, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, false, false, false, false, 2, true) + SetModelAsNoLongerNeeded(`prop_police_id_board`) + SetModelAsNoLongerNeeded(`prop_police_id_text`) + SetCurrentPedWeapon(ped, `weapon_unarmed`, 1) + ClearPedWetness(ped) + ClearPedBloodDamage(ped) + AttachEntityToEntity(board, ped, GetPedBoneIndex(ped, 28422), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 2, 1) +end + +local function DestoryCamera() + DestroyCam(createdCamera, 0) + RenderScriptCams(0, 0, 1, 1, 1) + SetFocusEntity(GetPlayerPed(ped)) + ClearPedTasksImmediately(ped) + FreezeEntityPosition(ped, false) + DeleteObject(overlay) + DeleteObject(board) + handle = nil + createdCamera = 0 +end + +RegisterNetEvent('cqc-mugshot:client:trigger', function() + ped = PlayerPedId() + pedcoords = GetEntityCoords(ped) + CreateThread(function() + playerData = QBCore.Functions.GetPlayerData() + MugshotArray, mugshotInProgress = {}, true + local citizenid = playerData.citizenid + local animDict = 'mp_character_creation@lineup@male_a' + QBCore.Functions.RequestAnimDict(animDict) + PrepBoard() + Wait(250) + MakeBoard() + MugShotCamera() + SetEntityCoords(ped, suspectx, suspecty, suspectz) + SetEntityHeading(ped, suspectheading) + PlayerBoard() + TaskPlayAnim(ped, animDict, "loop_raised", 8.0, 8.0, -1, 49, 0, false, false, false) + PhotoProcess(ped) + if createdCamera ~= 0 then + DestoryCamera() + SetEntityHeading(ped, suspectheading) + ClearPedSecondaryTask(GetPlayerPed(ped)) + end + TriggerServerEvent('psmdt-mugshot:server:MDTupload', playerData.citizenid, MugshotArray) + mugshotInProgress = false + end) +end) + +RegisterNUICallback("sendToJail", function(data, cb) + QBCore.Functions.TriggerCallback('ps-mdt:server:MugShotWebhook', function(webhookUrl, apiKey) + local webhookUrl = Config.MugShotWebhook and webhookUrl or 'https://api.fivemerr.com/v1/media/images' + if webhookUrl ~= '' then + local citizenId, sentence = data.citizenId, data.sentence + + -- Gets the player id from the citizenId + local p = promise.new() + QBCore.Functions.TriggerCallback('mdt:server:GetPlayerSourceId', function(result) + p:resolve(result) + end, citizenId) + + local targetSourceId = Citizen.Await(p) + + if sentence > 0 then + if Config.UseCQCMugshot then + TriggerServerEvent('cqc-mugshot:server:triggerSuspect', targetSourceId) + end + Citizen.Wait(5000) + -- Uses qb-policejob JailPlayer event + TriggerServerEvent("police:server:JailPlayer", targetSourceId, sentence) + end + end + end) +end) \ No newline at end of file diff --git a/client/main.lua b/client/main.lua index 86b553c3..a399dd24 100644 --- a/client/main.lua +++ b/client/main.lua @@ -1,899 +1,1120 @@ -QBCore = exports['qb-core']:GetCoreObject() -local PlayerData = {} -local CurrentCops = 0 -local isOpen = false -local callSign = "" -local tablet = 0 -local tabletDict = "amb@code_human_in_bus_passenger_idles@female@tablet@base" -local tabletAnim = "base" -local tabletProp = `prop_cs_tablet` -local tabletBone = 60309 -local tabletOffset = vector3(0.03, 0.002, -0.0) -local tabletRot = vector3(10.0, 160.0, 0.0) - -CreateThread(function() - if GetResourceState('ps-dispatch') == 'started' then - TriggerServerEvent("ps-mdt:dispatchStatus", true) - end -end) - - --- Events from qbcore -RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function() - PlayerData = QBCore.Functions.GetPlayerData() - callSign = PlayerData.metadata.callsign -end) - -RegisterNetEvent('QBCore:Client:OnPlayerUnload', function() - TriggerServerEvent("ps-mdt:server:OnPlayerUnload") - PlayerData = {} -end) - -RegisterNetEvent('QBCore:Client:OnJobUpdate', function(JobInfo) - PlayerData.job = JobInfo -end) - -RegisterNetEvent('QBCore:Client:OnGangUpdate', function(GangInfo) - PlayerData.gang = GangInfo -end) - -RegisterNetEvent("QBCore:Client:SetDuty", function(job, state) - if AllowedJob(job) then - TriggerServerEvent("ps-mdt:server:ToggleDuty") - end -end) - -RegisterNetEvent('police:SetCopCount', function(amount) - CurrentCops = amount -end) - -RegisterNetEvent('QBCore:Player:SetPlayerData', function(val) - PlayerData = val -end) - -AddEventHandler('onResourceStart', function(resourceName) - if GetCurrentResourceName() ~= resourceName then return end - Wait(150) - PlayerData = QBCore.Functions.GetPlayerData() - callSign = PlayerData.metadata.callsign -end) - ---==================================================================================== ------------------------------------------- --- Functions -- ------------------------------------------- ---====================================================================================\ - -RegisterKeyMapping('mdt', 'Open Police MDT', 'keyboard', 'k') - -RegisterCommand('mdt', function() - local plyPed = PlayerPedId() - PlayerData = QBCore.Functions.GetPlayerData() - if not PlayerData.metadata["isdead"] and not PlayerData.metadata["inlaststand"] and not PlayerData.metadata["ishandcuffed"] and not IsPauseMenuActive() then - if GetJobType(PlayerData.job.name) ~= nil then - TriggerServerEvent('mdt:server:openMDT') - end - else - QBCore.Functions.Notify("Can't do that!", "error") - end -end, false) - -Citizen.CreateThread(function() - TriggerEvent('chat:addSuggestion', '/mdt', 'Open the emergency services MDT', {}) -end) - -local function doAnimation() - if not isOpen then return end - -- Animation - RequestAnimDict(tabletDict) - while not HasAnimDictLoaded(tabletDict) do Citizen.Wait(100) end - -- Model - RequestModel(tabletProp) - while not HasModelLoaded(tabletProp) do Citizen.Wait(100) end - - local plyPed = PlayerPedId() - local tabletObj = CreateObject(tabletProp, 0.0, 0.0, 0.0, true, true, false) - local tabletBoneIndex = GetPedBoneIndex(plyPed, tabletBone) - - AttachEntityToEntity(tabletObj, plyPed, tabletBoneIndex, tabletOffset.x, tabletOffset.y, tabletOffset.z, tabletRot.x, tabletRot.y, tabletRot.z, true, false, false, false, 2, true) - SetModelAsNoLongerNeeded(tabletProp) - - CreateThread(function() - while isOpen do - Wait(0) - if not IsEntityPlayingAnim(plyPed, tabletDict, tabletAnim, 3) then - TaskPlayAnim(plyPed, tabletDict, tabletAnim, 3.0, 3.0, -1, 49, 0, 0, 0, 0) - end - end - - - ClearPedSecondaryTask(plyPed) - Citizen.Wait(250) - DetachEntity(tabletObj, true, false) - DeleteEntity(tabletObj) - end) -end - - -local function CurrentDuty(duty) - if duty == 1 then - return "10-41" - end - return "10-42" -end - -local function EnableGUI(enable) - SetNuiFocus(enable, enable) - SendNUIMessage({ type = "show", enable = enable, job = PlayerData.job.name, rosterLink = Config.RosterLink[PlayerData.job.name] }) - isOpen = enable - doAnimation() -end - -local function RefreshGUI() - SetNuiFocus(false, false) - SendNUIMessage({ type = "show", enable = false, job = PlayerData.job.name, rosterLink = Config.RosterLink[PlayerData.job.name] }) - isOpen = false -end - ---// Non local function so above EHs can utilise -function AllowedJob(job) - for key, _ in pairs(Config.AllowedJobs) do - if key == job then - return true - end - end - --// Return false if current job is not in allowed list - return false -end - - ---==================================================================================== ------------------------------------------- --- MAIN PAGE -- ------------------------------------------- ---==================================================================================== - - -RegisterCommand("restartmdt", function(source, args, rawCommand) - RefreshGUI() -end, false) - -RegisterNUICallback("deleteBulletin", function(data, cb) - local id = data.id - TriggerServerEvent('mdt:server:deleteBulletin', id, data.title) - cb(true) -end) - -RegisterNUICallback("newBulletin", function(data, cb) - local title = data.title - local info = data.info - local time = data.time - TriggerServerEvent('mdt:server:NewBulletin', title, info, time) - cb(true) -end) - -RegisterNUICallback('escape', function(data, cb) - EnableGUI(false) - cb(true) -end) - -RegisterNetEvent('mdt:client:dashboardbulletin', function(sentData) - SendNUIMessage({ type = "bulletin", data = sentData }) -end) - -RegisterNetEvent('mdt:client:dashboardWarrants', function() - QBCore.Functions.TriggerCallback("mdt:server:getWarrants", function(data) - if data then - SendNUIMessage({ type = "warrants", data = data }) - end - end) - -- SendNUIMessage({ type = "warrants",}) -end) - -RegisterNUICallback("getAllDashboardData", function(data, cb) - TriggerEvent("mdt:client:dashboardWarrants") - cb(true) -end) - - -RegisterNetEvent('mdt:client:dashboardReports', function(sentData) - SendNUIMessage({ type = "reports", data = sentData }) -end) - -RegisterNetEvent('mdt:client:dashboardCalls', function(sentData) - SendNUIMessage({ type = "calls", data = sentData }) -end) - -RegisterNetEvent('mdt:client:newBulletin', function(ignoreId, sentData, job) - if ignoreId == GetPlayerServerId(PlayerId()) then return end; - if AllowedJob(PlayerData.job.name) then - SendNUIMessage({ type = "newBulletin", data = sentData }) - end -end) - -RegisterNetEvent('mdt:client:deleteBulletin', function(ignoreId, sentData, job) - if ignoreId == GetPlayerServerId(PlayerId()) then return end; - if AllowedJob(PlayerData.job.name) then - SendNUIMessage({ type = "deleteBulletin", data = sentData }) - end -end) - -RegisterNetEvent('mdt:client:open', function(bulletin, activeUnits, calls, cid) - EnableGUI(true) - local x, y, z = table.unpack(GetEntityCoords(PlayerPedId())) - - local currentStreetHash, intersectStreetHash = GetStreetNameAtCoord(x, y, z) - local currentStreetName = GetStreetNameFromHashKey(currentStreetHash) - local intersectStreetName = GetStreetNameFromHashKey(intersectStreetHash) - local zone = tostring(GetNameOfZone(x, y, z)) - local area = GetLabelText(zone) - local playerStreetsLocation = area - - if not zone then zone = "UNKNOWN" end; - - if intersectStreetName ~= nil and intersectStreetName ~= "" then playerStreetsLocation = currentStreetName .. ", " .. intersectStreetName .. ", " .. area - elseif currentStreetName ~= nil and currentStreetName ~= "" then playerStreetsLocation = currentStreetName .. ", " .. area - else playerStreetsLocation = area end - - -- local grade = PlayerData.job.grade.name - - SendNUIMessage({ type = "data", activeUnits = activeUnits, citizenid = cid, ondutyonly = Config.OnlyShowOnDuty, name = "Welcome, " ..PlayerData.job.grade.name..' '..PlayerData.charinfo.lastname:sub(1,1):upper()..PlayerData.charinfo.lastname:sub(2), location = playerStreetsLocation, fullname = PlayerData.charinfo.firstname..' '..PlayerData.charinfo.lastname, bulletin = bulletin }) - SendNUIMessage({ type = "calls", data = calls }) - TriggerEvent("mdt:client:dashboardWarrants") -end) - -RegisterNetEvent('mdt:client:exitMDT', function() - EnableGUI(false) -end) - ---==================================================================================== ------------------------------------------- --- PROFILE PAGE -- ------------------------------------------- ---==================================================================================== - -RegisterNUICallback("searchProfiles", function(data, cb) - local p = promise.new() - - QBCore.Functions.TriggerCallback('mdt:server:SearchProfile', function(result) - p:resolve(result) - end, data.name) - - local data = Citizen.Await(p) - - cb(data) -end) - - -RegisterNetEvent('mdt:client:searchProfile', function(sentData, isLimited) - SendNUIMessage({ type = "profiles", data = sentData, isLimited = isLimited }) -end) - -RegisterNUICallback("saveProfile", function(data, cb) - local profilepic = data.pfp - local information = data.description - local cid = data.id - local fName = data.fName - local sName = data.sName - local tags = data.tags - local gallery = data.gallery - local fingerprint = data.fingerprint - local licenses = data.licenses - - TriggerServerEvent("mdt:server:saveProfile", profilepic, information, cid, fName, sName, tags, gallery, fingerprint, licenses) - cb(true) -end) - -RegisterNUICallback("getProfileData", function(data, cb) - local id = data.id - local p = nil - local getProfileDataPromise = function(data) - if p then return end - p = promise.new() - QBCore.Functions.TriggerCallback('mdt:server:GetProfileData', function(result) - p:resolve(result) - end, data) - return Citizen.Await(p) - end - local pP = nil - local result = getProfileDataPromise(id) - - --[[ local getProfileProperties = function(data) - if pP then return end - pP = promise.new() - QBCore.Functions.TriggerCallback('qb-phone:server:MeosGetPlayerHouses', function(result) - pP:resolve(result) - end, data) - return Citizen.Await(pP) - end - local propertiesResult = getProfileProperties(id) - result.properties = propertiesResult - ]] - local vehicles=result.vehicles - for i=1,#vehicles do - local vehicle=result.vehicles[i] - result.vehicles[i]['model'] = GetLabelText(GetDisplayNameFromVehicleModel(vehicle['vehicle'])) - end - p = nil - return cb(result) -end) - -RegisterNUICallback("newTag", function(data, cb) - if data.id ~= "" and data.tag ~= "" then - TriggerServerEvent('mdt:server:newTag', data.id, data.tag) - end - cb(true) -end) - -RegisterNUICallback("removeProfileTag", function(data, cb) - local cid = data.cid - local tagtext = data.text - TriggerServerEvent('mdt:server:removeProfileTag', cid, tagtext) - cb(true) -end) - -RegisterNUICallback("updateLicence", function(data, cb) - local type = data.type - local status = data.status - local cid = data.cid - TriggerServerEvent('mdt:server:updateLicense', cid, type, status) - cb(true) -end) - -RegisterNUICallback("searchIncidents", function(data, cb) - local incident = data.incident - TriggerServerEvent('mdt:server:searchIncidents', incident) - cb(true) -end) - -RegisterNUICallback("getIncidentData", function(data, cb) - local id = data.id - TriggerServerEvent('mdt:server:getIncidentData', id) - cb(true) -end) - -RegisterNUICallback("incidentSearchPerson", function(data, cb) - local name = data.name - TriggerServerEvent('mdt:server:incidentSearchPerson', name ) - cb(true) -end) - -RegisterNetEvent('mdt:client:getProfileData', function(sentData, isLimited) - if not isLimited then - local vehicles = sentData['vehicles'] - for i=1, #vehicles do - sentData['vehicles'][i]['plate'] = string.upper(sentData['vehicles'][i]['plate']) - local tempModel = vehicles[i]['model'] - if tempModel and tempModel ~= "Unknown" then - local DisplayNameModel = GetDisplayNameFromVehicleModel(tempModel) - local LabelText = GetLabelText(DisplayNameModel) - if LabelText == "NULL" then LabelText = DisplayNameModel end - sentData['vehicles'][i]['model'] = LabelText - end - end - end - SendNUIMessage({ type = "profileData", data = sentData, isLimited = isLimited }) -end) - -RegisterNetEvent('mdt:client:getIncidents', function(sentData) - SendNUIMessage({ type = "incidents", data = sentData }) -end) - -RegisterNetEvent('mdt:client:getIncidentData', function(sentData, sentConvictions) - SendNUIMessage({ type = "incidentData", data = sentData, convictions = sentConvictions }) -end) - -RegisterNetEvent('mdt:client:incidentSearchPerson', function(sentData) - SendNUIMessage({ type = "incidentSearchPerson", data = sentData }) -end) - - -RegisterNUICallback('SetHouseLocation', function(data, cb) - local coords = {} - for word in data.coord[1]:gmatch('[^,%s]+') do - coords[#coords+1] = tonumber(word) - end - SetNewWaypoint(coords[1], coords[2]) - QBCore.Functions.Notify('GPS has been set!', 'success') -end) - ---==================================================================================== ------------------------------------------- --- BOLO PAGE -- ------------------------------------------- ---==================================================================================== - -RegisterNUICallback("searchBolos", function(data, cb) - local searchVal = data.searchVal - TriggerServerEvent('mdt:server:searchBolos', searchVal) - cb(true) -end) - -RegisterNUICallback("getAllBolos", function(data, cb) - TriggerServerEvent('mdt:server:getAllBolos') - cb(true) -end) - -RegisterNUICallback("getAllIncidents", function(data, cb) - TriggerServerEvent('mdt:server:getAllIncidents') - cb(true) -end) - -RegisterNUICallback("getBoloData", function(data, cb) - local id = data.id - TriggerServerEvent('mdt:server:getBoloData', id) - cb(true) -end) - -RegisterNUICallback("newBolo", function(data, cb) - local existing = data.existing - local id = data.id - local title = data.title - local plate = data.plate - local owner = data.owner - local individual = data.individual - local detail = data.detail - local tags = data.tags - local gallery = data.gallery - local officers = data.officers - local time = data.time - TriggerServerEvent('mdt:server:newBolo', existing, id, title, plate, owner, individual, detail, tags, gallery, officers, time) - cb(true) -end) - -RegisterNUICallback("deleteBolo", function(data, cb) - local id = data.id - TriggerServerEvent('mdt:server:deleteBolo', id) - cb(true) -end) - -RegisterNUICallback("deleteICU", function(data, cb) - local id = data.id - TriggerServerEvent('mdt:server:deleteICU', id) - cb(true) -end) - -RegisterNetEvent('mdt:client:getBolos', function(sentData) - SendNUIMessage({ type = "bolos", data = sentData }) -end) - -RegisterNetEvent('mdt:client:getAllIncidents', function(sentData) - SendNUIMessage({ type = "incidents", data = sentData }) -end) - -RegisterNetEvent('mdt:client:getAllBolos', function(sentData) - SendNUIMessage({ type = "bolos", data = sentData }) -end) - -RegisterNetEvent('mdt:client:getBoloData', function(sentData) - SendNUIMessage({ type = "boloData", data = sentData }) -end) - -RegisterNetEvent('mdt:client:boloComplete', function(sentData) - SendNUIMessage({ type = "boloComplete", data = sentData }) -end) - ---==================================================================================== ------------------------------------------- --- REPORTS PAGE -- ------------------------------------------- ---==================================================================================== - -RegisterNUICallback("getAllReports", function(data, cb) - TriggerServerEvent('mdt:server:getAllReports') - cb(true) -end) - -RegisterNUICallback("getReportData", function(data, cb) - local id = data.id - TriggerServerEvent('mdt:server:getReportData', id) - cb(true) -end) - -RegisterNUICallback("searchReports", function(data, cb) - local name = data.name - TriggerServerEvent('mdt:server:searchReports', name) - cb(true) -end) - -RegisterNUICallback("newReport", function(data, cb) - local existing = data.existing - local id = data.id - local title = data.title - local reporttype = data.type - local details = data.details - local tags = data.tags - local gallery = data.gallery - local officers = data.officers - local civilians = data.civilians - local time = data.time - - TriggerServerEvent('mdt:server:newReport', existing, id, title, reporttype, details, tags, gallery, officers, civilians, time) - cb(true) -end) - -RegisterNetEvent('mdt:client:getAllReports', function(sentData) - SendNUIMessage({ type = "reports", data = sentData }) -end) - -RegisterNetEvent('mdt:client:getReportData', function(sentData) - SendNUIMessage({ type = "reportData", data = sentData }) -end) - -RegisterNetEvent('mdt:client:reportComplete', function(sentData) - SendNUIMessage({ type = "reportComplete", data = sentData }) -end) - ---==================================================================================== ------------------------------------------- --- DMV PAGE -- ------------------------------------------- ---==================================================================================== -RegisterNUICallback("searchVehicles", function(data, cb) - - local p = promise.new() - - QBCore.Functions.TriggerCallback('mdt:server:SearchVehicles', function(result) - p:resolve(result) - end, data.name) - - local result = Citizen.Await(p) - for i=1, #result do - local vehicle = result[i] - local mods = json.decode(result[i].mods) - result[i]['plate'] = string.upper(result[i]['plate']) - result[i]['color'] = Config.ColorInformation[mods['color1']] - result[i]['colorName'] = Config.ColorNames[mods['color1']] - result[i]['model'] = GetLabelText(GetDisplayNameFromVehicleModel(vehicle['vehicle'])) - end - cb(result) - -end) - -RegisterNUICallback("getVehicleData", function(data, cb) - local plate = data.plate - TriggerServerEvent('mdt:server:getVehicleData', plate) - cb(true) -end) - -RegisterNUICallback("saveVehicleInfo", function(data, cb) - local dbid = data.dbid - local plate = data.plate - local imageurl = data.imageurl - local notes = data.notes - local stolen = data.stolen - local code5 = data.code5 - local impound = data.impound - local JobType = GetJobType(PlayerData.job.name) - if JobType == 'police' and impound.impoundChanged == true then - if impound.impoundActive then - local found = 0 - local plate = string.upper(string.gsub(data['plate'], "^%s*(.-)%s*$", "%1")) - local vehicles = GetGamePool('CVehicle') - - for k,v in pairs(vehicles) do - local plt = string.upper(string.gsub(GetVehicleNumberPlateText(v), "^%s*(.-)%s*$", "%1")) - if plt == plate then - local dist = #(GetEntityCoords(PlayerPedId()) - GetEntityCoords(v)) - if dist < 5.0 then - found = VehToNet(v) - SendNUIMessage({ type = "greenImpound" }) - TriggerServerEvent('mdt:server:saveVehicleInfo', dbid, plate, imageurl, notes, stolen, code5, impound) - end - break - end - end - - if found == 0 then - QBCore.Functions.Notify('Vehicle not found!', 'error') - SendNUIMessage({ type = "redImpound" }) - end - else - local ped = PlayerPedId() - local playerPos = GetEntityCoords(ped) - for k, v in pairs(Config.ImpoundLocations) do - if (#(playerPos - vector3(v.x, v.y, v.z)) < 20.0) then - impound.CurrentSelection = k - TriggerServerEvent('mdt:server:saveVehicleInfo', dbid, plate, imageurl, notes, stolen, code5, impound) - break - end - end - end - else - TriggerServerEvent('mdt:server:saveVehicleInfo', dbid, plate, imageurl, notes, stolen, code5, impound) - end - cb(true) -end) - -RegisterNUICallback("getAllLogs", function(data, cb) - TriggerServerEvent('mdt:server:getAllLogs') - cb(true) -end) - -RegisterNUICallback("getPenalCode", function(data, cb) - TriggerServerEvent('mdt:server:getPenalCode') - cb(true) -end) - -RegisterNUICallback("toggleDuty", function(data, cb) - TriggerServerEvent('QBCore:ToggleDuty') - cb(true) -end) - -RegisterNUICallback("setCallsign", function(data, cb) - TriggerServerEvent('mdt:server:setCallsign', data.cid, data.newcallsign) - cb(true) -end) - -RegisterNUICallback("setRadio", function(data, cb) - TriggerServerEvent('mdt:server:setRadio', data.cid, data.newradio) - cb(true) -end) - -RegisterNUICallback("saveIncident", function(data, cb) - TriggerServerEvent('mdt:server:saveIncident', data.ID, data.title, data.information, data.tags, data.officers, data.civilians, data.evidence, data.associated, data.time) - cb(true) -end) - -RegisterNUICallback("removeIncidentCriminal", function(data, cb) - TriggerServerEvent('mdt:server:removeIncidentCriminal', data.cid, data.incidentId) - cb(true) -end) - -RegisterNetEvent('mdt:client:getVehicleData', function(sentData) - if sentData and sentData[1] then - local vehicle = sentData[1] - local vehData = json.decode(vehicle['vehicle']) - vehicle['color'] = Config.ColorInformation[vehicle['color1']] - vehicle['colorName'] = Config.ColorNames[vehicle['color1']] - vehicle['model'] = GetLabelText(GetDisplayNameFromVehicleModel(vehicle['vehicle'])) - vehicle['class'] = Config.ClassList[GetVehicleClassFromName(vehicle['vehicle'])] - vehicle['vehicle'] = nil - SendNUIMessage({ type = "getVehicleData", data = vehicle }) - end -end) - -RegisterNetEvent('mdt:client:updateVehicleDbId', function(sentData) - SendNUIMessage({ type = "updateVehicleDbId", data = tonumber(sentData) }) -end) - -RegisterNetEvent('mdt:client:getAllLogs', function(sentData) - SendNUIMessage({ type = "getAllLogs", data = sentData }) -end) - -RegisterNetEvent('mdt:client:getPenalCode', function(titles, penalcode) - SendNUIMessage({ type = "getPenalCode", titles = titles, penalcode = penalcode }) -end) - -RegisterNetEvent('mdt:client:setRadio', function(radio) - if type(tonumber(radio)) == "number" then - exports["pma-voice"]:setVoiceProperty("radioEnabled", true) - exports["pma-voice"]:setRadioChannel(tonumber(radio)) - QBCore.Functions.Notify("You have set your radio frequency to "..radio..".", "success") - else - QBCore.Functions.Notify("Invalid Station(Please enter a number)", "error") - end -end) - -RegisterNetEvent('mdt:client:sig100', function(radio, type) - local job = PlayerData.job.name - local duty = PlayerData.job.onduty - if AllowedJob(job) and duty == 1 then - if type == true then - exports['erp_notifications']:PersistentAlert("START", "signall100-"..radio, "inform", "Radio "..radio.." is currently signal 100!") - end - end - if not type then - exports['erp_notifications']:PersistentAlert("END", "signall100-"..radio) - end -end) - -RegisterNetEvent('mdt:client:updateCallsign', function(callsign) - callSign = tostring(callsign) -end) - -RegisterNetEvent('mdt:client:updateIncidentDbId', function(sentData) - SendNUIMessage({ type = "updateIncidentDbId", data = tonumber(sentData) }) -end) - - ---==================================================================================== ------------------------------------------- --- DISPATCH PAGE -- ------------------------------------------- ---==================================================================================== - -RegisterNetEvent('dispatch:clNotify', function(sNotificationData, sNotificationId) - if LocalPlayer.state.isLoggedIn then - sNotificationData.playerJob = PlayerData.job.name - SendNUIMessage({ type = "call", data = sNotificationData }) - end -end) - -RegisterNUICallback("setWaypoint", function(data, cb) - TriggerServerEvent('mdt:server:setWaypoint', data.callid) - cb(true) -end) - -RegisterNUICallback("callDetach", function(data, cb) - TriggerServerEvent('mdt:server:callDetach', data.callid) - cb(true) -end) - -RegisterNUICallback("removeCallBlip", function(data, cb) - TriggerEvent('ps-dispatch:client:removeCallBlip', data.callid) - cb(true) -end) - -RegisterNUICallback("callAttach", function(data, cb) - TriggerServerEvent('mdt:server:callAttach', data.callid) - cb(true) -end) - -RegisterNUICallback("attachedUnits", function(data, cb) - TriggerServerEvent('mdt:server:attachedUnits', data.callid) - cb(true) -end) - -RegisterNUICallback("callDispatchDetach", function(data, cb) - TriggerServerEvent('mdt:server:callDispatchDetach', data.callid, data.cid) - cb(true) -end) - -RegisterNUICallback("setDispatchWaypoint", function(data, cb) - TriggerServerEvent('mdt:server:setDispatchWaypoint', data.callid, data.cid) - cb(true) -end) - -RegisterNUICallback("callDragAttach", function(data, cb) - TriggerServerEvent('mdt:server:callDragAttach', data.callid, data.cid) - cb(true) -end) - -RegisterNUICallback("setWaypointU", function(data, cb) - TriggerServerEvent('mdt:server:setWaypoint:unit', data.cid) - cb(true) -end) - -RegisterNUICallback("dispatchMessage", function(data, cb) - TriggerServerEvent('mdt:server:sendMessage', data.message, data.time) - cb(true) -end) - -RegisterNUICallback("refreshDispatchMsgs", function(data, cb) - TriggerServerEvent('mdt:server:refreshDispatchMsgs') - cb(true) -end) - -RegisterNUICallback("dispatchNotif", function(data, cb) - local info = data['data'] - local mentioned = false - if callSign ~= "" then if string.find(string.lower(info['message']),string.lower(string.gsub(callSign,'-','%%-'))) then mentioned = true end end - if mentioned then - - -- Send notification to phone?? - TriggerEvent('erp_phone:sendNotification', {img = info['profilepic'], title = "Dispatch (Mention)", content = info['message'], time = 7500, customPic = true }) - - PlaySoundFrontend(-1, "SELECT", "HUD_FRONTEND_DEFAULT_SOUNDSET", false) - PlaySoundFrontend(-1, "Event_Start_Text", "GTAO_FM_Events_Soundset", 0) - else - TriggerEvent('erp_phone:sendNotification', {img = info['profilepic'], title = "Dispatch ("..info['name']..")", content = info['message'], time = 5000, customPic = true }) - end - cb(true) -end) - -RegisterNUICallback("getCallResponses", function(data, cb) - TriggerServerEvent('mdt:server:getCallResponses', data.callid) - cb(true) -end) - -RegisterNUICallback("sendCallResponse", function(data, cb) - TriggerServerEvent('mdt:server:sendCallResponse', data.message, data.time, data.callid) - cb(true) -end) - ---[[ RegisterNUICallback("impoundVehicle", function(data, cb) - local JobType = GetJobType(PlayerData.job.name) - if JobType == 'police' then - local found = 0 - local plate = string.upper(string.gsub(data['plate'], "^%s*(.-)%s*$", "%1")) - local vehicles = GetGamePool('CVehicle') - - for k,v in pairs(vehicles) do - local plt = string.upper(string.gsub(GetVehicleNumberPlateText(v), "^%s*(.-)%s*$", "%1")) - if plt == plate then - local dist = #(GetEntityCoords(PlayerPedId()) - GetEntityCoords(v)) - if dist < 5.0 then - found = VehToNet(v) - end - break - end - end - - if found == 0 then - QBCore.Functions.Notify('Vehicle not found!', 'error') - return - end - - SendNUIMessage({ type = "greenShit" }) - TriggerServerEvent('mdt:server:impoundVehicle', data, found) - cb('ok') - end -end) ]] - -RegisterNUICallback("removeImpound", function(data, cb) - local ped = PlayerPedId() - local playerPos = GetEntityCoords(ped) - for k, v in pairs(Config.ImpoundLocations) do - if (#(playerPos - vector3(v.x, v.y, v.z)) < 20.0) then - TriggerServerEvent('mdt:server:removeImpound', data['plate'], k) - break - end - end - cb('ok') -end) - -RegisterNUICallback("statusImpound", function(data, cb) - TriggerServerEvent('mdt:server:statusImpound', data['plate']) - cb('ok') -end) - -RegisterNUICallback('openCamera', function(data) - local camId = tonumber(data.cam) - TriggerEvent('police:client:ActiveCamera', camId) -end) - -RegisterNetEvent('mdt:client:attachedUnits', function(sentData, callid) - SendNUIMessage({ type = "attachedUnits", data = sentData, callid = callid }) -end) - -RegisterNetEvent('mdt:client:setWaypoint', function(callInformation) - SetNewWaypoint(callInformation['origin']['x'], callInformation['origin']['y']) -end) - -RegisterNetEvent('mdt:client:callDetach', function(callid, sentData) - local job = PlayerData.job.name - if AllowedJob(job) then - SendNUIMessage({ type = "callDetach", callid = callid, data = tonumber(sentData) }) - end -end) -RegisterNetEvent('mdt:client:callAttach', function(callid, sentData) - local job = PlayerData.job.name - if AllowedJob(job) then - SendNUIMessage({ type = "callAttach", callid = callid, data = tonumber(sentData) }) - end -end) - -RegisterNetEvent('mdt:client:setWaypoint:unit', function(sentData) - SetNewWaypoint(sentData.x, sentData.y) -end) - -RegisterNetEvent('mdt:client:dashboardMessage', function(sentData) - local job = PlayerData.job.name - if AllowedJob(job) then - SendNUIMessage({ type = "dispatchmessage", data = sentData }) - end -end) - -RegisterNetEvent('mdt:client:dashboardMessages', function(sentData) - SendNUIMessage({ type = "dispatchmessages", data = sentData }) -end) - -RegisterNetEvent('mdt:client:getCallResponses', function(sentData, sentCallId) - SendNUIMessage({ type = "getCallResponses", data = sentData, callid = sentCallId }) -end) - -RegisterNetEvent('mdt:client:sendCallResponse', function(message, time, callid, name) - SendNUIMessage({ type = "sendCallResponse", message = message, time = time, callid = callid, name = name }) -end) - -RegisterNetEvent('mdt:client:notifyMechanics', function(sentData) - --[[if exports["erp-jobsystem"]:CanTow() then - TriggerServerEvent('erp-sounds:PlayWithinDistance', 1.5, 'beep', 0.4) - TriggerEvent('erp_phone:sendNotification', {img = 'vehiclenotif.png', title = "Impound", content = "New vehicle is ready to be impounded!", time = 5000 }) - end]] -end) - -RegisterNetEvent('mdt:client:statusImpound', function(data, plate) - SendNUIMessage({ type = "statusImpound", data = data, plate = plate }) -end) +QBCore = exports['qb-core']:GetCoreObject() +local PlayerData = {} +local CurrentCops = 0 +local isOpen = false +local callSign = "" +local tabletObj = nil +local tabletDict = "amb@code_human_in_bus_passenger_idles@female@tablet@base" +local tabletAnim = "base" +local tabletProp = `prop_cs_tablet` +local tabletBone = 60309 +local tabletOffset = vector3(0.03, 0.002, -0.0) +local tabletRot = vector3(10.0, 160.0, 0.0) +local coolDown = false +local lastVeh = nil +local lastPlate = nil + +CreateThread(function() + if GetResourceState('ps-dispatch') == 'started' then + TriggerServerEvent("ps-mdt:dispatchStatus", true) + end +end) + + +-- Events from qbcore +RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function() + PlayerData = QBCore.Functions.GetPlayerData() + callSign = PlayerData.metadata.callsign +end) + +RegisterNetEvent('QBCore:Client:OnPlayerUnload', function() + TriggerServerEvent("ps-mdt:server:OnPlayerUnload") + PlayerData = {} +end) + +RegisterNetEvent('QBCore:Client:OnJobUpdate', function(JobInfo) + PlayerData.job = JobInfo +end) + +RegisterNetEvent('QBCore:Client:OnGangUpdate', function(GangInfo) + PlayerData.gang = GangInfo +end) + +RegisterNetEvent("QBCore:Client:SetDuty", function(job, state) + if AllowedJob(job) then + TriggerServerEvent("ps-mdt:server:ToggleDuty") + TriggerServerEvent("ps-mdt:server:ClockSystem") + TriggerServerEvent('QBCore:ToggleDuty') + if PlayerData.job.name == "police" or PlayerData.job.type == "leo" then + TriggerServerEvent("police:server:UpdateCurrentCops") + end + if (PlayerData.job.name == "ambulance" or PlayerData.job.type == "ems") and job then + TriggerServerEvent('hospital:server:AddDoctor', 'ambulance') + elseif (PlayerData.job.name == "ambulance" or PlayerData.job.type == "ems") and not job then + TriggerServerEvent('hospital:server:RemoveDoctor', 'ambulance') + end + TriggerServerEvent("police:server:UpdateBlips") + end +end) + +RegisterNetEvent('police:SetCopCount', function(amount) + CurrentCops = amount +end) + +RegisterNetEvent('QBCore:Player:SetPlayerData', function(val) + PlayerData = val +end) + +AddEventHandler('onResourceStart', function(resourceName) + if GetCurrentResourceName() ~= resourceName then return end + Wait(150) + PlayerData = QBCore.Functions.GetPlayerData() + callSign = PlayerData.metadata.callsign +end) + +AddEventHandler('onResourceStop', function(resourceName) + if (GetCurrentResourceName() ~= resourceName) then return end + ClearPedSecondaryTask(PlayerPedId()) + SetEntityAsMissionEntity(tabletObj) + DetachEntity(tabletObj, true, false) + DeleteObject(tabletObj) +end) + +--==================================================================================== +------------------------------------------ +-- Functions -- +------------------------------------------ +--====================================================================================\ + +RegisterKeyMapping('mdt', 'Open Police MDT', 'keyboard', 'k') + +RegisterCommand('mdt', function() + local plyPed = PlayerPedId() + PlayerData = QBCore.Functions.GetPlayerData() + if not PlayerData.metadata["isdead"] and not PlayerData.metadata["inlaststand"] and not PlayerData.metadata["ishandcuffed"] and not IsPauseMenuActive() then + if GetJobType(PlayerData.job.name) ~= nil then + TriggerServerEvent('mdt:server:openMDT') + TriggerServerEvent('mdt:requestOfficerData') + end + else + QBCore.Functions.Notify("Can't do that!", "error") + end +end, false) + +Citizen.CreateThread(function() + TriggerEvent('chat:addSuggestion', '/mdt', 'Open the emergency services MDT', {}) +end) + +local function doAnimation() + if not isOpen then return end + -- Animation + RequestAnimDict(tabletDict) + while not HasAnimDictLoaded(tabletDict) do Citizen.Wait(100) end + -- Model + RequestModel(tabletProp) + while not HasModelLoaded(tabletProp) do Citizen.Wait(100) end + + local plyPed = PlayerPedId() + tabletObj = CreateObject(tabletProp, 0.0, 0.0, 0.0, true, true, false) + local tabletBoneIndex = GetPedBoneIndex(plyPed, tabletBone) + + AttachEntityToEntity(tabletObj, plyPed, tabletBoneIndex, tabletOffset.x, tabletOffset.y, tabletOffset.z, tabletRot.x, tabletRot.y, tabletRot.z, true, false, false, false, 2, true) + SetModelAsNoLongerNeeded(tabletProp) + + CreateThread(function() + while isOpen do + Wait(0) + if not IsEntityPlayingAnim(plyPed, tabletDict, tabletAnim, 3) then + TaskPlayAnim(plyPed, tabletDict, tabletAnim, 3.0, 3.0, -1, 49, 0, 0, 0, 0) + end + end + + + ClearPedSecondaryTask(plyPed) + Citizen.Wait(250) + DetachEntity(tabletObj, true, false) + DeleteEntity(tabletObj) + end) +end + + +local function CurrentDuty(duty) + if duty == 1 then + return "10-41" + end + return "10-42" +end + +local function EnableGUI(enable) + SetNuiFocus(enable, enable) + SendNUIMessage({ type = "show", enable = enable, job = PlayerData.job.name, jobType = PlayerData.job.type, rosterLink = Config.RosterLink[PlayerData.job.name], sopLink = Config.sopLink[PlayerData.job.name] }) + isOpen = enable + doAnimation() +end + +local function RefreshGUI() + SetNuiFocus(false, false) + SendNUIMessage({ type = "show", enable = false, job = PlayerData.job.name, jobType = PlayerData.job.type, rosterLink = Config.RosterLink[PlayerData.job.name], sopLink = Config.sopLink[PlayerData.job.name] }) + isOpen = false +end + +--// Non local function so above EHs can utilise +function AllowedJob(job) + for key, _ in pairs(Config.AllowedJobs) do + if key == job then + return true + end + end + --// Return false if current job is not in allowed list + return false +end + + +--==================================================================================== +------------------------------------------ +-- MAIN PAGE -- +------------------------------------------ +--==================================================================================== + + +RegisterCommand("restartmdt", function(source, args, rawCommand) + RefreshGUI() +end, false) + +RegisterNUICallback("deleteBulletin", function(data, cb) + local id = data.id + TriggerServerEvent('mdt:server:deleteBulletin', id, data.title) + cb(true) +end) + +RegisterNUICallback("newBulletin", function(data, cb) + local title = data.title + local info = data.info + local time = data.time + TriggerServerEvent('mdt:server:NewBulletin', title, info, time) + cb(true) +end) + +RegisterNUICallback('escape', function(data, cb) + EnableGUI(false) + cb(true) +end) + +RegisterNetEvent('mdt:client:dashboardbulletin', function(sentData) + SendNUIMessage({ type = "bulletin", data = sentData }) +end) + +RegisterNetEvent('mdt:client:dashboardWarrants', function() + QBCore.Functions.TriggerCallback("mdt:server:getWarrants", function(data) + if data then + SendNUIMessage({ type = "warrants", data = data }) + end + end) + -- SendNUIMessage({ type = "warrants",}) +end) + +RegisterNUICallback("getAllDashboardData", function(data, cb) + TriggerEvent("mdt:client:dashboardWarrants") + cb(true) +end) + + +RegisterNetEvent('mdt:client:dashboardReports', function(sentData) + SendNUIMessage({ type = "reports", data = sentData }) +end) + +RegisterNetEvent('mdt:client:dashboardCalls', function(sentData) + SendNUIMessage({ type = "calls", data = sentData }) +end) + +RegisterNetEvent('mdt:client:newBulletin', function(ignoreId, sentData, job) + if ignoreId == GetPlayerServerId(PlayerId()) then return end; + if AllowedJob(PlayerData.job.name) then + SendNUIMessage({ type = "newBulletin", data = sentData }) + end +end) + +RegisterNetEvent('mdt:client:deleteBulletin', function(ignoreId, sentData, job) + if ignoreId == GetPlayerServerId(PlayerId()) then return end; + if AllowedJob(PlayerData.job.name) then + SendNUIMessage({ type = "deleteBulletin", data = sentData }) + end +end) + +RegisterNetEvent('mdt:client:open', function(bulletin, activeUnits, calls, cid) + EnableGUI(true) + local x, y, z = table.unpack(GetEntityCoords(PlayerPedId())) + + local currentStreetHash, intersectStreetHash = GetStreetNameAtCoord(x, y, z) + local currentStreetName = GetStreetNameFromHashKey(currentStreetHash) + local intersectStreetName = GetStreetNameFromHashKey(intersectStreetHash) + local zone = tostring(GetNameOfZone(x, y, z)) + local area = GetLabelText(zone) + local playerStreetsLocation = area + + if not zone then zone = "UNKNOWN" end; + + if intersectStreetName ~= nil and intersectStreetName ~= "" then playerStreetsLocation = currentStreetName .. ", " .. intersectStreetName .. ", " .. area + elseif currentStreetName ~= nil and currentStreetName ~= "" then playerStreetsLocation = currentStreetName .. ", " .. area + else playerStreetsLocation = area end + + -- local grade = PlayerData.job.grade.name + + SendNUIMessage({ type = "data", activeUnits = activeUnits, citizenid = cid, ondutyonly = Config.OnlyShowOnDuty, name = "Welcome, " ..PlayerData.job.grade.name..' '..PlayerData.charinfo.lastname:sub(1,1):upper()..PlayerData.charinfo.lastname:sub(2), location = playerStreetsLocation, fullname = PlayerData.charinfo.firstname..' '..PlayerData.charinfo.lastname, bulletin = bulletin }) + SendNUIMessage({ type = "calls", data = calls }) + TriggerEvent("mdt:client:dashboardWarrants") +end) + +RegisterNetEvent('mdt:client:exitMDT', function() + EnableGUI(false) +end) + +--==================================================================================== +------------------------------------------ +-- PROFILE PAGE -- +------------------------------------------ +--==================================================================================== + +RegisterNUICallback("searchProfiles", function(data, cb) + local p = promise.new() + + QBCore.Functions.TriggerCallback('mdt:server:SearchProfile', function(result) + p:resolve(result) + end, data.name) + + local data = Citizen.Await(p) + + cb(data) +end) + + +RegisterNetEvent('mdt:client:searchProfile', function(sentData, isLimited) + SendNUIMessage({ action = "updateFingerprintData" }) +end) + +RegisterNUICallback("saveProfile", function(data, cb) + local profilepic = data.pfp + local information = data.description + local cid = data.id + local fName = data.fName + local sName = data.sName + local tags = data.tags + local gallery = data.gallery + local licenses = data.licenses + local fingerprint = data.fingerprint + TriggerServerEvent("mdt:server:saveProfile", profilepic, information, cid, fName, sName, tags, gallery, licenses, fingerprint) + cb(true) +end) + + +RegisterNUICallback("getProfileData", function(data, cb) + local id = data.id + local p = nil + local getProfileDataPromise = function(data) + if p then return end + p = promise.new() + QBCore.Functions.TriggerCallback('mdt:server:GetProfileData', function(result) + p:resolve(result) + end, data) + return Citizen.Await(p) + end + local pP = nil + local result = getProfileDataPromise(id) + local vehicles = result.vehicles + local licenses = result.licences + + for i=1,#vehicles do + local vehicle=result.vehicles[i] + local vehData = QBCore.Shared.Vehicles[vehicle['vehicle']] + + if vehData == nil then + print("Vehicle not found for profile:", vehicle['vehicle']) -- Do not remove print, is a guide for a nil error. + print("Make sure the profile you're trying to load has all cars added to the core under vehicles.lua.") -- Do not remove print, is a guide for a nil error. + else + result.vehicles[i]['model'] = vehData["name"] + end + end + p = nil + + result['fingerprint'] = result['searchFingerprint'] + return cb(result) +end) + +RegisterNUICallback("newTag", function(data, cb) + if data.id ~= "" and data.tag ~= "" then + TriggerServerEvent('mdt:server:newTag', data.id, data.tag) + end + cb(true) +end) + +RegisterNUICallback("removeProfileTag", function(data, cb) + local cid = data.cid + local tagtext = data.text + TriggerServerEvent('mdt:server:removeProfileTag', cid, tagtext) + cb(true) +end) + +RegisterNUICallback("updateLicence", function(data, cb) + local type = data.type + local status = data.status + local cid = data.cid + TriggerServerEvent('mdt:server:updateLicense', cid, type, status) + cb(true) +end) + +--==================================================================================== +------------------------------------------ +-- INCIDENTS PAGE -- +------------------------------------------ +--==================================================================================== + +RegisterNUICallback("searchIncidents", function(data, cb) + local incident = data.incident + TriggerServerEvent('mdt:server:searchIncidents', incident) + cb(true) +end) + +RegisterNUICallback("getIncidentData", function(data, cb) + local id = data.id + TriggerServerEvent('mdt:server:getIncidentData', id) + cb(true) +end) + +RegisterNUICallback("incidentSearchPerson", function(data, cb) + local name = data.name + TriggerServerEvent('mdt:server:incidentSearchPerson', name ) + cb(true) +end) + +-- Handle sending a fine to a player +-- Uses the QB-Core bill command to send a fine to a player +-- If you use a different fine system, you will need to change this +RegisterNUICallback("sendFine", function(data, cb) + local citizenId, fine, incidentId = data.citizenId, data.fine, data.incidentId + + -- Gets the player id from the citizenId + local p = promise.new() + QBCore.Functions.TriggerCallback('mdt:server:GetPlayerSourceId', function(result) + p:resolve(result) + end, citizenId) + + local targetSourceId = Citizen.Await(p) + + if fine > 0 then + if Config.BillVariation then + -- Uses QB-Core removeMoney Functions + TriggerServerEvent("mdt:server:removeMoney", citizenId, fine, incidentId) + else + -- Uses QB-Core /bill command + ExecuteCommand(('bill %s %s'):format(targetSourceId, fine)) + TriggerServerEvent("mdt:server:giveCitationItem", citizenId, fine, incidentId) + end + end +end) + +-- Handle sending the player to community service +-- If you use a different community service system, you will need to change this +RegisterNUICallback("sendToCommunityService", function(data, cb) + local citizenId, sentence = data.citizenId, data.sentence + + -- Gets the player id from the citizenId + local p = promise.new() + QBCore.Functions.TriggerCallback('mdt:server:GetPlayerSourceId', function(result) + p:resolve(result) + end, citizenId) + + local targetSourceId = Citizen.Await(p) + + if sentence > 0 then + TriggerServerEvent("qb-communityservice:server:StartCommunityService", targetSourceId, sentence) + end +end) + +RegisterNetEvent('mdt:client:getProfileData', function(sentData, isLimited) + if not isLimited then + local vehicles = sentData['vehicles'] + for i=1, #vehicles do + sentData['vehicles'][i]['plate'] = string.upper(sentData['vehicles'][i]['plate']) + local tempModel = vehicles[i]['model'] + if tempModel and tempModel ~= "Unknown" then + local vehData = QBCore.Shared.Vehicles[tempModel] + sentData['vehicles'][i]['model'] = vehData["brand"] .. ' ' .. vehData["name"] + end + end + end + SendNUIMessage({ type = "profileData", data = sentData, isLimited = isLimited }) +end) + +RegisterNetEvent('mdt:client:getIncidents', function(sentData) + SendNUIMessage({ type = "incidents", data = sentData }) +end) + +RegisterNetEvent('mdt:client:getIncidentData', function(sentData, sentConvictions) + SendNUIMessage({ type = "incidentData", data = sentData, convictions = sentConvictions }) +end) + +RegisterNetEvent('mdt:client:incidentSearchPerson', function(sentData) + SendNUIMessage({ type = "incidentSearchPerson", data = sentData }) +end) + + +RegisterNUICallback('SetHouseLocation', function(data, cb) + local coords = {} + for word in data.coord[1]:gmatch('[^,%s]+') do + coords[#coords+1] = tonumber(word) + end + SetNewWaypoint(coords[1], coords[2]) + QBCore.Functions.Notify('GPS has been set!', 'success') +end) + +--==================================================================================== +------------------------------------------ +-- Dispatch Calls Page -- +------------------------------------------ +--==================================================================================== + +RegisterNUICallback("searchCalls", function(data, cb) + local searchCall = data.searchCall + TriggerServerEvent('mdt:server:searchCalls', searchCall) + cb(true) +end) + +RegisterNetEvent('mdt:client:getCalls', function(calls, callid) + SendNUIMessage({ type = "calls", data = calls }) +end) + +--==================================================================================== +------------------------------------------ +-- BOLO PAGE -- +------------------------------------------ +--==================================================================================== + +RegisterNUICallback("searchBolos", function(data, cb) + local searchVal = data.searchVal + TriggerServerEvent('mdt:server:searchBolos', searchVal) + cb(true) +end) + +RegisterNUICallback("getAllBolos", function(data, cb) + TriggerServerEvent('mdt:server:getAllBolos') + cb(true) +end) + +RegisterNUICallback("getAllIncidents", function(data, cb) + TriggerServerEvent('mdt:server:getAllIncidents') + cb(true) +end) + +RegisterNUICallback("getBoloData", function(data, cb) + local id = data.id + TriggerServerEvent('mdt:server:getBoloData', id) + cb(true) +end) + +RegisterNUICallback("newBolo", function(data, cb) + local existing = data.existing + local id = data.id + local title = data.title + local plate = data.plate + local owner = data.owner + local individual = data.individual + local detail = data.detail + local tags = data.tags + local gallery = data.gallery + local officers = data.officers + local time = data.time + TriggerServerEvent('mdt:server:newBolo', existing, id, title, plate, owner, individual, detail, tags, gallery, officers, time) + cb(true) +end) + +RegisterNUICallback("deleteWeapons", function(data, cb) + local id = data.id + TriggerServerEvent('mdt:server:deleteWeapons', id) + cb(true) +end) + +RegisterNUICallback("deleteReports", function(data, cb) + local id = data.id + TriggerServerEvent('mdt:server:deleteReports', id) + cb(true) +end) + +RegisterNUICallback("deleteIncidents", function(data, cb) + local id = data.id + TriggerServerEvent('mdt:server:deleteIncidents', id) + cb(true) +end) + +RegisterNUICallback("deleteBolo", function(data, cb) + local id = data.id + TriggerServerEvent('mdt:server:deleteBolo', id) + cb(true) +end) + +RegisterNUICallback("deleteICU", function(data, cb) + local id = data.id + TriggerServerEvent('mdt:server:deleteICU', id) + cb(true) +end) + +RegisterNetEvent('mdt:client:getBolos', function(sentData) + SendNUIMessage({ type = "bolos", data = sentData }) +end) + +RegisterNetEvent('mdt:client:getAllIncidents', function(sentData) + SendNUIMessage({ type = "incidents", data = sentData }) +end) + +RegisterNetEvent('mdt:client:getAllBolos', function(sentData) + SendNUIMessage({ type = "bolos", data = sentData }) +end) + +RegisterNetEvent('mdt:client:getBoloData', function(sentData) + SendNUIMessage({ type = "boloData", data = sentData }) +end) + +RegisterNetEvent('mdt:client:boloComplete', function(sentData) + SendNUIMessage({ type = "boloComplete", data = sentData }) +end) + +--==================================================================================== +------------------------------------------ +-- REPORTS PAGE -- +------------------------------------------ +--==================================================================================== + +RegisterNUICallback("getAllReports", function(data, cb) + TriggerServerEvent('mdt:server:getAllReports') + cb(true) +end) + +RegisterNUICallback("getReportData", function(data, cb) + local id = data.id + TriggerServerEvent('mdt:server:getReportData', id) + cb(true) +end) + +RegisterNUICallback("searchReports", function(data, cb) + local name = data.name + TriggerServerEvent('mdt:server:searchReports', name) + cb(true) +end) + +RegisterNUICallback("newReport", function(data, cb) + local existing = data.existing + local id = data.id + local title = data.title + local reporttype = data.type + local details = data.details + local tags = data.tags + local gallery = data.gallery + local officers = data.officers + local civilians = data.civilians + local time = data.time + + TriggerServerEvent('mdt:server:newReport', existing, id, title, reporttype, details, tags, gallery, officers, civilians, time) + cb(true) +end) + +RegisterNetEvent('mdt:client:getAllReports', function(sentData) + SendNUIMessage({ type = "reports", data = sentData }) +end) + +RegisterNetEvent('mdt:client:getReportData', function(sentData) + SendNUIMessage({ type = "reportData", data = sentData }) +end) + +RegisterNetEvent('mdt:client:reportComplete', function(sentData) + SendNUIMessage({ type = "reportComplete", data = sentData }) +end) + +--==================================================================================== +------------------------------------------ +-- DMV PAGE -- +------------------------------------------ +--==================================================================================== +RegisterNUICallback("searchVehicles", function(data, cb) + + local p = promise.new() + + QBCore.Functions.TriggerCallback('mdt:server:SearchVehicles', function(result) + p:resolve(result) + end, data.name) + + local result = Citizen.Await(p) + for i=1, #result do + local vehicle = result[i] + local mods = json.decode(result[i].mods) + result[i]['plate'] = string.upper(result[i]['plate']) + result[i]['color'] = Config.ColorInformation[mods['color1']] + result[i]['colorName'] = Config.ColorNames[mods['color1']] + + -- If a server forgets to define a vehicle in their vehicles table, we log a console error + -- and set it to unknown. This is to prevent the MDT from getting stuck. + local vehData = QBCore.Shared.Vehicles[vehicle['vehicle']] + if vehData == nil then + print("Vehicle not found for profile:", vehicle['vehicle']) -- Do not remove print, is a guide for a nil error. + print("Make sure the profile you're trying to load has all cars added to the core under vehicles.lua.") -- Do not remove print, is a guide for a nil error. + result[i]['model'] = "UNKNOWN" + else + result[i]['model'] = vehData["brand"] .. ' ' .. vehData["name"] + end + end + cb(result) + +end) + +RegisterNUICallback("getVehicleData", function(data, cb) + local plate = data.plate + TriggerServerEvent('mdt:server:getVehicleData', plate) + cb(true) +end) + +RegisterNUICallback("saveVehicleInfo", function(data, cb) + local dbid = data.dbid + local plate = data.plate + local imageurl = data.imageurl + local notes = data.notes + local stolen = data.stolen + local code5 = data.code5 + local impound = data.impound + local points = data.points + local JobType = GetJobType(PlayerData.job.name) + if JobType == 'police' and impound.impoundChanged == true then + if impound.impoundActive then + local found = 0 + local plate = string.upper(string.gsub(data['plate'], "^%s*(.-)%s*$", "%1")) + local vehicles = GetGamePool('CVehicle') + + for k,v in pairs(vehicles) do + local plt = string.upper(string.gsub(GetVehicleNumberPlateText(v), "^%s*(.-)%s*$", "%1")) + if plt == plate then + local dist = #(GetEntityCoords(PlayerPedId()) - GetEntityCoords(v)) + if dist < 5.0 then + found = VehToNet(v) + SendNUIMessage({ type = "greenImpound" }) + TriggerServerEvent('mdt:server:saveVehicleInfo', dbid, plate, imageurl, notes, stolen, code5, impound, points) + end + break + end + end + + if found == 0 then + QBCore.Functions.Notify('Vehicle not found!', 'error') + SendNUIMessage({ type = "redImpound" }) + end + else + local ped = PlayerPedId() + local playerPos = GetEntityCoords(ped) + for k, v in pairs(Config.ImpoundLocations) do + if (#(playerPos - vector3(v.x, v.y, v.z)) < 20.0) then + impound.CurrentSelection = k + TriggerServerEvent('mdt:server:saveVehicleInfo', dbid, plate, imageurl, notes, stolen, code5, impound, points) + break + end + end + end + else + TriggerServerEvent('mdt:server:saveVehicleInfo', dbid, plate, imageurl, notes, stolen, code5, impound, points) + end + cb(true) +end) + +--==================================================================================== +------------------------------------------ +-- Weapons PAGE -- +------------------------------------------ +--==================================================================================== +RegisterNUICallback("searchWeapons", function(data, cb) + local p = promise.new() + + QBCore.Functions.TriggerCallback('mdt:server:SearchWeapons', function(result) + p:resolve(result) + end, data.name) + + local result = Citizen.Await(p) + cb(result) +end) + +RegisterNUICallback("saveWeaponInfo", function(data, cb) + local serial = data.serial + local notes = data.notes + local imageurl = data.imageurl + local owner = data.owner + local weapClass = data.weapClass + local weapModel = data.weapModel + local JobType = GetJobType(PlayerData.job.name) + if JobType == 'police' then + TriggerServerEvent('mdt:server:saveWeaponInfo', serial, imageurl, notes, owner, weapClass, weapModel) + end + cb(true) +end) + +RegisterNUICallback("getWeaponData", function(data, cb) + local serial = data.serial + TriggerServerEvent('mdt:server:getWeaponData', serial) + cb(true) +end) + +RegisterNetEvent('mdt:client:getWeaponData', function(sentData) + if sentData and sentData[1] then + local results = sentData[1] + SendNUIMessage({ type = "getWeaponData", data = results }) + end +end) + +RegisterNUICallback("getAllLogs", function(data, cb) + TriggerServerEvent('mdt:server:getAllLogs') + cb(true) +end) + +RegisterNUICallback("getPenalCode", function(data, cb) + TriggerServerEvent('mdt:server:getPenalCode') + cb(true) +end) + +RegisterNUICallback("toggleDuty", function(data, cb) + TriggerServerEvent('QBCore:ToggleDuty') + TriggerServerEvent('ps-mdt:server:ClockSystem') + cb(true) +end) + +RegisterNUICallback("setCallsign", function(data, cb) + TriggerServerEvent('mdt:server:setCallsign', data.cid, data.newcallsign) + cb(true) +end) + +RegisterNUICallback("setRadio", function(data, cb) + TriggerServerEvent('mdt:server:setRadio', data.cid, data.newradio) + cb(true) +end) + +RegisterNUICallback("saveIncident", function(data, cb) + TriggerServerEvent('mdt:server:saveIncident', data.ID, data.title, data.information, data.tags, data.officers, data.civilians, data.evidence, data.associated, data.time) + cb(true) +end) + +RegisterNUICallback("removeIncidentCriminal", function(data, cb) + TriggerServerEvent('mdt:server:removeIncidentCriminal', data.cid, data.incidentId) + cb(true) +end) + +RegisterNetEvent('mdt:client:getVehicleData', function(sentData) + if sentData and sentData[1] then + local vehicle = sentData[1] + local vehData = json.decode(vehicle['vehicle']) + vehicle['color'] = Config.ColorInformation[vehicle['color1']] + vehicle['colorName'] = Config.ColorNames[vehicle['color1']] + local vehData = QBCore.Shared.Vehicles[vehicle.vehicle] + vehicle.model = vehData["brand"] .. ' ' .. vehData["name"] + vehicle['class'] = Config.ClassList[GetVehicleClassFromName(vehicle['vehicle'])] + vehicle['vehicle'] = nil + SendNUIMessage({ type = "getVehicleData", data = vehicle }) + end +end) + +RegisterNetEvent('mdt:client:updateVehicleDbId', function(sentData) + SendNUIMessage({ type = "updateVehicleDbId", data = tonumber(sentData) }) +end) + +RegisterNetEvent('mdt:client:updateWeaponDbId', function(sentData) + SendNUIMessage({ type = "updateWeaponDbId", data = tonumber(sentData) }) +end) + +RegisterNetEvent('mdt:client:getAllLogs', function(sentData) + SendNUIMessage({ type = "getAllLogs", data = sentData }) +end) + +RegisterNetEvent('mdt:client:getPenalCode', function(titles, penalcode) + SendNUIMessage({ type = "getPenalCode", titles = titles, penalcode = penalcode }) +end) + +RegisterNetEvent('mdt:client:setRadio', function(radio) + if type(tonumber(radio)) == "number" then + exports["pma-voice"]:setVoiceProperty("radioEnabled", true) + exports["pma-voice"]:setRadioChannel(tonumber(radio)) + QBCore.Functions.Notify("You have set your radio frequency to "..radio..".", "success") + else + QBCore.Functions.Notify("Invalid Station(Please enter a number)", "error") + end +end) + +RegisterNetEvent('mdt:client:sig100', function(radio, type) + local job = PlayerData.job.name + local duty = PlayerData.job.onduty + if AllowedJob(job) and duty == 1 then + if type == true then + exports['erp_notifications']:PersistentAlert("START", "signall100-"..radio, "inform", "Radio "..radio.." is currently signal 100!") + end + end + if not type then + exports['erp_notifications']:PersistentAlert("END", "signall100-"..radio) + end +end) + +RegisterNetEvent('mdt:client:updateCallsign', function(callsign) + callSign = tostring(callsign) +end) + +RegisterNetEvent('mdt:client:updateIncidentDbId', function(sentData) + SendNUIMessage({ type = "updateIncidentDbId", data = tonumber(sentData) }) +end) + + +--==================================================================================== +------------------------------------------ +-- DISPATCH PAGE -- +------------------------------------------ +--==================================================================================== + +RegisterNetEvent('dispatch:clNotify', function(sNotificationData, sNotificationId) + if LocalPlayer.state.isLoggedIn then + sNotificationData.playerJob = PlayerData.job.name + SendNUIMessage({ type = "call", data = sNotificationData }) + end +end) + +RegisterNUICallback("setWaypoint", function(data, cb) + TriggerServerEvent('mdt:server:setWaypoint', data.callid or data.id) + cb(true) +end) + +RegisterNUICallback("removeCallBlip", function(data, cb) + TriggerEvent('ps-dispatch:client:removeCallBlip', data.callid or data.id) + cb(true) +end) + +RegisterNUICallback("attachedUnits", function(data, cb) + TriggerServerEvent('mdt:server:attachedUnits', data.callid or data.id) + cb(true) +end) + +RegisterNUICallback("setDispatchWaypoint", function(data, cb) + TriggerServerEvent('mdt:server:setDispatchWaypoint', data.callid or data.id, data.cid) + cb(true) +end) + +RegisterNUICallback("callDragAttach", function(data, cb) + TriggerServerEvent('mdt:server:callDragAttach', data.callid or data.id, data.cid) + cb(true) +end) + +RegisterNUICallback("setWaypointU", function(data, cb) + TriggerServerEvent('mdt:server:setWaypoint:unit', data.cid) + cb(true) +end) + +RegisterNUICallback("dispatchMessage", function(data, cb) + TriggerServerEvent('mdt:server:sendMessage', data.message, data.time) + cb(true) +end) + +RegisterNUICallback("refreshDispatchMsgs", function(data, cb) + TriggerServerEvent('mdt:server:refreshDispatchMsgs') + cb(true) +end) + +RegisterNUICallback("dispatchNotif", function(data, cb) + local info = data['data'] + local mentioned = false + if callSign ~= "" then if string.find(string.lower(info['message']),string.lower(string.gsub(callSign,'-','%%-'))) then mentioned = true end end + if mentioned then + + -- Send notification to phone?? + TriggerEvent('erp_phone:sendNotification', {img = info['profilepic'], title = "Dispatch (Mention)", content = info['message'], time = 7500, customPic = true }) + + PlaySoundFrontend(-1, "SELECT", "HUD_FRONTEND_DEFAULT_SOUNDSET", false) + PlaySoundFrontend(-1, "Event_Start_Text", "GTAO_FM_Events_Soundset", 0) + else + TriggerEvent('erp_phone:sendNotification', {img = info['profilepic'], title = "Dispatch ("..info['name']..")", content = info['message'], time = 5000, customPic = true }) + end + cb(true) +end) + +RegisterNUICallback("getCallResponses", function(data, cb) + TriggerServerEvent('mdt:server:getCallResponses', data.callid or data.id) + cb(true) +end) + +RegisterNUICallback("sendCallResponse", function(data, cb) + TriggerServerEvent('mdt:server:sendCallResponse', data.message, data.time, data.callid) + cb(true) +end) + +RegisterNUICallback("removeImpound", function(data, cb) + local ped = PlayerPedId() + local playerPos = GetEntityCoords(ped) + for k, v in pairs(Config.ImpoundLocations) do + if (#(playerPos - vector3(v.x, v.y, v.z)) < 20.0) then + TriggerServerEvent('mdt:server:removeImpound', data['plate'], k) + break + end + end + cb('ok') +end) + +RegisterNUICallback("statusImpound", function(data, cb) + TriggerServerEvent('mdt:server:statusImpound', data['plate']) + cb('ok') +end) + +RegisterNUICallback('openCamera', function(data) + local camId = tonumber(data.cam) + TriggerEvent('police:client:ActiveCamera', camId) +end) + +RegisterNetEvent('mdt:client:attachedUnits', function(sentData, callid) + SendNUIMessage({ type = "attachedUnits", data = sentData, callid = callid }) +end) + +RegisterNetEvent('mdt:client:setWaypoint', function(callInformation) + if callInformation['coords'] and callInformation['coords']['x'] and callInformation['coords']['y'] then + SetNewWaypoint(callInformation['coords']['x'], callInformation['coords']['y']) + end +end) + +RegisterNetEvent('mdt:client:setWaypoint:unit', function(sentData) + SetNewWaypoint(sentData.x, sentData.y) +end) + +RegisterNetEvent('mdt:client:dashboardMessage', function(sentData) + local job = PlayerData.job.name + if AllowedJob(job) then + SendNUIMessage({ type = "dispatchmessage", data = sentData }) + end +end) + +RegisterNetEvent('mdt:client:dashboardMessages', function(sentData) + SendNUIMessage({ type = "dispatchmessages", data = sentData }) +end) + +RegisterNetEvent('mdt:client:getCallResponses', function(sentData, sentCallId) + SendNUIMessage({ type = "getCallResponses", data = sentData, callid = sentCallId }) +end) + +RegisterNetEvent('mdt:client:sendCallResponse', function(message, time, callid, name) + SendNUIMessage({ type = "sendCallResponse", message = message, time = time, callid = callid, name = name }) +end) + +RegisterNetEvent('mdt:client:statusImpound', function(data, plate) + SendNUIMessage({ type = "statusImpound", data = data, plate = plate }) +end) + +function GetPlayerWeaponInfos(cb) + QBCore.Functions.TriggerCallback('getWeaponInfo', function(weaponInfos) + cb(weaponInfos) + end) +end + +--3rd Eye Trigger Event +RegisterNetEvent('ps-mdt:client:selfregister') +AddEventHandler('ps-mdt:client:selfregister', function() + GetPlayerWeaponInfos(function(weaponInfos) + if weaponInfos and #weaponInfos > 0 then + for _, weaponInfo in ipairs(weaponInfos) do + TriggerServerEvent('mdt:server:registerweapon', weaponInfo.serialnumber, weaponInfo.weaponurl, weaponInfo.notes, weaponInfo.owner, weaponInfo.weapClass, weaponInfo.weaponmodel) + TriggerEvent('QBCore:Notify', "Weapon " .. weaponInfo.weaponmodel .. " has been added to police database.") + --print("Weapon added to database") + end + else + -- print("No weapons found") + end + end) +end) + +-- Uncomment if you want to use this instead. + +--[[ RegisterCommand('registerweapon', function(source) + GetPlayerWeaponInfos(function(weaponInfos) + if weaponInfos and #weaponInfos > 0 then + for _, weaponInfo in ipairs(weaponInfos) do + TriggerServerEvent('mdt:server:registerweapon', weaponInfo.serialnumber, weaponInfo.weaponurl, weaponInfo.notes, weaponInfo.owner, weaponInfo.weapClass, weaponInfo.weaponmodel) + TriggerEvent('QBCore:Notify', "Weapon " .. weaponInfo.weaponmodel .. " has been added to police database.") + --print("Weapon added to database") + end + else + --print("No weapons found") + end + end) +end, false) ]] + +--==================================================================================== +------------------------------------------ +-- STAFF LOGS PAGE -- +------------------------------------------ +--==================================================================================== + +RegisterNetEvent("mdt:receiveOfficerData") +AddEventHandler("mdt:receiveOfficerData", function(officerData) + SendNUIMessage({ + action = "updateOfficerData", + data = officerData + }) +end) + +--==================================================================================== +------------------------------------------ +-- TRAFFIC STOP STUFF -- +------------------------------------------ +--==================================================================================== + +local function vehicleData(vehicle) + local vData = { + name = GetLabelText(GetDisplayNameFromVehicleModel(GetEntityModel(vehicle))), + } + return vData +end + +function getStreetandZone(coords) + local zone = GetLabelText(GetNameOfZone(coords.x, coords.y, coords.z)) + local currentStreetHash = GetStreetNameAtCoord(coords.x, coords.y, coords.z) + currentStreetName = GetStreetNameFromHashKey(currentStreetHash) + playerStreetsLocation = currentStreetName .. ", " .. zone + return playerStreetsLocation +end + +if Config.UseWolfknightRadar == true then + RegisterNetEvent("ps-mdt:client:trafficStop") + AddEventHandler("ps-mdt:client:trafficStop", function() + local plyData = QBCore.Functions.GetPlayerData() + local currentPos = GetEntityCoords(PlayerPedId()) + local locationInfo = getStreetandZone(currentPos) + if not IsPedInAnyPoliceVehicle(PlayerPedId()) then + QBCore.Functions.Notify("Not in any Police Vehicle!", "error") + return + end + local data, vData, vehicle = exports["wk_wars2x"]:GetFrontPlate(), {} + if not coolDown then + if data.veh ~= nil and data.veh ~= 0 then + lastVeh = data.veh + lastPlate = data.plate + vehicle = vehicleData(data.veh) + exports["ps-dispatch"]:CustomAlert({ + coords = { + x = currentPos.x, + y = currentPos.y, + z = currentPos.z + }, + message = "Ongoing Traffic Stop", + dispatchCode = "10-11", + description = "Ongoing Traffic Stop", + firstStreet = locationInfo, + model = vehicle.name, + plate = lastPlate, + name = plyData.job.grade.name.. ", " ..plyData.charinfo.firstname:sub(1, 1):upper() .. plyData.charinfo.firstname:sub(2) .. " " .. plyData.charinfo.lastname:sub(1, 1):upper() .. plyData.charinfo.lastname:sub(2), + radius = 0, + sprite = 60, + color = 3, + scale = 1.0, + length = 3, + }) + end + coolDown = true + SetTimeout(15000, function() + coolDown = false + end) + else + QBCore.Functions.Notify("Traffic Stop Cooldown active!", "error") + end + end) +end diff --git a/fxmanifest.lua b/fxmanifest.lua index b6b0e6b1..4e0ef81c 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -1,37 +1,32 @@ -fx_version 'cerulean' -game 'gta5' - -author 'Flawws, Flakey, Idris and the Project Sloth team' -description 'EchoRP MDT Rewrite for QBCore' -version '0.9.9' - -lua54 'yes' - -shared_script 'shared/config.lua' - -server_scripts { - '@oxmysql/lib/MySQL.lua', - 'server/utils.lua', - 'server/dbm.lua', - 'server/main.lua' -} -client_scripts{ - 'client/main.lua', - 'client/cl_impound.lua' -} - -ui_page 'ui/dashboard.html' - -files { - 'ui/img/*.png', - 'ui/img/*.webp', - 'ui/dashboard.html', - 'ui/dmv.html', - 'ui/bolos.html', - 'ui/incidents.html', - 'ui/penalcode.html', - 'ui/reports.html', - 'ui/warrants.html', - 'ui/app.js', - 'ui/style.css', -} \ No newline at end of file +fx_version 'cerulean' +game 'gta5' + +author 'Flawws, Flakey, Idris and the Project Sloth team' +description 'EchoRP MDT Rewrite for QBCore' +version '2.7.3' + +lua54 'yes' + +shared_script 'shared/config.lua' + +server_scripts { + '@oxmysql/lib/MySQL.lua', + 'server/utils.lua', + 'server/dbm.lua', + 'server/main.lua' +} +client_scripts{ + 'client/main.lua', + 'client/cl_impound.lua', + 'client/cl_mugshot.lua' +} + +ui_page 'ui/dashboard.html' + +files { + 'ui/img/*.png', + 'ui/img/*.webp', + 'ui/dashboard.html', + 'ui/app.js', + 'ui/style.css', +} diff --git a/server/dbm.lua b/server/dbm.lua index 5cffe4d8..c85be6da 100644 --- a/server/dbm.lua +++ b/server/dbm.lua @@ -1,184 +1,163 @@ -local QBCore = exports['qb-core']:GetCoreObject() - --- Get CitizenIDs from Player License -function GetCitizenID(license) - local result = MySQL.query.await("SELECT citizenid FROM players WHERE license = ?", {license,}) - if result ~= nil then - return result - else - print("Cannot find a CitizenID for License: "..license) - return nil - end -end - --- (Start) Opening the MDT and sending data -function AddLog(text) - --print(text) - return MySQL.insert.await('INSERT INTO `mdt_logs` (`text`, `time`) VALUES (?,?)', {text, os.time() * 1000}) - -- return exports.oxmysql:execute('INSERT INTO `mdt_logs` (`text`, `time`) VALUES (:text, :time)', { text = text, time = os.time() * 1000 }) -end - -function GetNameFromId(cid) - -- Should be a scalar? - local result = MySQL.scalar.await('SELECT charinfo FROM players WHERE citizenid = @citizenid', { ['@citizenid'] = cid }) - if result ~= nil then - local charinfo = json.decode(result) - local fullname = charinfo['firstname']..' '..charinfo['lastname'] - return fullname - else - --print('Player does not exist') - return nil - end - -- return exports.oxmysql:executeSync('SELECT firstname, lastname FROM `users` WHERE id = :id LIMIT 1', { id = cid }) -end - --- idk what this is used for either -function GetPersonInformation(cid, jobtype) - local result = MySQL.query.await('SELECT information, tags, gallery, pfp, fingerprint FROM mdt_data WHERE cid = ? and jobtype = ?', { cid, jobtype}) - return result[1] - -- return exports.oxmysql:executeSync('SELECT information, tags, gallery FROM mdt WHERE cid= ? and type = ?', { cid, jobtype }) -end - -function GetPfpFingerPrintInformation(cid) - local result = MySQL.query.await('SELECT pfp, fingerprint FROM mdt_data WHERE cid = ?', { cid }) - return result[1] -end - --- idk but I guess sure? -function GetIncidentName(id) - -- Should also be a scalar - return MySQL.query.await('SELECT title FROM `mdt_incidents` WHERE id = :id LIMIT 1', { id = id }) - -- return exports.oxmysql:executeSync('SELECT title FROM `mdt_incidents` WHERE id = :id LIMIT 1', { id = id }) -end - -function GetConvictions(cids) - return MySQL.query.await('SELECT * FROM `mdt_convictions` WHERE `cid` IN(?)', { cids }) - -- return exports.oxmysql:executeSync('SELECT * FROM `mdt_convictions` WHERE `cid` IN(?)', { cids }) -end - -function GetLicenseInfo(cid) - local result = MySQL.query.await('SELECT * FROM `licenses` WHERE `cid` = ?', { cid }) - return result - -- return exports.oxmysql:executeSync('SELECT * FROM `licenses` WHERE `cid`=:cid', { cid = cid }) -end - -function CreateUser(cid, tableName) - AddLog("A user was created with the CID: "..cid) - -- return exports.oxmysql:insert("INSERT INTO `"..dbname.."` (cid) VALUES (:cid)", { cid = cid }) - return MySQL.insert.await("INSERT INTO `"..tableName.."` (cid) VALUES (:cid)", { cid = cid }) -end - -function GetPlayerVehicles(cid, cb) - return MySQL.query.await('SELECT id, plate, vehicle FROM player_vehicles WHERE citizenid=:cid', { cid = cid }) -end - -function GetBulletins(JobType) - return MySQL.query.await('SELECT * FROM `mdt_bulletin` WHERE `jobtype` = ? LIMIT 10', { JobType }) - -- return exports.oxmysql:executeSync('SELECT * FROM `mdt_bulletin` WHERE `type`= ? LIMIT 10', { JobType }) -end - -function GetPlayerProperties(cid, cb) - local result = MySQL.query.await('SELECT houselocations.label, houselocations.coords FROM player_houses INNER JOIN houselocations ON player_houses.house = houselocations.name where player_houses.citizenid = ?', {cid}) - return result -end - -function GetPlayerDataById(id) - local Player = QBCore.Functions.GetPlayerByCitizenId(id) - if Player ~= nil then - local response = {citizenid = Player.PlayerData.citizenid, charinfo = Player.PlayerData.charinfo, metadata = Player.PlayerData.metadata, job = Player.PlayerData.job} - return response - else - return MySQL.single.await('SELECT citizenid, charinfo, job, metadata FROM players WHERE citizenid = ? LIMIT 1', { id }) - end - - -- return exports.oxmysql:executeSync('SELECT citizenid, charinfo, job FROM players WHERE citizenid = ? LIMIT 1', { id }) -end - --- Probs also best not to use ---[[ function GetImpoundStatus(vehicleid, cb) - cb( #(exports.oxmysql:executeSync('SELECT id FROM `impound` WHERE `vehicleid`=:vehicleid', {['vehicleid'] = vehicleid })) > 0 ) -end ]] - -function GetBoloStatus(plate) - local result = MySQL.scalar.await('SELECT id FROM `mdt_bolos` WHERE LOWER(`plate`)=:plate', { plate = string.lower(plate)}) - return result - -- return exports.oxmysql:scalarSync('SELECT id FROM `mdt_bolos` WHERE LOWER(`plate`)=:plate', { plate = string.lower(plate)}) -end - -function GetOwnerName(cid) - local result = MySQL.scalar.await('SELECT charinfo FROM `players` WHERE LOWER(`citizenid`) = ? LIMIT 1', {cid}) - return result - -- return exports.oxmysql:scalarSync('SELECT charinfo FROM `players` WHERE id=:cid LIMIT 1', { cid = cid}) -end - -function GetVehicleInformation(plate, cb) - local result = MySQL.query.await('SELECT id, information FROM `mdt_vehicleinfo` WHERE plate=:plate', { plate = plate}) - cb(result) -end - -function GetPlayerLicenses(identifier) - local response = false - local Player = QBCore.Functions.GetPlayerByCitizenId(identifier) - if Player ~= nil then - return Player.PlayerData.metadata.licences - else - local result = MySQL.scalar.await('SELECT metadata FROM players WHERE citizenid = @identifier', {['@identifier'] = identifier}) - if result ~= nil then - local metadata = json.decode(result) - if metadata["licences"] ~= nil and metadata["licences"] then - return metadata["licences"] - else - return { - ['driver'] = false, - ['business'] = false, - ['weapon'] = false, - ['pilot'] = false - } - end - end - end -end - -function ManageLicense(identifier, type, status) - local Player = QBCore.Functions.GetPlayerByCitizenId(identifier) - local licenseStatus = nil - if status == "give" then licenseStatus = true elseif status == "revoke" then licenseStatus = false end - if Player ~= nil then - local licences = Player.PlayerData.metadata["licences"] - local newLicenses = {} - for k, v in pairs(licences) do - local status = v - if k == type then - status = licenseStatus - end - newLicenses[k] = status - end - Player.Functions.SetMetaData("licences", newLicenses) - else - local licenseType = '$.licences.'..type - local result = MySQL.query.await('UPDATE `players` SET `metadata` = JSON_REPLACE(`metadata`, ?, ?) WHERE `citizenid` = ?', {licenseType, licenseStatus, identifier}) --seems to not work on older MYSQL versions, think about alternative - end -end - -function ManageLicenses(identifier, incomingLicenses) - local Player = QBCore.Functions.GetPlayerByCitizenId(identifier) - if Player ~= nil then - Player.Functions.SetMetaData("licences", incomingLicenses) - - else - local result = MySQL.scalar.await('SELECT metadata FROM players WHERE citizenid = @identifier', {['@identifier'] = identifier}) - result = json.decode(result) - - result.licences = result.licences or { - ['driver'] = true, - ['business'] = false, - ['weapon'] = false, - ['pilot'] = false - } - - for k, _ in pairs(incomingLicenses) do - result.licences[k] = incomingLicenses[k] - end - MySQL.query.await('UPDATE `players` SET `metadata` = @metadata WHERE citizenid = @citizenid', {['@metadata'] = json.encode(result), ['@citizenid'] = identifier}) - end -end +local QBCore = exports['qb-core']:GetCoreObject() + +-- Get CitizenIDs from Player License +function GetCitizenID(license) + local result = MySQL.query.await("SELECT citizenid FROM players WHERE license = ?", {license,}) + if result ~= nil then + return result + else + print("Cannot find a CitizenID for License: "..license) + return nil + end +end + +-- (Start) Opening the MDT and sending data +function AddLog(text) + return MySQL.insert.await('INSERT INTO `mdt_logs` (`text`, `time`) VALUES (?,?)', {text, os.time() * 1000}) +end + +function GetNameFromId(cid) + local result = MySQL.scalar.await('SELECT charinfo FROM players WHERE citizenid = @citizenid', { ['@citizenid'] = cid }) + if result ~= nil then + local charinfo = json.decode(result) + local fullname = charinfo['firstname']..' '..charinfo['lastname'] + return fullname + else + --print('Player does not exist') + return nil + end +end + +function GetPersonInformation(cid, jobtype) + local result = MySQL.query.await('SELECT information, tags, gallery, pfp, fingerprint FROM mdt_data WHERE cid = ? and jobtype = ?', { cid, jobtype}) + return result[1] +end + +function GetIncidentName(id) + local result = MySQL.query.await('SELECT title FROM `mdt_incidents` WHERE id = :id LIMIT 1', { id = id }) + return result[1] +end + +function GetConvictions(cids) + return MySQL.query.await('SELECT * FROM `mdt_convictions` WHERE `cid` IN(?)', { cids }) +end + +function GetLicenseInfo(cid) + local result = MySQL.query.await('SELECT * FROM `licenses` WHERE `cid` = ?', { cid }) + return result +end + +function CreateUser(cid, tableName) + AddLog("A user was created with the CID: "..cid) + return MySQL.insert.await("INSERT INTO `"..tableName.."` (cid) VALUES (:cid)", { cid = cid }) +end + +function GetPlayerVehicles(cid, cb) + return MySQL.query.await('SELECT id, plate, vehicle FROM player_vehicles WHERE citizenid=:cid', { cid = cid }) +end + +function GetBulletins(JobType) + return MySQL.query.await('SELECT * FROM `mdt_bulletin` WHERE `jobtype` = ? LIMIT 10', { JobType }) +end + +function GetPlayerProperties(cid, cb) + local result = MySQL.query.await('SELECT houselocations.label, houselocations.coords FROM player_houses INNER JOIN houselocations ON player_houses.house = houselocations.name where player_houses.citizenid = ?', {cid}) + return result +end + +function GetPlayerDataById(id) + local Player = QBCore.Functions.GetPlayerByCitizenId(id) + if Player ~= nil then + local response = {citizenid = Player.PlayerData.citizenid, charinfo = Player.PlayerData.charinfo, metadata = Player.PlayerData.metadata, job = Player.PlayerData.job} + return response + else + return MySQL.single.await('SELECT citizenid, charinfo, job, metadata FROM players WHERE citizenid = ? LIMIT 1', { id }) + end +end + +function GetBoloStatus(plate) + local result = MySQL.scalar.await('SELECT id FROM `mdt_bolos` WHERE LOWER(`plate`)=:plate', { plate = string.lower(plate)}) + return result +end + +function GetOwnerName(cid) + local result = MySQL.scalar.await('SELECT charinfo FROM `players` WHERE LOWER(`citizenid`) = ? LIMIT 1', {cid}) + return result +end + +function GetVehicleInformation(plate, cb) + local result = MySQL.query.await('SELECT id, information FROM `mdt_vehicleinfo` WHERE plate=:plate', { plate = plate}) + cb(result) +end + +function GetPlayerApartment(cid, cb) + local result = MySQL.query.await('SELECT name, type, label FROM apartments where citizenid = ?', {cid}) + return result +end + +function GetPlayerLicenses(identifier) + local response = false + local Player = QBCore.Functions.GetPlayerByCitizenId(identifier) + if Player ~= nil then + return Player.PlayerData.metadata.licences + else + local result = MySQL.scalar.await('SELECT metadata FROM players WHERE citizenid = @identifier', {['@identifier'] = identifier}) + if result ~= nil then + local metadata = json.decode(result) + if metadata["licences"] ~= nil and metadata["licences"] then + return metadata["licences"] + else + return { + ['driver'] = false, + ['business'] = false, + ['weapon'] = false, + ['pilot'] = false + } + end + end + end +end + +function ManageLicense(identifier, type, status) + local Player = QBCore.Functions.GetPlayerByCitizenId(identifier) + local licenseStatus = nil + if status == "give" then licenseStatus = true elseif status == "revoke" then licenseStatus = false end + if Player ~= nil then + local licences = Player.PlayerData.metadata["licences"] + local newLicenses = {} + for k, v in pairs(licences) do + local status = v + if k == type then + status = licenseStatus + end + newLicenses[k] = status + end + Player.Functions.SetMetaData("licences", newLicenses) + else + local licenseType = '$.licences.'..type + local result = MySQL.query.await('UPDATE `players` SET `metadata` = JSON_REPLACE(`metadata`, ?, ?) WHERE `citizenid` = ?', {licenseType, licenseStatus, identifier}) --seems to not work on older MYSQL versions, think about alternative + end +end + +function UpdateAllLicenses(identifier, incomingLicenses) + local Player = QBCore.Functions.GetPlayerByCitizenId(identifier) + if Player ~= nil then + Player.Functions.SetMetaData("licences", incomingLicenses) + + else + local result = MySQL.scalar.await('SELECT metadata FROM players WHERE citizenid = @identifier', {['@identifier'] = identifier}) + result = json.decode(result) + + result.licences = result.licences or { + ['driver'] = true, + ['business'] = false, + ['weapon'] = false, + ['pilot'] = false + } + + for k, _ in pairs(incomingLicenses) do + result.licences[k] = incomingLicenses[k] + end + MySQL.query.await('UPDATE `players` SET `metadata` = @metadata WHERE citizenid = @citizenid', {['@metadata'] = json.encode(result), ['@citizenid'] = identifier}) + end +end \ No newline at end of file diff --git a/server/main.lua b/server/main.lua index 19c8357e..38ecba18 100644 --- a/server/main.lua +++ b/server/main.lua @@ -1,24 +1,59 @@ local QBCore = exports['qb-core']:GetCoreObject() --- Maybe cache? local incidents = {} local convictions = {} local bolos = {} - --- TODO make it departments compatible +local MugShots = {} local activeUnits = {} - local impound = {} local dispatchMessages = {} local isDispatchRunning = false - -local function IsPolice(job) - for k, v in pairs(Config.PoliceJobs) do - if job == k then - return true +local antiSpam = false +local calls = {} + +-------------------------------- +-- SET YOUR FIVEMERR API HERE. +-- Look at their docs below for more info. +-- https://docs.fivemerr.com/integrations/mdt-scripts/ps-mdt +-- Images for mug shots will be uploaded here and will not expire. +local FivemerrMugShot = 'https://api.fivemerr.com/v1/media/images' +local FivemerrApiKey = 'YOUR API KEY HERE' + +-------------------------------- +-- NOT RECOMMENDED. WE RECOMMEND USING Fivemerr. +-- SET YOUR WEHBOOKS IN HERE +-- Images for mug shots will be uploaded here. Add a Discord webhook. +local MugShotWebhook = '' + +-- Clock-in notifications for duty. Add a Discord webhook. +-- Command /mdtleaderboard, will display top players per clock-in hours. +local ClockinWebhook = '' + +-- Incident and Incident editting. Add a Discord webhook. +-- Incident Author, Title, and Report will display in webhook post. +local IncidentWebhook = '' +-------------------------------- + +QBCore.Functions.CreateCallback('ps-mdt:server:MugShotWebhook', function(source, cb) + if Config.MugShotWebhook then + if MugShotWebhook == '' then + print("\27[31mA webhook is missing in: MugShotWebhook (server > main.lua > line 18)\27[0m") + cb('', '') + else + cb(MugShotWebhook, '') end + elseif Config.FivemerrMugShot then + if FivemerrMugShot == '' then + print("\27[31mFivemerr setup is missing in: FivemerrMugShot (server > main.lua > line 19)\27[0m") + cb('', '') + else + cb(FivemerrMugShot, FivemerrApiKey) + end + else + print("\27[31mNo valid webhook configuration found.\27[0m") + cb('', '') end - return false -end +end) + local function GetActiveData(cid) local player = type(cid) == "string" and cid or tostring(cid) @@ -28,7 +63,20 @@ local function GetActiveData(cid) return false end - +local function IsPoliceOrEms(job) + for k, v in pairs(Config.PoliceJobs) do + if job == k then + return true + end + end + + for k, v in pairs(Config.AmbulanceJobs) do + if job == k then + return true + end + end + return false +end RegisterServerEvent("ps-mdt:dispatchStatus", function(bool) isDispatchRunning = bool @@ -39,12 +87,47 @@ if Config.UseWolfknightRadar == true then AddEventHandler("wk:onPlateScanned", function(cam, plate, index) local src = source local Player = QBCore.Functions.GetPlayer(src) - local bolo = GetBoloStatus(plate) + local PlayerData = GetPlayerData(src) + local vehicleOwner = GetVehicleOwner(plate) + local bolo, title, boloId = GetBoloStatus(plate) + local warrant, owner, incidentId = GetWarrantStatus(plate) + local driversLicense = PlayerData.metadata['licences'].driver + if bolo == true then - TriggerClientEvent("wk:togglePlateLock", src, cam, true, bolo) + TriggerClientEvent('QBCore:Notify', src, 'BOLO ID: '..boloId..' | Title: '..title..' | Registered Owner: '..vehicleOwner..' | Plate: '..plate, 'error', Config.WolfknightNotifyTime) + end + if warrant == true then + TriggerClientEvent('QBCore:Notify', src, 'WANTED - INCIDENT ID: '..incidentId..' | Registered Owner: '..owner..' | Plate: '..plate, 'error', Config.WolfknightNotifyTime) + end + + if Config.PlateScanForDriversLicense and driversLicense == false and vehicleOwner then + TriggerClientEvent('QBCore:Notify', src, 'NO DRIVERS LICENCE | Registered Owner: '..vehicleOwner..' | Plate: '..plate, 'error', Config.WolfknightNotifyTime) + end + + if bolo or warrant or (Config.PlateScanForDriversLicense and not driversLicense) and vehicleOwner then + TriggerClientEvent("wk:togglePlateLock", src, cam, true, 1) end end) end + +AddEventHandler('onResourceStart', function(resourceName) + if GetCurrentResourceName() ~= resourceName then return end + Wait(3000) + if Config.MugShotWebhook and MugShotWebhook == '' then + print("\27[31mA webhook is missing in: MugShotWebhook (server > main.lua > line 16)\27[0m") + end + if Config.FivemerrMugShot and FivemerrMugShot == '' then + print("\27[31mFivemerr setup is missing in: FivemerrMugShot (server > main.lua > line 19)\27[0m") + end + if ClockinWebhook == '' then + print("\27[31mA webhook is missing in: ClockinWebhook (server > main.lua > line 24)\27[0m") + end + if GetResourceState('ps-dispatch') == 'started' then + local calls = exports['ps-dispatch']:GetDispatchCalls() + return calls + end +end) + RegisterNetEvent("ps-mdt:server:OnPlayerUnload", function() --// Delete player from the MDT on logout local src = source @@ -54,24 +137,46 @@ RegisterNetEvent("ps-mdt:server:OnPlayerUnload", function() end end) -AddEventHandler("playerDropped", function(reason) - --// Delete player from the MDT on logout - local src = source - local player = QBCore.Functions.GetPlayer(src) - if player ~= nil then - if GetActiveData(player.PlayerData.citizenid) then - activeUnits[player.PlayerData.citizenid] = nil - end - else - local license = QBCore.Functions.GetIdentifier(src, "license") - local citizenids = GetCitizenID(license) +AddEventHandler('playerDropped', function(reason) + local src = source + local PlayerData = GetPlayerData(src) + if PlayerData == nil then return end -- Player not loaded in correctly and dropped early + + local time = os.date("%Y-%m-%d %H:%M:%S") + local job = PlayerData.job.name + local firstName = PlayerData.charinfo.firstname:sub(1,1):upper()..PlayerData.charinfo.firstname:sub(2) + local lastName = PlayerData.charinfo.lastname:sub(1,1):upper()..PlayerData.charinfo.lastname:sub(2) + + -- Auto clock out if the player is off duty + if IsPoliceOrEms(job) and PlayerData.job.onduty then + MySQL.query.await('UPDATE mdt_clocking SET clock_out_time = NOW(), total_time = TIMESTAMPDIFF(SECOND, clock_in_time, NOW()) WHERE user_id = @user_id ORDER BY id DESC LIMIT 1', { + ['@user_id'] = PlayerData.citizenid + }) - for _, v in pairs(citizenids) do - if GetActiveData(v.citizenid) then - activeUnits[v.citizenid] = nil - end + local result = MySQL.scalar.await('SELECT total_time FROM mdt_clocking WHERE user_id = @user_id', { + ['@user_id'] = PlayerData.citizenid + }) + if result then + local time_formatted = format_time(tonumber(result)) + sendToDiscord(16711680, "MDT Clock-Out", 'Player: **' .. firstName .. " ".. lastName .. '**\n\nJob: **' .. PlayerData.job.name .. '**\n\nRank: **' .. PlayerData.job.grade.name .. '**\n\nStatus: **Off Duty**\n Total time:' .. time_formatted, "ps-mdt | Made by Project Sloth") end end + + -- Delete player from the MDT on logout + if PlayerData ~= nil then + if GetActiveData(PlayerData.citizenid) then + activeUnits[PlayerData.citizenid] = nil + end + else + local license = QBCore.Functions.GetIdentifier(src, "license") + local citizenids = GetCitizenID(license) + + for _, v in pairs(citizenids) do + if GetActiveData(v.citizenid) then + activeUnits[v.citizenid] = nil + end + end + end end) RegisterNetEvent("ps-mdt:server:ToggleDuty", function() @@ -85,15 +190,73 @@ RegisterNetEvent("ps-mdt:server:ToggleDuty", function() end end) +QBCore.Commands.Add("mdtleaderboard", "Show MDT leaderboard", {}, false, function(source, args) + local PlayerData = GetPlayerData(source) + local job = PlayerData.job.name + + if not IsPoliceOrEms(job) then + TriggerClientEvent('QBCore:Notify', source, "You don't have permission to use this command.", 'error') + return + end + + local result = MySQL.Sync.fetchAll('SELECT firstname, lastname, total_time FROM mdt_clocking ORDER BY total_time DESC') + + local leaderboard_message = '**MDT Leaderboard**\n\n' + + for i, record in ipairs(result) do + local firstName = record.firstname:sub(1,1):upper()..record.firstname:sub(2) + local lastName = record.lastname:sub(1,1):upper()..record.lastname:sub(2) + local total_time = format_time(record.total_time) + + leaderboard_message = leaderboard_message .. i .. '. **' .. firstName .. ' ' .. lastName .. '** - ' .. total_time .. '\n' + end + + sendToDiscord(16753920, "MDT Leaderboard", leaderboard_message, "ps-mdt | Made by Project Sloth") + TriggerClientEvent('QBCore:Notify', source, "MDT leaderboard sent to Discord!", 'success') +end) + +RegisterNetEvent("ps-mdt:server:ClockSystem", function() + local src = source + local PlayerData = GetPlayerData(src) + local time = os.date("%Y-%m-%d %H:%M:%S") + local firstName = PlayerData.charinfo.firstname:sub(1,1):upper()..PlayerData.charinfo.firstname:sub(2) + local lastName = PlayerData.charinfo.lastname:sub(1,1):upper()..PlayerData.charinfo.lastname:sub(2) + if PlayerData.job.onduty then + + TriggerClientEvent('QBCore:Notify', source, "You're clocked-in", 'success') + MySQL.Async.insert('INSERT INTO mdt_clocking (user_id, firstname, lastname, clock_in_time) VALUES (:user_id, :firstname, :lastname, :clock_in_time) ON DUPLICATE KEY UPDATE user_id = :user_id, firstname = :firstname, lastname = :lastname, clock_in_time = :clock_in_time', { + user_id = PlayerData.citizenid, + firstname = firstName, + lastname = lastName, + clock_in_time = time + }, function() + end) + sendToDiscord(65280, "MDT Clock-In", 'Player: **' .. firstName .. " ".. lastName .. '**\n\nJob: **' .. PlayerData.job.name .. '**\n\nRank: **' .. PlayerData.job.grade.name .. '**\n\nStatus: **On Duty**', "ps-mdt | Made by Project Sloth") + else + TriggerClientEvent('QBCore:Notify', source, "You're clocked-out", 'success') + MySQL.query.await('UPDATE mdt_clocking SET clock_out_time = NOW(), total_time = TIMESTAMPDIFF(SECOND, clock_in_time, NOW()) WHERE user_id = @user_id ORDER BY id DESC LIMIT 1', { + ['@user_id'] = PlayerData.citizenid + }) + + local result = MySQL.scalar.await('SELECT total_time FROM mdt_clocking WHERE user_id = @user_id', { + ['@user_id'] = PlayerData.citizenid + }) + local time_formatted = format_time(tonumber(result)) + + sendToDiscord(16711680, "MDT Clock-Out", 'Player: **' .. firstName .. " ".. lastName .. '**\n\nJob: **' .. PlayerData.job.name .. '**\n\nRank: **' .. PlayerData.job.grade.name .. '**\n\nStatus: **Off Duty**\n Total time:' .. time_formatted, "ps-mdt | Made by Project Sloth") + end +end) + RegisterNetEvent('mdt:server:openMDT', function() local src = source local PlayerData = GetPlayerData(src) if not PermCheck(src, PlayerData) then return end local Radio = Player(src).state.radioChannel or 0 - --[[ if Radio > 100 then - Radio = 0 - end ]] - + + if GetResourceState('ps-dispatch') == 'started' then + calls = exports['ps-dispatch']:GetDispatchCalls() + end + activeUnits[PlayerData.citizenid] = { cid = PlayerData.citizenid, callSign = PlayerData.metadata['callsign'], @@ -106,64 +269,69 @@ RegisterNetEvent('mdt:server:openMDT', function() local JobType = GetJobType(PlayerData.job.name) local bulletin = GetBulletins(JobType) - local calls = exports['ps-dispatch']:GetDispatchCalls() - --TriggerClientEvent('mdt:client:dashboardbulletin', src, bulletin) TriggerClientEvent('mdt:client:open', src, bulletin, activeUnits, calls, PlayerData.citizenid) - --TriggerClientEvent('mdt:client:GetActiveUnits', src, activeUnits) end) QBCore.Functions.CreateCallback('mdt:server:SearchProfile', function(source, cb, sentData) - if not sentData then return cb({}) end - local src = source - local Player = QBCore.Functions.GetPlayer(src) - if Player then - local JobType = GetJobType(Player.PlayerData.job.name) - if JobType ~= nil then - local people = MySQL.query.await("SELECT p.citizenid, p.charinfo, md.pfp FROM players p LEFT JOIN mdt_data md on p.citizenid = md.cid WHERE LOWER(CONCAT(JSON_VALUE(p.charinfo, '$.firstname'), ' ', JSON_VALUE(p.charinfo, '$.lastname'))) LIKE :query OR LOWER(`charinfo`) LIKE :query OR LOWER(`citizenid`) LIKE :query OR LOWER(`fingerprint`) LIKE :query AND jobtype = :jobtype LIMIT 20", { query = string.lower('%'..sentData..'%'), jobtype = JobType }) - local citizenIds = {} - local citizenIdIndexMap = {} - if not next(people) then cb({}) return end - - for index, data in pairs(people) do - people[index]['warrant'] = false - people[index]['convictions'] = 0 - people[index]['licences'] = GetPlayerLicenses(data.citizenid) - people[index]['pp'] = ProfPic(data.gender, data.pfp) - citizenIds[#citizenIds+1] = data.citizenid - citizenIdIndexMap[data.citizenid] = index - end + if not sentData then return cb({}) end + local src = source + local Player = QBCore.Functions.GetPlayer(src) + if Player then + local JobType = GetJobType(Player.PlayerData.job.name) + if JobType ~= nil then + local people = MySQL.query.await("SELECT p.citizenid, p.charinfo, md.pfp, md.fingerprint FROM players p LEFT JOIN mdt_data md on p.citizenid = md.cid WHERE LOWER(CONCAT(JSON_VALUE(p.charinfo, '$.firstname'), ' ', JSON_VALUE(p.charinfo, '$.lastname'))) LIKE :query OR LOWER(`charinfo`) LIKE :query OR LOWER(`citizenid`) LIKE :query OR LOWER(md.fingerprint) LIKE :query AND jobtype = :jobtype LIMIT 20", { query = string.lower('%'..sentData..'%'), jobtype = JobType }) + local citizenIds = {} + local citizenIdIndexMap = {} + if not next(people) then cb({}) return end + + for index, data in pairs(people) do + people[index]['warrant'] = false + people[index]['convictions'] = 0 + people[index]['licences'] = GetPlayerLicenses(data.citizenid) + people[index]['pp'] = ProfPic(data.gender, data.pfp) + if data.fingerprint and data.fingerprint ~= "" then + people[index]['fingerprint'] = data.fingerprint + else + people[index]['fingerprint'] = "" + end + citizenIds[#citizenIds+1] = data.citizenid + citizenIdIndexMap[data.citizenid] = index + end - local convictions = GetConvictions(citizenIds) + local convictions = GetConvictions(citizenIds) - if next(convictions) then - for _, conv in pairs(convictions) do - if conv.warrant then people[citizenIdIndexMap[conv.cid]].warrant = true end + if next(convictions) then + for _, conv in pairs(convictions) do + if conv.warrant == "1" then people[citizenIdIndexMap[conv.cid]].warrant = true end - local charges = json.decode(conv.charges) - people[citizenIdIndexMap[conv.cid]].convictions = people[citizenIdIndexMap[conv.cid]].convictions + #charges - end - end + local charges = json.decode(conv.charges) + people[citizenIdIndexMap[conv.cid]].convictions = people[citizenIdIndexMap[conv.cid]].convictions + #charges + end + end + TriggerClientEvent('mdt:client:searchProfile', src, people, false) + return cb(people) + end + end - return cb(people) - end - end + return cb({}) +end) - return cb({}) +QBCore.Functions.CreateCallback('ps-mdt:getDispatchCalls', function(source, cb) + local calls = exports['ps-dispatch']:GetDispatchCalls() + cb(calls) end) QBCore.Functions.CreateCallback("mdt:server:getWarrants", function(source, cb) local WarrantData = {} - local data = MySQL.query.await("SELECT * FROM mdt_convictions", {}) + local data = MySQL.query.await("SELECT * FROM mdt_convictions WHERE warrant = 1", {}) for _, value in pairs(data) do - if value.warrant == "1" then - WarrantData[#WarrantData+1] = { - cid = value.cid, - linkedincident = value.linkedincident, - name = GetNameFromId(value.cid), - time = value.time - } - end + WarrantData[#WarrantData+1] = { + cid = value.cid, + linkedincident = value.linkedincident, + name = GetNameFromId(value.cid), + time = value.time + } end cb(WarrantData) end) @@ -214,10 +382,11 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb local JobType = GetJobType(PlayerData.job.name) local target = GetPlayerDataById(sentId) local JobName = PlayerData.job.name + + local apartmentData if not target or not next(target) then return cb({}) end - -- Convert to string because bad code, yes? if type(target.job) == 'string' then target.job = json.decode(target.job) end if type(target.charinfo) == 'string' then target.charinfo = json.decode(target.charinfo) end if type(target.metadata) == 'string' then target.metadata = json.decode(target.metadata) end @@ -231,17 +400,53 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb local job, grade = UnpackJob(target.job) + if Config.UsingPsHousing and not Config.UsingDefaultQBApartments then + local propertyData = GetPlayerPropertiesByCitizenId(target.citizenid) + if propertyData and next(propertyData) then + local apartmentList = {} + for i, property in ipairs(propertyData) do + if property.apartment then + table.insert(apartmentList, property.apartment .. ' Apt # (' .. property.property_id .. ')') + end + end + if #apartmentList > 0 then + apartmentData = table.concat(apartmentList, ', ') + else + TriggerClientEvent("QBCore:Notify", src, 'The citizen does not have an apartment.', 'error') + print('The citizen does not have an apartment. Set Config.UsingPsHousing to false.') + end + else + TriggerClientEvent("QBCore:Notify", src, 'The citizen does not have a property.', 'error') + print('The citizen does not have a property. Set Config.UsingPsHousing to false.') + end + elseif Config.UsingDefaultQBApartments then + apartmentData = GetPlayerApartment(target.citizenid) + if apartmentData then + if apartmentData[1] then + apartmentData = apartmentData[1].label .. ' (' ..apartmentData[1].name..')' + else + TriggerClientEvent("QBCore:Notify", src, 'The citizen does not have an apartment.', 'error') + print('The citizen does not have an apartment. Set Config.UsingDefaultQBApartments to false.') + end + else + TriggerClientEvent("QBCore:Notify", src, 'The citizen does not have an apartment.', 'error') + print('The citizen does not have an apartment. Set Config.UsingDefaultQBApartments to false.') + end + end + local person = { cid = target.citizenid, firstname = target.charinfo.firstname, lastname = target.charinfo.lastname, job = job.label, grade = grade.name, + apartment = apartmentData, pp = ProfPic(target.charinfo.gender), licences = licencesdata, dob = target.charinfo.birthdate, + fingerprint = target.metadata.fingerprint, + phone = target.charinfo.phone, mdtinfo = '', - fingerprint = '', tags = {}, vehicles = {}, properties = {}, @@ -249,13 +454,27 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb isLimited = false } - if Config.PoliceJobs[JobName] then + if Config.PoliceJobs[JobName] or Config.DojJobs[JobName] then local convictions = GetConvictions({person.cid}) + local incidents = {} person.convictions2 = {} local convCount = 1 if next(convictions) then for _, conv in pairs(convictions) do - if conv.warrant then person.warrant = true end + if conv.warrant == "1" then person.warrant = true end + + -- Get the incident details + local id = conv.linkedincident + local incident = GetIncidentName(id) + + if incident then + incidents[#incidents + 1] = { + id = id, + title = incident.title, + time = conv.time + } + end + local charges = json.decode(conv.charges) for _, charge in pairs(charges) do person.convictions2[convCount] = charge @@ -263,74 +482,118 @@ QBCore.Functions.CreateCallback('mdt:server:GetProfileData', function(source, cb end end end + + person.incidents = incidents + local hash = {} person.convictions = {} for _,v in ipairs(person.convictions2) do if (not hash[v]) then - person.convictions[#person.convictions+1] = v -- found this dedupe method on sourceforge somewhere, copy+pasta dev, needs to be refined later + person.convictions[#person.convictions+1] = v hash[v] = true end end + local vehicles = GetPlayerVehicles(person.cid) if vehicles then person.vehicles = vehicles end - local Coords = {} - local Houses = {} - local properties= GetPlayerProperties(person.cid) - for k, v in pairs(properties) do - Coords[#Coords+1] = { - coords = json.decode(v["coords"]), - } - end - for index = 1, #Coords, 1 do - Houses[#Houses+1] = { - label = properties[index]["label"], - coords = tostring(Coords[index]["coords"]["enter"]["x"]..",".. Coords[index]["coords"]["enter"]["y"].. ",".. Coords[index]["coords"]["enter"]["z"]), - } - end - -- if properties then + + if Config.UsingPsHousing and not Config.UsingDefaultQBApartments then + local Coords = {} + local Houses = {} + local propertyData = GetPlayerPropertiesByCitizenId(target.citizenid) + for k, v in pairs(propertyData) do + if not v.apartment then + Coords[#Coords + 1] = { + coords = json.decode(v["door_data"]), + street = v["street"], + propertyid = v["property_id"], + } + end + end + for index = 1, #Coords do + local coordsLocation, label + local coords = Coords[index]["coords"] + + coordsLocation = tostring(coords.x .. "," .. coords.y .. "," .. coords.z) + label = tostring(Coords[index].propertyid .. " " .. Coords[index].street) + + Houses[#Houses + 1] = { + label = label, + coords = coordsLocation, + } + end + person.properties = Houses + else + local Coords = {} + local Houses = {} + local properties= GetPlayerProperties(person.cid) + for k, v in pairs(properties) do + Coords[#Coords+1] = { + coords = json.decode(v["coords"]), + } + end + for index = 1, #Coords, 1 do + Houses[#Houses+1] = { + label = properties[index]["label"], + coords = tostring(Coords[index]["coords"]["enter"]["x"]..",".. Coords[index]["coords"]["enter"]["y"].. ",".. Coords[index]["coords"]["enter"]["z"]), + } + end person.properties = Houses - -- end + end end - local mdtData = GetPersonInformation(sentId, JobType) if mdtData then person.mdtinfo = mdtData.information - person.fingerprint = mdtData.fingerprint person.profilepic = mdtData.pfp person.tags = json.decode(mdtData.tags) person.gallery = json.decode(mdtData.gallery) - end - - local mdtData2 = GetPfpFingerPrintInformation(sentId) - if mdtData2 then - person.fingerprint = mdtData2.fingerprint - person.profilepic = mdtData and mdtData.pfp or "" + person.fingerprint = mdtData.fingerprint + print("Fetched fingerprint from mdt_data:", mdtData.fingerprint) end return cb(person) end) -RegisterNetEvent("mdt:server:saveProfile", function(pfp, information, cid, fName, sName, tags, gallery, fingerprint, licenses) - local src = source - local Player = QBCore.Functions.GetPlayer(src) - ManageLicenses(cid, licenses) - if Player then - local JobType = GetJobType(Player.PlayerData.job.name) - if JobType == 'doj' then JobType = 'police' end - MySQL.Async.insert('INSERT INTO mdt_data (cid, information, pfp, jobtype, tags, gallery, fingerprint) VALUES (:cid, :information, :pfp, :jobtype, :tags, :gallery, :fingerprint) ON DUPLICATE KEY UPDATE cid = :cid, information = :information, pfp = :pfp, tags = :tags, gallery = :gallery, fingerprint = :fingerprint', { - cid = cid, - information = information, - pfp = pfp, - jobtype = JobType, - tags = json.encode(tags), - gallery = json.encode(gallery), - fingerprint = fingerprint, - }) - end +RegisterNetEvent("mdt:server:saveProfile", function(pfp, information, cid, fName, sName, tags, gallery, licenses, fingerprint) + local src = source + local Player = QBCore.Functions.GetPlayer(src) + UpdateAllLicenses(cid, licenses) + if Player then + local JobType = GetJobType(Player.PlayerData.job.name) + if JobType == 'doj' then JobType = 'police' end + + MySQL.Async.insert('INSERT INTO mdt_data (cid, information, pfp, jobtype, tags, gallery, fingerprint) VALUES (:cid, :information, :pfp, :jobtype, :tags, :gallery, :fingerprint) ON DUPLICATE KEY UPDATE cid = :cid, information = :information, pfp = :pfp, jobtype = :jobtype, tags = :tags, gallery = :gallery, fingerprint = :fingerprint', { + cid = cid, + information = information, + pfp = pfp, + jobtype = JobType, + tags = json.encode(tags), + gallery = json.encode(gallery), + fingerprint = fingerprint, + }, function() + end) + end +end) + + +-- Mugshotd +RegisterNetEvent('cqc-mugshot:server:triggerSuspect', function(suspect) + TriggerClientEvent('cqc-mugshot:client:trigger', suspect, suspect) +end) + +RegisterNetEvent('psmdt-mugshot:server:MDTupload', function(citizenid, MugShotURLs) + MugShots[citizenid] = MugShotURLs + local cid = citizenid + MySQL.Async.insert('INSERT INTO mdt_data (cid, pfp, gallery, tags) VALUES (:cid, :pfp, :gallery, :tags) ON DUPLICATE KEY UPDATE cid = :cid, pfp = :pfp, gallery = :gallery, tags = :tags', { + cid = cid, + pfp = MugShots[citizenid][1], + gallery = json.encode(MugShots[citizenid]), + tags = json.encode(tags), + }) end) RegisterNetEvent("mdt:server:updateLicense", function(cid, type, status) @@ -345,7 +608,6 @@ end) -- Incidents - RegisterNetEvent('mdt:server:getAllIncidents', function() local src = source local Player = QBCore.Functions.GetPlayer(src) @@ -516,6 +778,63 @@ RegisterNetEvent('mdt:server:newBolo', function(existing, id, title, plate, owne end end) +RegisterNetEvent('mdt:server:deleteWeapons', function(id) + if id then + local src = source + local Player = QBCore.Functions.GetPlayer(src) + if Config.RemoveWeaponsPerms[Player.PlayerData.job.name] then + if Config.RemoveWeaponsPerms[Player.PlayerData.job.name][Player.PlayerData.job.grade.level] then + local fullName = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname + MySQL.update("DELETE FROM `mdt_weaponinfo` WHERE id=:id", { id = id }) + TriggerEvent('mdt:server:AddLog', "A Weapon Info was deleted by "..fullName.." with the ID ("..id..")") + else + local fullname = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname + TriggerClientEvent("QBCore:Notify", src, 'No Permissions to do that!', 'error') + TriggerEvent('mdt:server:AddLog', fullname.." tryed to delete a Weapon Info with the ID ("..id..")") + end + end + end +end) + +RegisterNetEvent('mdt:server:deleteReports', function(id) + if id then + local src = source + local Player = QBCore.Functions.GetPlayer(src) + if Config.RemoveReportPerms[Player.PlayerData.job.name] then + if Config.RemoveReportPerms[Player.PlayerData.job.name][Player.PlayerData.job.grade.level] then + local fullName = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname + MySQL.update("DELETE FROM `mdt_reports` WHERE id=:id", { id = id }) + TriggerEvent('mdt:server:AddLog', "A Report was deleted by "..fullName.." with the ID ("..id..")") + else + local fullname = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname + TriggerClientEvent("QBCore:Notify", src, 'No Permissions to do that!', 'error') + TriggerEvent('mdt:server:AddLog', fullname.." tryed to delete a Report with the ID ("..id..")") + end + end + end +end) + +RegisterNetEvent('mdt:server:deleteIncidents', function(id) + local src = source + local Player = QBCore.Functions.GetPlayer(src) + if Config.RemoveIncidentPerms[Player.PlayerData.job.name] then + if Config.RemoveIncidentPerms[Player.PlayerData.job.name][Player.PlayerData.job.grade.level] then + local fullName = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname + MySQL.update("DELETE FROM `mdt_convictions` WHERE `linkedincident` = :id", {id = id}) + MySQL.update("UPDATE `mdt_convictions` SET `warrant` = '0' WHERE `linkedincident` = :id", {id = id}) -- Delete any outstanding warrants from incidents + MySQL.update("DELETE FROM `mdt_incidents` WHERE id=:id", { id = id }, function(rowsChanged) + if rowsChanged > 0 then + TriggerEvent('mdt:server:AddLog', "A Incident was deleted by "..fullName.." with the ID ("..id..")") + end + end) + else + local fullname = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname + TriggerClientEvent("QBCore:Notify", src, 'No Permissions to do that!', 'error') + TriggerEvent('mdt:server:AddLog', fullname.." tried to delete an Incident with the ID ("..id..")") + end + end +end) + RegisterNetEvent('mdt:server:deleteBolo', function(id) if id then local src = source @@ -544,27 +863,35 @@ end) RegisterNetEvent('mdt:server:incidentSearchPerson', function(query) if query then - local src = source - local Player = QBCore.Functions.GetPlayer(src) - if Player then - local JobType = GetJobType(Player.PlayerData.job.name) - if JobType == 'police' or JobType == 'doj' then - local function ProfPic(gender, profilepic) - if profilepic then return profilepic end; - if gender == "f" then return "img/female.png" end; - return "img/male.png" - end - - local result = MySQL.query.await("SELECT p.citizenid, p.charinfo, md.pfp from players p LEFT JOIN mdt_data md on p.citizenid = md.cid WHERE LOWER(`charinfo`) LIKE :query OR LOWER(`citizenid`) LIKE :query AND `jobtype` = :jobtype LIMIT 30", { - query = string.lower('%'..query..'%'), -- % wildcard, needed to search for all alike results - jobtype = JobType - }) - local data = {} - for i=1, #result do - local charinfo = json.decode(result[i].charinfo) - data[i] = {id = result[i].citizenid, firstname = charinfo.firstname, lastname = charinfo.lastname, profilepic = ProfPic(charinfo.gender, result[i].pfp)} - end - TriggerClientEvent('mdt:client:incidentSearchPerson', src, data) + local src = source + local Player = QBCore.Functions.GetPlayer(src) + if Player then + local JobType = GetJobType(Player.PlayerData.job.name) + if JobType == 'police' or JobType == 'doj' or JobType == 'ambulance' then + local function ProfPic(gender, profilepic) + if profilepic then return profilepic end; + if gender == "f" then return "img/female.png" end; + return "img/male.png" + end + + local result = MySQL.query.await("SELECT p.citizenid, p.charinfo, p.metadata, md.pfp from players p LEFT JOIN mdt_data md on p.citizenid = md.cid WHERE LOWER(CONCAT(JSON_VALUE(p.charinfo, '$.firstname'), ' ', JSON_VALUE(p.charinfo, '$.lastname'))) LIKE :query OR LOWER(`charinfo`) LIKE :query OR LOWER(`citizenid`) LIKE :query OR LOWER(md.fingerprint) LIKE :query AND jobtype = :jobtype LIMIT 30", { + query = string.lower('%'..query..'%'), + jobtype = JobType + }) + + local data = {} + for i=1, #result do + local charinfo = json.decode(result[i].charinfo) + local metadata = json.decode(result[i].metadata) + data[i] = { + id = result[i].citizenid, + firstname = charinfo.firstname, + lastname = charinfo.lastname, + profilepic = ProfPic(charinfo.gender, result[i].pfp), + callsign = metadata.callsign + } + end + TriggerClientEvent('mdt:client:incidentSearchPerson', src, data) end end end @@ -730,7 +1057,6 @@ QBCore.Functions.CreateCallback('mdt:server:SearchVehicles', function(source, cb value.owner = ownerResult['firstname'] .. " " .. ownerResult['lastname'] end - -- idk if this works or I have to call cb first then return :shrug: return cb(vehicles) end @@ -770,12 +1096,13 @@ RegisterNetEvent('mdt:server:getVehicleData', function(plate) if info then vehicle[1]['information'] = info['information'] vehicle[1]['dbid'] = info['id'] + vehicle[1]['points'] = info['points'] vehicle[1]['image'] = info['image'] vehicle[1]['code'] = info['code5'] vehicle[1]['stolen'] = info['stolen'] end - if vehicle[1]['image'] == nil then vehicle[1]['image'] = "img/not-found.webp" end -- Image + if vehicle[1]['image'] == nil then vehicle[1]['image'] = "img/not-found.webp" end end TriggerClientEvent('mdt:client:getVehicleData', src, vehicle) @@ -784,7 +1111,7 @@ RegisterNetEvent('mdt:server:getVehicleData', function(plate) end end) -RegisterNetEvent('mdt:server:saveVehicleInfo', function(dbid, plate, imageurl, notes, stolen, code5, impoundInfo) +RegisterNetEvent('mdt:server:saveVehicleInfo', function(dbid, plate, imageurl, notes, stolen, code5, impoundInfo, points) if plate then local src = source local Player = QBCore.Functions.GetPlayer(src) @@ -794,14 +1121,14 @@ RegisterNetEvent('mdt:server:saveVehicleInfo', function(dbid, plate, imageurl, n local fullname = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname TriggerEvent('mdt:server:AddLog', "A vehicle with the plate ("..plate..") has a new image ("..imageurl..") edited by "..fullname) if tonumber(dbid) == 0 then - MySQL.insert('INSERT INTO `mdt_vehicleinfo` (`plate`, `information`, `image`, `code5`, `stolen`) VALUES (:plate, :information, :image, :code5, :stolen)', { plate = string.gsub(plate, "^%s*(.-)%s*$", "%1"), information = notes, image = imageurl, code5 = code5, stolen = stolen }, function(infoResult) + MySQL.insert('INSERT INTO `mdt_vehicleinfo` (`plate`, `information`, `image`, `code5`, `stolen`, `points`) VALUES (:plate, :information, :image, :code5, :stolen, :points)', { plate = string.gsub(plate, "^%s*(.-)%s*$", "%1"), information = notes, image = imageurl, code5 = code5, stolen = stolen, points = tonumber(points) }, function(infoResult) if infoResult then TriggerClientEvent('mdt:client:updateVehicleDbId', src, infoResult) TriggerEvent('mdt:server:AddLog', "A vehicle with the plate ("..plate..") was added to the vehicle information database by "..fullname) end end) elseif tonumber(dbid) > 0 then - MySQL.update("UPDATE mdt_vehicleinfo SET `information`= :information, `image`= :image, `code5`= :code5, `stolen`= :stolen WHERE `plate`= :plate LIMIT 1", { plate = string.gsub(plate, "^%s*(.-)%s*$", "%1"), information = notes, image = imageurl, code5 = code5, stolen = stolen }) + MySQL.update("UPDATE mdt_vehicleinfo SET `information`= :information, `image`= :image, `code5`= :code5, `stolen`= :stolen, `points`= :points WHERE `plate`= :plate LIMIT 1", { plate = string.gsub(plate, "^%s*(.-)%s*$", "%1"), information = notes, image = imageurl, code5 = code5, stolen = stolen, points = tonumber(points) }) end if impoundInfo.impoundChanged then @@ -821,7 +1148,7 @@ RegisterNetEvent('mdt:server:saveVehicleInfo', function(dbid, plate, imageurl, n fee = fee, time = os.time() + (time * 60) }, function(res) - -- notify? + local data = { vehicleid = data['id'], plate = plate, @@ -862,6 +1189,100 @@ RegisterNetEvent('mdt:server:saveVehicleInfo', function(dbid, plate, imageurl, n end end) +RegisterNetEvent('mdt:server:searchCalls', function(calls) + local src = source + local Player = QBCore.Functions.GetPlayer(src) + local JobType = GetJobType(Player.PlayerData.job.name) + if JobType == 'police' then + TriggerClientEvent('mdt:client:getCalls', src, calls) + + end +end) + +QBCore.Functions.CreateCallback('mdt:server:SearchWeapons', function(source, cb, sentData) + if not sentData then return cb({}) end + local PlayerData = GetPlayerData(source) + if not PermCheck(source, PlayerData) then return cb({}) end + + local Player = QBCore.Functions.GetPlayer(source) + if Player then + local JobType = GetJobType(Player.PlayerData.job.name) + if JobType == 'police' or JobType == 'doj' then + local matches = MySQL.query.await('SELECT * FROM mdt_weaponinfo WHERE LOWER(`serial`) LIKE :query OR LOWER(`weapModel`) LIKE :query OR LOWER(`owner`) LIKE :query LIMIT 25', { + query = string.lower('%'..sentData..'%') + }) + cb(matches) + end + end +end) + +RegisterNetEvent('mdt:server:saveWeaponInfo', function(serial, imageurl, notes, owner, weapClass, weapModel) + if serial then + local PlayerData = GetPlayerData(source) + if not PermCheck(source, PlayerData) then return cb({}) end + + local Player = QBCore.Functions.GetPlayer(source) + if Player then + local JobType = GetJobType(Player.PlayerData.job.name) + if JobType == 'police' or JobType == 'doj' then + local fullname = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname + if imageurl == nil then imageurl = 'img/not-found.webp' end + --AddLog event? + local result = false + result = MySQL.Async.insert('INSERT INTO mdt_weaponinfo (serial, owner, information, weapClass, weapModel, image) VALUES (:serial, :owner, :notes, :weapClass, :weapModel, :imageurl) ON DUPLICATE KEY UPDATE owner = :owner, information = :notes, weapClass = :weapClass, weapModel = :weapModel, image = :imageurl', { + ['serial'] = serial, + ['owner'] = owner, + ['notes'] = notes, + ['weapClass'] = weapClass, + ['weapModel'] = weapModel, + ['imageurl'] = imageurl, + }) + + if result then + TriggerEvent('mdt:server:AddLog', "A weapon with the serial number ("..serial..") was added to the weapon information database by "..fullname) + else + TriggerEvent('mdt:server:AddLog', "A weapon with the serial number ("..serial..") failed to be added to the weapon information database by "..fullname) + end + end + end + end +end) + +function CreateWeaponInfo(serial, imageurl, notes, owner, weapClass, weapModel) + + local results = MySQL.query.await('SELECT * FROM mdt_weaponinfo WHERE serial = ?', { serial }) + if results[1] then + return + end + + if serial == nil then return end + if imageurl == nil then imageurl = 'img/not-found.webp' end + + MySQL.Async.insert('INSERT INTO mdt_weaponinfo (serial, owner, information, weapClass, weapModel, image) VALUES (:serial, :owner, :notes, :weapClass, :weapModel, :imageurl) ON DUPLICATE KEY UPDATE owner = :owner, information = :notes, weapClass = :weapClass, weapModel = :weapModel, image = :imageurl', { + ['serial'] = serial, + ['owner'] = owner, + ['notes'] = notes, + ['weapClass'] = weapClass, + ['weapModel'] = weapModel, + ['imageurl'] = imageurl, + }) +end + +exports('CreateWeaponInfo', CreateWeaponInfo) + +RegisterNetEvent('mdt:server:getWeaponData', function(serial) + if serial then + local Player = QBCore.Functions.GetPlayer(source) + if Player then + local JobType = GetJobType(Player.PlayerData.job.name) + if JobType == 'police' or JobType == 'doj' then + local results = MySQL.query.await('SELECT * FROM mdt_weaponinfo WHERE serial = ?', { serial }) + TriggerClientEvent('mdt:client:getWeaponData', Player.PlayerData.source, results) + end + end + end +end) + RegisterNetEvent('mdt:server:getAllLogs', function() local src = source local Player = QBCore.Functions.GetPlayer(src) @@ -926,72 +1347,138 @@ RegisterNetEvent('mdt:server:setCallsign', function(cid, newcallsign) end) RegisterNetEvent('mdt:server:saveIncident', function(id, title, information, tags, officers, civilians, evidence, associated, time) - local src = source - local Player = QBCore.Functions.GetPlayer(src) - if Player then - if GetJobType(Player.PlayerData.job.name) == 'police' then - if id == 0 then - local fullname = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname - MySQL.insert('INSERT INTO `mdt_incidents` (`author`, `title`, `details`, `tags`, `officersinvolved`, `civsinvolved`, `evidence`, `time`, `jobtype`) VALUES (:author, :title, :details, :tags, :officersinvolved, :civsinvolved, :evidence, :time, :jobtype)', - { - author = fullname, - title = title, - details = information, - tags = json.encode(tags), - officersinvolved = json.encode(officers), - civsinvolved = json.encode(civilians), - evidence = json.encode(evidence), - time = time, - jobtype = 'police', - }, function(infoResult) - if infoResult then - for i=1, #associated do - MySQL.insert('INSERT INTO `mdt_convictions` (`cid`, `linkedincident`, `warrant`, `guilty`, `processed`, `associated`, `charges`, `fine`, `sentence`, `recfine`, `recsentence`, `time`) VALUES (:cid, :linkedincident, :warrant, :guilty, :processed, :associated, :charges, :fine, :sentence, :recfine, :recsentence, :time)', { - cid = associated[i]['Cid'], - linkedincident = infoResult, - warrant = associated[i]['Warrant'], - guilty = associated[i]['Guilty'], - processed = associated[i]['Processed'], - associated = associated[i]['Isassociated'], - charges = json.encode(associated[i]['Charges']), - fine = tonumber(associated[i]['Fine']), - sentence = tonumber(associated[i]['Sentence']), - recfine = tonumber(associated[i]['recfine']), - recsentence = tonumber(associated[i]['recsentence']), - time = time - }) - end - TriggerClientEvent('mdt:client:updateIncidentDbId', src, infoResult) - --TriggerEvent('mdt:server:AddLog', "A vehicle with the plate ("..plate..") was added to the vehicle information database by "..player['fullname']) - end - end) - elseif id > 0 then - MySQL.update("UPDATE mdt_incidents SET title=:title, details=:details, civsinvolved=:civsinvolved, tags=:tags, officersinvolved=:officersinvolved, evidence=:evidence WHERE id=:id", { - title = title, - details = information, - tags = json.encode(tags), - officersinvolved = json.encode(officers), - civsinvolved = json.encode(civilians), - evidence = json.encode(evidence), - id = id - }) - for i=1, #associated do - TriggerEvent('mdt:server:handleExistingConvictions', associated[i], id, time) - end - end - end - end + local src = source + local Player = QBCore.Functions.GetPlayer(src) + if Player then + if GetJobType(Player.PlayerData.job.name) == 'police' then + if id == 0 then + local fullname = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname + MySQL.insert('INSERT INTO `mdt_incidents` (`author`, `title`, `details`, `tags`, `officersinvolved`, `civsinvolved`, `evidence`, `time`, `jobtype`) VALUES (:author, :title, :details, :tags, :officersinvolved, :civsinvolved, :evidence, :time, :jobtype)', + { + author = fullname, + title = title, + details = information, + tags = json.encode(tags), + officersinvolved = json.encode(officers), + civsinvolved = json.encode(civilians), + evidence = json.encode(evidence), + time = time, + jobtype = 'police', + }, function(infoResult) + if infoResult then + MySQL.Async.fetchAll('SELECT `author`, `title`, `details` FROM `mdt_incidents` WHERE `id` = @id', { ['@id'] = infoResult }, function(result) + if result and #result > 0 then + local message = generateMessageFromResult(result) + + for i=1, #associated do + local associatedData = { + cid = associated[i]['Cid'], + linkedincident = associated[i]['LinkedIncident'], + warrant = associated[i]['Warrant'], + guilty = associated[i]['Guilty'], + processed = associated[i]['Processed'], + associated = associated[i]['Isassociated'], + charges = json.encode(associated[i]['Charges']), + fine = tonumber(associated[i]['Fine']), + sentence = tonumber(associated[i]['Sentence']), + recfine = tonumber(associated[i]['recfine']), + recsentence = tonumber(associated[i]['recsentence']), + time = associated[i]['Time'], + officersinvolved = officers, + civsinvolved = civilians + } + sendIncidentToDiscord(3989503, "MDT Incident Report", message, "ps-mdt | Made by Project Sloth", associatedData) + end + else + print('No incident found in the mdt_incidents table with id: ' .. infoResult) + end + end) + + for i=1, #associated do + MySQL.insert('INSERT INTO `mdt_convictions` (`cid`, `linkedincident`, `warrant`, `guilty`, `processed`, `associated`, `charges`, `fine`, `sentence`, `recfine`, `recsentence`, `time`) VALUES (:cid, :linkedincident, :warrant, :guilty, :processed, :associated, :charges, :fine, :sentence, :recfine, :recsentence, :time)', { + cid = associated[i]['Cid'], + linkedincident = infoResult, + warrant = associated[i]['Warrant'], + guilty = associated[i]['Guilty'], + processed = associated[i]['Processed'], + associated = associated[i]['Isassociated'], + charges = json.encode(associated[i]['Charges']), + fine = tonumber(associated[i]['Fine']), + sentence = tonumber(associated[i]['Sentence']), + recfine = tonumber(associated[i]['recfine']), + recsentence = tonumber(associated[i]['recsentence']), + time = time, + officersinvolved = officers, + civsinvolved = civilians + }) + end + TriggerClientEvent('mdt:client:updateIncidentDbId', src, infoResult) + end + end) + elseif id > 0 then + MySQL.Async.fetchAll('SELECT `author`, `title`, `details` FROM `mdt_incidents` WHERE `id` = @id', { ['@id'] = id }, function(result) + if result and #result > 0 then + local message = generateMessageFromResult(result) + + for i=1, #associated do + local associatedData = { + cid = associated[i]['Cid'], + linkedincident = associated[i]['LinkedIncident'], + warrant = associated[i]['Warrant'], + guilty = associated[i]['Guilty'], + processed = associated[i]['Processed'], + associated = associated[i]['Isassociated'], + charges = json.encode(associated[i]['Charges']), + fine = tonumber(associated[i]['Fine']), + sentence = tonumber(associated[i]['Sentence']), + recfine = tonumber(associated[i]['recfine']), + recsentence = tonumber(associated[i]['recsentence']), + time = associated[i]['Time'], + officersinvolved = officers, + civsinvolved = civilians + } + sendIncidentToDiscord(16711680, "MDT Incident Report has been Updated", message, "ps-mdt | Made by Project Sloth", associatedData) + end + else + print('No incident found in the mdt_incidents table with id: ' .. id) + end + end) + + MySQL.Async.execute('UPDATE `mdt_incidents` SET `title` = @title, `details` = @details, `tags` = @tags, `officersinvolved` = @officersinvolved, `civsinvolved` = @civsinvolved, `evidence` = @evidence, `time` = @time WHERE `id` = @id', + { + ['@id'] = id, + ['@title'] = title, + ['@details'] = information, + ['@tags'] = json.encode(tags), + ['@officersinvolved'] = json.encode(officers), + ['@civsinvolved'] = json.encode(civilians), + ['@evidence'] = json.encode(evidence), + ['@time'] = time, + }, function(rowsChanged) + if rowsChanged > 0 then + --print('Updated incident' .. id) + else + print('Failed to update incident with id: ' .. id) + end + end) + + for i=1, #associated do + TriggerEvent('mdt:server:handleExistingConvictions', associated[i], id, time) + end + end + end + end end) -RegisterNetEvent('mdt:server:handleExistingConvictions', function(data, incidentid, time) +RegisterNetEvent('mdt:server:handleExistingConvictions', function(data, incidentId, time) MySQL.query('SELECT * FROM mdt_convictions WHERE cid=:cid AND linkedincident=:linkedincident', { cid = data['Cid'], - linkedincident = incidentid + linkedincident = incidentId }, function(convictionRes) if convictionRes and convictionRes[1] and convictionRes[1]['id'] then MySQL.update('UPDATE mdt_convictions SET cid=:cid, linkedincident=:linkedincident, warrant=:warrant, guilty=:guilty, processed=:processed, associated=:associated, charges=:charges, fine=:fine, sentence=:sentence, recfine=:recfine, recsentence=:recsentence WHERE cid=:cid AND linkedincident=:linkedincident', { cid = data['Cid'], - linkedincident = incidentid, + linkedincident = incidentId, warrant = data['Warrant'], guilty = data['Guilty'], processed = data['Processed'], @@ -1005,7 +1492,7 @@ RegisterNetEvent('mdt:server:handleExistingConvictions', function(data, incident else MySQL.insert('INSERT INTO `mdt_convictions` (`cid`, `linkedincident`, `warrant`, `guilty`, `processed`, `associated`, `charges`, `fine`, `sentence`, `recfine`, `recsentence`, `time`) VALUES (:cid, :linkedincident, :warrant, :guilty, :processed, :associated, :charges, :fine, :sentence, :recfine, :recsentence, :time)', { cid = data['Cid'], - linkedincident = incidentid, + linkedincident = incidentId, warrant = data['Warrant'], guilty = data['Guilty'], processed = data['Processed'], @@ -1029,92 +1516,39 @@ RegisterNetEvent('mdt:server:removeIncidentCriminal', function(cid, incident) end) -- Dispatch - RegisterNetEvent('mdt:server:setWaypoint', function(callid) - local src = source - local Player = QBCore.Functions.GetPlayer(source) - local JobType = GetJobType(Player.PlayerData.job.name) - if JobType == 'police' or JobType == 'ambulance' then - if callid then - if isDispatchRunning then - local calls = exports['ps-dispatch']:GetDispatchCalls() - TriggerClientEvent('mdt:client:setWaypoint', src, calls[callid]) - end - end - end -end) - -RegisterNetEvent('mdt:server:callDetach', function(callid) - local src = source - local Player = QBCore.Functions.GetPlayer(src) - local playerdata = { - fullname = Player.PlayerData.charinfo.firstname.. " "..Player.PlayerData.charinfo.lastname, - job = Player.PlayerData.job, - cid = Player.PlayerData.citizenid, - callsign = Player.PlayerData.metadata.callsign - } - local JobType = GetJobType(Player.PlayerData.job.name) - if JobType == 'police' or JobType == 'ambulance' then - if callid then - TriggerEvent('dispatch:removeUnit', callid, playerdata, function(newNum) - TriggerClientEvent('mdt:client:callDetach', -1, callid, newNum) - end) - end - end -end) - -RegisterNetEvent('mdt:server:callAttach', function(callid) - local src = source - local Player = QBCore.Functions.GetPlayer(src) - local playerdata = { - fullname = Player.PlayerData.charinfo.firstname.. " "..Player.PlayerData.charinfo.lastname, - job = Player.PlayerData.job, - cid = Player.PlayerData.citizenid, - callsign = Player.PlayerData.metadata.callsign - } - local JobType = GetJobType(Player.PlayerData.job.name) - if JobType == 'police' or JobType == 'ambulance' then - if callid then - TriggerEvent('dispatch:addUnit', callid, playerdata, function(newNum) - TriggerClientEvent('mdt:client:callAttach', -1, callid, newNum) - end) - end - end - -end) - -RegisterNetEvent('mdt:server:attachedUnits', function(callid) local src = source local Player = QBCore.Functions.GetPlayer(src) + local callid = tonumber(callid) local JobType = GetJobType(Player.PlayerData.job.name) + if not callid then return end if JobType == 'police' or JobType == 'ambulance' then - if callid then - if isDispatchRunning then - local calls = exports['ps-dispatch']:GetDispatchCalls() - TriggerClientEvent('mdt:client:attachedUnits', src, calls[callid]['units'], callid) + if isDispatchRunning then + for i = 1, #calls do + if calls[i]['id'] == callid then + TriggerClientEvent('mdt:client:setWaypoint', src, calls[i]) + return + end end end end end) -RegisterNetEvent('mdt:server:callDispatchDetach', function(callid, cid) - local src = source - local Player = QBCore.Functions.GetPlayer(src) - local playerdata = { - fullname = Player.PlayerData.charinfo.firstname.. " "..Player.PlayerData.charinfo.lastname, - job = Player.PlayerData.job, - cid = Player.PlayerData.citizenid, - callsign = Player.PlayerData.metadata.callsign - } - local callid = tonumber(callid) - local JobType = GetJobType(Player.PlayerData.job.name) - if JobType == 'police' or JobType == 'ambulance' then - if callid then - TriggerEvent('dispatch:removeUnit', callid, playerdata, function(newNum) - TriggerClientEvent('mdt:client:callDetach', -1, callid, newNum) - end) - end - end +RegisterNetEvent('mdt:server:attachedUnits', function(callid) + local src = source + local Player = QBCore.Functions.GetPlayer(src) + local JobType = GetJobType(Player.PlayerData.job.name) + if not callid then return end + if JobType == 'police' or JobType == 'ambulance' then + if isDispatchRunning then + for i = 1, #calls do + if calls[i]['id'] == callid then + TriggerClientEvent('mdt:client:attachedUnits', src, calls[i]['units'], callid) + return + end + end + end + end end) RegisterNetEvent('mdt:server:setDispatchWaypoint', function(callid, cid) @@ -1122,15 +1556,17 @@ RegisterNetEvent('mdt:server:setDispatchWaypoint', function(callid, cid) local Player = QBCore.Functions.GetPlayer(src) local callid = tonumber(callid) local JobType = GetJobType(Player.PlayerData.job.name) + if not callid then return end if JobType == 'police' or JobType == 'ambulance' then - if callid then - if isDispatchRunning then - local calls = exports['ps-dispatch']:GetDispatchCalls() - TriggerClientEvent('mdt:client:setWaypoint', src, calls[callid]) + if isDispatchRunning then + for i = 1, #calls do + if calls[i]['id'] == callid then + TriggerClientEvent('mdt:client:setWaypoint', src, calls[i]) + return + end end end end - end) RegisterNetEvent('mdt:server:callDragAttach', function(callid, cid) @@ -1184,7 +1620,6 @@ RegisterNetEvent('mdt:server:sendMessage', function(message, time) } dispatchMessages[#dispatchMessages+1] = Item TriggerClientEvent('mdt:client:dashboardMessage', -1, Item) - -- Send to all clients, for auto updating stuff, ya dig. end) end end @@ -1201,9 +1636,9 @@ end) RegisterNetEvent('mdt:server:getCallResponses', function(callid) local src = source local Player = QBCore.Functions.GetPlayer(src) - if IsPolice(Player.PlayerData.job.name) then + if IsPoliceOrEms(Player.PlayerData.job.name) then if isDispatchRunning then - local calls = exports['ps-dispatch']:GetDispatchCalls() + TriggerClientEvent('mdt:client:getCallResponses', src, calls[callid]['responses'], callid) end end @@ -1213,7 +1648,7 @@ RegisterNetEvent('mdt:server:sendCallResponse', function(message, time, callid) local src = source local Player = QBCore.Functions.GetPlayer(src) local name = Player.PlayerData.charinfo.firstname.. " "..Player.PlayerData.charinfo.lastname - if IsPolice(Player.PlayerData.job.name) then + if IsPoliceOrEms(Player.PlayerData.job.name) then TriggerEvent('dispatch:sendCallResponse', src, callid, message, time, function(isGood) if isGood then TriggerClientEvent('mdt:client:sendCallResponse', -1, message, time, callid, name) @@ -1224,19 +1659,16 @@ end) RegisterNetEvent('mdt:server:setRadio', function(cid, newRadio) local src = source - local Player = QBCore.Functions.GetPlayer(src) - if Player.PlayerData.citizenid ~= cid then - TriggerClientEvent("QBCore:Notify", src, 'You can only change your radio!', 'error') - return + local targetPlayer = QBCore.Functions.GetPlayerByCitizenId(cid) + local targetSource = targetPlayer.PlayerData.source + local targetName = targetPlayer.PlayerData.charinfo.firstname .. ' ' .. targetPlayer.PlayerData.charinfo.lastname + + local radio = targetPlayer.Functions.GetItemByName("radio") + if radio ~= nil then + TriggerClientEvent('mdt:client:setRadio', targetSource, newRadio) else - local radio = Player.Functions.GetItemByName("radio") - if radio ~= nil then - TriggerClientEvent('mdt:client:setRadio', src, newRadio) - else - TriggerClientEvent("QBCore:Notify", src, 'You do not have a radio!', 'error') - end + TriggerClientEvent("QBCore:Notify", src, targetName..' does not have a radio!', 'error') end - end) local function isRequestVehicle(vehId) @@ -1250,7 +1682,7 @@ local function isRequestVehicle(vehId) end return found end -exports('isRequestVehicle', isRequestVehicle) -- exports['erp_mdt']:isRequestVehicle() +exports('isRequestVehicle', isRequestVehicle) RegisterNetEvent('mdt:server:impoundVehicle', function(sentInfo, sentVehicle) local src = source @@ -1334,14 +1766,29 @@ RegisterServerEvent("mdt:server:AddLog", function(text) end) function GetBoloStatus(plate) + local result = MySQL.query.await("SELECT * FROM mdt_bolos where plate = @plate", {['@plate'] = plate}) if result and result[1] then - return true + local title = result[1]['title'] + local boloId = result[1]['id'] + return true, title, boloId end return false end +function GetWarrantStatus(plate) + local result = MySQL.query.await("SELECT p.plate, p.citizenid, m.id FROM player_vehicles p INNER JOIN mdt_convictions m ON p.citizenid = m.cid WHERE m.warrant =1 AND p.plate =?", {plate}) + if result and result[1] then + local citizenid = result[1]['citizenid'] + local Player = QBCore.Functions.GetPlayerByCitizenId(citizenid) + local owner = Player.PlayerData.charinfo.firstname.." "..Player.PlayerData.charinfo.lastname + local incidentId = result[1]['id'] + return true, owner, incidentId + end + return false +end + function GetVehicleInformation(plate) local result = MySQL.query.await('SELECT * FROM mdt_vehicleinfo WHERE plate = @plate', {['@plate'] = plate}) if result[1] then @@ -1351,3 +1798,343 @@ function GetVehicleInformation(plate) end end +function GetVehicleOwner(plate) + + local result = MySQL.query.await('SELECT plate, citizenid, id FROM player_vehicles WHERE plate = @plate', {['@plate'] = plate}) + if result and result[1] then + local citizenid = result[1]['citizenid'] + local Player = QBCore.Functions.GetPlayerByCitizenId(citizenid) + local owner = Player.PlayerData.charinfo.firstname.." "..Player.PlayerData.charinfo.lastname + return owner + end +end + +-- Returns the source for the given citizenId +QBCore.Functions.CreateCallback('mdt:server:GetPlayerSourceId', function(source, cb, targetCitizenId) + local targetPlayer = QBCore.Functions.GetPlayerByCitizenId(targetCitizenId) + if targetPlayer == nil then + TriggerClientEvent('QBCore:Notify', source, "Citizen seems Asleep / Missing", "error") + return + end + local targetSource = targetPlayer.PlayerData.source + + cb(targetSource) +end) + +QBCore.Functions.CreateCallback('getWeaponInfo', function(source, cb) + local Player = QBCore.Functions.GetPlayer(source) + local weaponInfos = {} + if Config.InventoryForWeaponsImages == "ox_inventory" then + local inv = exports.ox_inventory:GetInventoryItems(source) + for _, item in pairs(inv) do + if string.find(item.name, "WEAPON_") then + local invImage = ("https://cfx-nui-ox_inventory/web/images/%s.png"):format(item.name) + if invImage then + weaponInfo = { + serialnumber = item.metadata.serial, + owner = Player.PlayerData.charinfo.firstname .. " " .. Player.PlayerData.charinfo.lastname, + weaponmodel = QBCore.Shared.Items[string.lower(item.name)].label, + weaponurl = invImage, + notes = "Self Registered", + weapClass = "Class 1", + } + break + end + end + end + else -- qb/lj + for _, item in pairs(Player.PlayerData.items) do + if item.type == "weapon" then + local invImage = ("https://cfx-nui-%s/html/images/%s"):format(Config.InventoryForWeaponsImages, item.image) + if invImage then + local weaponInfo = { + serialnumber = item.info.serie, + owner = Player.PlayerData.charinfo.firstname .. " " .. Player.PlayerData.charinfo.lastname, + weaponmodel = QBCore.Shared.Items[item.name].label, + weaponurl = invImage, + notes = "Self Registered", + weapClass = "Class 1", + } + table.insert(weaponInfos, weaponInfo) + end + end + end + end + cb(weaponInfos) +end) + +RegisterNetEvent('mdt:server:registerweapon', function(serial, imageurl, notes, owner, weapClass, weapModel) + exports['ps-mdt']:CreateWeaponInfo(serial, imageurl, notes, owner, weapClass, weapModel) +end) + +local function giveCitationItem(src, citizenId, fine, incidentId) + local Player = QBCore.Functions.GetPlayerByCitizenId(citizenId) + local PlayerName = Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname + local Officer = QBCore.Functions.GetPlayer(src) + local OfficerFullName = '(' .. Officer.PlayerData.metadata.callsign .. ') ' .. Officer.PlayerData.charinfo.firstname .. ' ' .. Officer.PlayerData.charinfo.lastname + local info = {} + local date = os.date("%Y-%m-%d %H:%M") + if Config.InventoryForWeaponsImages == "ox_inventory" then + info = { + description = { + 'Citizen ID: ' .. citizenId ' \n', + 'Fine: $ ' .. fine ' \n', + 'Date: ' .. date ' \n', + 'Incitent ID: # ' .. incidentId ' \n', + 'Officer: ' .. OfficerFullName + } + } + else + info = { + citizenId = citizenId, + fine = "$"..fine, + date = date, + incidentId = "#"..incidentId, + officer = OfficerFullName, + } + end + Player.Functions.AddItem('mdtcitation', 1, false, info) + TriggerClientEvent('QBCore:Notify', src, PlayerName.." (" ..citizenId.. ") received a citation!") + if Config.QBBankingUse then + exports['qb-banking']:AddMoney(Officer.PlayerData.job.name, fine) + end + TriggerClientEvent('inventory:client:ItemBox', Player.PlayerData.source, QBCore.Shared.Items['mdtcitation'], "add") + TriggerEvent('mdt:server:AddLog', "A Fine was writen by "..OfficerFullName.." and was sent to "..PlayerName..", the Amount was $".. fine ..". (ID: "..incidentId.. ")") +end + +-- Removes money from the players bank and gives them a citation item +RegisterNetEvent('mdt:server:removeMoney', function(citizenId, fine, incidentId) + local src = source + local Player = QBCore.Functions.GetPlayerByCitizenId(citizenId) + + if not antiSpam then + if Player.Functions.RemoveMoney('bank', fine, 'lspd-fine') then + TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, fine.."$ was removed from your bank!") + giveCitationItem(src, citizenId, fine, incidentId) + else + TriggerClientEvent('QBCore:Notify', Player.PlayerData.source, "Something went wrong!") + end + antiSpam = true + SetTimeout(60000, function() + antiSpam = false + end) + else + TriggerClientEvent('QBCore:Notify', src, "On cooldown!") + end +end) + +-- Gives the player a citation item +RegisterNetEvent('mdt:server:giveCitationItem', function(citizenId, fine, incidentId) + local src = source + giveCitationItem(src, citizenId, fine, incidentId) +end) + +function getTopOfficers(callback) + local result = {} + local query = 'SELECT * FROM mdt_clocking ORDER BY total_time DESC LIMIT 25' + MySQL.Async.fetchAll(query, {}, function(officers) + for k, officer in ipairs(officers) do + table.insert(result, { + rank = k, + name = officer.firstname .. " " .. officer.lastname, + callsign = officer.user_id, + totalTime = format_time(officer.total_time) + }) + end + callback(result) + end) +end + +RegisterServerEvent("mdt:requestOfficerData") +AddEventHandler("mdt:requestOfficerData", function() + local src = source + getTopOfficers(function(officerData) + TriggerClientEvent("mdt:receiveOfficerData", src, officerData) + end) +end) + +function sendToDiscord(color, name, message, footer) + if ClockinWebhook == '' then + print("\27[31mA webhook is missing in: ClockinWebhook (server > main.lua > line 20)\27[0m") + else + local embed = { + { + color = color, + title = "**".. name .."**", + description = message, + footer = { + text = footer, + }, + } + } + + PerformHttpRequest(ClockinWebhook, function(err, text, headers) end, 'POST', json.encode({username = name, embeds = embed}), { ['Content-Type'] = 'application/json' }) + end +end + +function sendIncidentToDiscord(color, name, message, footer, associatedData) + local rolePing = "<@&1074119792258199582>" -- DOJ role to be pigned when the person is not Guilty. + local pingMessage = "" + + if IncidentWebhook == '' then + print("\27[31mA webhook is missing in: IncidentWebhook (server > main.lua > line 24)\27[0m") + else + if associatedData then + message = message .. "\n\n--- Associated Data ---" + message = message .. "\nCID: " .. (associatedData.cid or "Not Found") + + if associatedData.guilty == false then + pingMessage = "**Guilty: Not Guilty - Need Court Case** " .. rolePing + message = message .. "\n" .. pingMessage + else + message = message .. "\nGuilty: " .. tostring(associatedData.guilty or "Not Found") + end + + + if associatedData.officersinvolved and #associatedData.officersinvolved > 0 then + local officersList = table.concat(associatedData.officersinvolved, ", ") + message = message .. "\nOfficers Involved: " .. officersList + else + message = message .. "\nOfficers Involved: None" + end + + if associatedData.civsinvolved and #associatedData.civsinvolved > 0 then + local civsList = table.concat(associatedData.civsinvolved, ", ") + message = message .. "\nCivilians Involved: " .. civsList + else + message = message .. "\nCivilians Involved: None" + end + + + message = message .. "\nWarrant: " .. tostring(associatedData.warrant or "No Warrants") + message = message .. "\nReceived Fine: $" .. tostring(associatedData.fine or "Not Found") + message = message .. "\nReceived Sentence: " .. tostring(associatedData.sentence or "Not Found") + message = message .. "\nRecommended Fine: $" .. tostring(associatedData.recfine or "Not Found") + message = message .. "\nRecommended Sentence: " .. tostring(associatedData.recsentence or "Not Found") + + local chargesTable = json.decode(associatedData.charges) + if chargesTable and #chargesTable > 0 then + local chargeList = table.concat(chargesTable, "\n") + message = message .. "\n**Charges:** \n" .. chargeList + else + message = message .. "\n**Charges: No Charges**" + end + end + + local embed = { + { + color = color, + title = "**".. name .."**", + description = message, + footer = { + text = footer, + }, + } + } + + PerformHttpRequest(IncidentWebhook, function(err, text, headers) end, 'POST', json.encode({content = pingMessage, username = name, embeds = embed}), { ['Content-Type'] = 'application/json' }) + end +end + +function format_time(time) + local days = math.floor(time / 86400) + time = time % 86400 + local hours = math.floor(time / 3600) + time = time % 3600 + local minutes = math.floor(time / 60) + local seconds = time % 60 + + local formattedTime = "" + if days > 0 then + formattedTime = string.format("%d day%s ", days, days == 1 and "" or "s") + end + if hours > 0 then + formattedTime = formattedTime .. string.format("%d hour%s ", hours, hours == 1 and "" or "s") + end + if minutes > 0 then + formattedTime = formattedTime .. string.format("%d minute%s ", minutes, minutes == 1 and "" or "s") + end + if seconds > 0 then + formattedTime = formattedTime .. string.format("%d second%s", seconds, seconds == 1 and "" or "s") + end + return formattedTime +end + +function GetPlayerPropertiesByCitizenId(citizenid) + local properties = {} + + local result = MySQL.Sync.fetchAll("SELECT * FROM properties WHERE owner_citizenid = @citizenid", { + ['@citizenid'] = citizenid + }) + + if result and #result > 0 then + for i = 1, #result do + table.insert(properties, result[i]) + end + end + + return properties +end + +function generateMessageFromResult(result) + local author = result[1].author + local title = result[1].title + local details = result[1].details + details = details:gsub("<[^>]+>", ""):gsub(" ", "") + local message = "Author: " .. author .. "\n" + message = message .. "Title: " .. title .. "\n" + message = message .. "Details: " .. details + return message +end + +if Config.InventoryForWeaponsImages == "ox_inventory" and Config.RegisterWeaponsAutomatically then + exports.ox_inventory:registerHook('buyItem', function(payload) + if not string.find(payload.itemName, "WEAPON_") then return true end + CreateThread(function() + local owner = QBCore.Functions.GetPlayer(payload.source).PlayerData.citizenid + if not owner or not payload.metadata.serial then return end + local imageurl = ("https://cfx-nui-ox_inventory/web/images/%s.png"):format(payload.itemName) + local notes = "Purchased from shop" + local weapClass = "Class" --@TODO retrieve class better + + local success, result = pcall(function() + return CreateWeaponInfo(payload.metadata.serial, imageurl, notes, owner, weapClass, payload.itemName) + end) + + if not success then + print("Error in creating weapon info in MDT: " .. result) + end + end) + return true + end, { + typeFilter = { ['player'] = true } + }) + -- This is for other shop resources that use the AddItem method. + -- Only registers weapons with serial numbers, must specify a slot in ox_inventory:AddItem with metadata + -- metadata = { + -- registered = true + -- } + if Config.RegisterCreatedWeapons then + exports.ox_inventory:registerHook('createItem', function(payload) + if not string.find(payload.item.name, "WEAPON_") then return true end + CreateThread(function() + local owner = QBCore.Functions.GetPlayer(payload.inventoryId).PlayerData.citizenid + if not owner or not payload.metadata.serial then return end + local imageurl = ("https://cfx-nui-ox_inventory/web/images/%s.png"):format(payload.item.name) + local notes = "Purchased from shop" + local weapClass = "Class" --@TODO retrieve class better + + local success, result = pcall(function() + return CreateWeaponInfo(payload.metadata.serial, imageurl, notes, owner, weapClass, payload.item.name) + end) + + if not success then + print("Error in creating weapon info in MDT: " .. result) + end + end) + return true + end, { + typeFilter = { ['player'] = true } + }) + end +end \ No newline at end of file diff --git a/server/utils.lua b/server/utils.lua index ed898fbd..00cb4804 100644 --- a/server/utils.lua +++ b/server/utils.lua @@ -1,51 +1,52 @@ -local QBCore = exports['qb-core']:GetCoreObject() - -function GetPlayerData(source) - local Player = QBCore.Functions.GetPlayer(source) - return Player.PlayerData -end - -function UnpackJob(data) - local job = { - name = data.name, - label = data.label - } - local grade = { - name = data.grade.name, - } - - return job, grade -end - -function PermCheck(src, PlayerData) - local result = true - - if not Config.AllowedJobs[PlayerData.job.name] then - print(("UserId: %s(%d) tried to access the mdt even though they are not authorised (server direct)"):format(GetPlayerName(src), src)) - result = false - end - - return result -end - -function ProfPic(gender, profilepic) - if profilepic then return profilepic end; - if gender == "f" then return "img/female.png" end; - return "img/male.png" -end - -function IsJobAllowedToMDT(job) - if Config.PoliceJobs[job] then - return true - elseif Config.AmbulanceJobs[job] then - return true - elseif Config.DojJobs[job] then - return true - else - return false - end -end - -function GetNameFromPlayerData(PlayerData) - return ('%s %s'):format(PlayerData.charinfo.firstname, PlayerData.charinfo.lastname) -end +local QBCore = exports['qb-core']:GetCoreObject() + +function GetPlayerData(source) + local Player = QBCore.Functions.GetPlayer(source) + if Player == nil then return end -- Player not loaded in correctly + return Player.PlayerData +end + +function UnpackJob(data) + local job = { + name = data.name, + label = data.label + } + local grade = { + name = data.grade.name, + } + + return job, grade +end + +function PermCheck(src, PlayerData) + local result = true + + if not Config.AllowedJobs[PlayerData.job.name] then + print(("UserId: %s(%d) tried to access the mdt even though they are not authorised (server direct)"):format(GetPlayerName(src), src)) + result = false + end + + return result +end + +function ProfPic(gender, profilepic) + if profilepic then return profilepic end; + if gender == "f" then return "img/female.png" end; + return "img/male.png" +end + +function IsJobAllowedToMDT(job) + if Config.PoliceJobs[job] then + return true + elseif Config.AmbulanceJobs[job] then + return true + elseif Config.DojJobs[job] then + return true + else + return false + end +end + +function GetNameFromPlayerData(PlayerData) + return ('%s %s'):format(PlayerData.charinfo.firstname, PlayerData.charinfo.lastname) +end diff --git a/shared/config.lua b/shared/config.lua index 550db8b1..2d99a865 100644 --- a/shared/config.lua +++ b/shared/config.lua @@ -1,648 +1,801 @@ -Config = Config or {} - -Config.RosterLink = { - ['police'] = '', - ['ambulance'] = '', - ['bcso'] = '', - ['doj'] = '', -} - - -Config.UseWolfknightRadar = false ---[[ -Adds support for Wraith ARS 2X by WolfKnight98 (wk_wars2x) -https://github.com/WolfKnight98/wk_wars2x -To save on unnecessary database queries, in wk_wars2x/config.lua set 'CONFIG.use_sonorancad = true' -This will only check plates of vehicles that have been occupied by a player ---]] - -Config.OnlyShowOnDuty = true - -Config.Fuel = "lj-fuel" -- "LegacyFuel", "lj-fuel" - -Config.PenalCodeTitles = { - [1] = 'OFFENSES AGAINST PERSONS', - [2] = 'OFFENSES INVOLVING THEFT', - [3] = 'OFFENSES INVOLVING FRAUD', - [4] = 'OFFENSES INVOLVING DAMAGE TO PROPERTY', - [5] = 'OFFENSES AGAINST PUBLIC ADMINISTRATION', - [6] = 'OFFENSES AGAINST PUBLIC ORDER', - [7] = 'OFFENSES AGAINST HEALTH AND MORALS', - [8] = 'OFFENSES AGAINST PUBLIC SAFETY', - [9] = 'OFFENSES INVOLVING THE OPERATION OF A VEHICLE', - [10] = 'OFFENSES INVOLVING THE WELL-BEING OF WILDLIFE', -} - -Config.PenalCode = { - [1] = { - [1] = {title = 'Simple Assault', class = 'Misdemeanor', id = 'P.C. 1001', months = 7, fine = 500, color = 'green'}, - [2] = {title = 'Assault', class = 'Misdemeanor', id = 'P.C. 1002', months = 15, fine = 850, color = 'orange'}, - [3] = {title = 'Aggravated Assault', class = 'Felony', id = 'P.C. 1003', months = 20, fine = 1250, color = 'orange'}, - [4] = {title = 'Assault with a Deadly Weapon', class = 'Felony', id = 'P.C. 1004', months = 30, fine = 3750, color = 'red'}, - [5] = {title = 'Involuntary Manslaughter', class = 'Felony', id = 'P.C. 1005', months = 60, fine = 7500, color = 'red'}, - [6] = {title = 'Vehicular Manslaughter', class = 'Felony', id = 'P.C. 1006', months = 75, fine = 7500, color = 'red'}, - [7] = {title = 'Attempted Murder of a Civilian', class = 'Felony', id = 'P.C. 1007', months = 50, fine = 7500, color = 'red'}, - [8] = {title = 'Second Degree Murder', class = 'Felony', id = 'P.C. 1008', months = 100, fine = 15000, color = 'red'}, - [9] = {title = 'Accessory to Second Degree Murder', class = 'Felony', id = 'P.C. 1009', months = 50, fine = 5000, color = 'red'}, - [10] = {title = 'First Degree Murder', class = 'Felony', id = 'P.C. 1010', months = 0, fine = 0, color = 'red'}, - [11] = {title = 'Accessory to First Degree Murder', class = 'Felony', id = 'P.C. 1011', months = 0, fine = 0, color = 'red'}, - [12] = {title = 'Murder of a Public Servant or Peace Officer', class = 'Felony', id = 'P.C. 1012', months = 0, fine = 0, color = 'red'}, - [13] = {title = 'Attempted Murder of a Public Servant or Peace Officer', class = 'Felony', id = 'P.C. 1013', months = 65, fine = 10000, color = 'red'}, - [14] = {title = 'Accessory to the Murder of a Public Servant or Peace Officer', class = 'Felony', id = 'P.C. 1014', months = 0, fine = 0, color = 'red'}, - [15] = {title = 'Unlawful Imprisonment', class = 'Misdemeanor', id = 'P.C. 1015', months = 10, fine = 600, color = 'green'}, - [16] = {title = 'Kidnapping', class = 'Felony', id = 'P.C. 1016', months = 15, fine = 900, color = 'orange'}, - [17] = {title = 'Accessory to Kidnapping', class = 'Felony', id = 'P.C. 1017', months = 7, fine = 450, color = 'orange'}, - [18] = {title = 'Attempted Kidnapping', class = 'Felony', id = 'P.C. 1018', months = 10, fine = 450, color = 'orange'}, - [19] = {title = 'Hostage Taking', class = 'Felony', id = 'P.C. 1019', months = 20, fine = 1200, color = 'orange'}, - [20] = {title = 'Accessory to Hostage Taking', class = 'Felony', id = 'P.C. 1020', months = 10, fine = 600, color = 'orange'}, - [21] = {title = 'Unlawful Imprisonment of a Public Servant or Peace Officer.', class = 'Felony', id = 'P.C. 1021', months = 25, fine = 4000, color = 'orange'}, - [22] = {title = 'Criminal Threats', class = 'Misdemeanor', id = 'P.C. 1022', months = 5, fine = 500, color = 'orange'}, - [23] = {title = 'Reckless Endangerment', class = 'Misdemeanor', id = 'P.C. 1023', months = 10, fine = 1000, color = 'orange'}, - [24] = {title = 'Gang Related Shooting', class = 'Felony', id = 'P.C. 1024', months = 30, fine = 2500, color = 'red'}, - [25] = {title = 'Cannibalism', class = 'Felony', id = 'P.C. 1025', months = 0, fine = 0, color = 'red'}, - [26] = {title = 'Torture', class = 'Felony', id = 'P.C. 1026', months = 40, fine = 4500, color = 'red'}, - }, - [2] = { - [1] = {title = 'Petty Theft', class = 'Infraction', id = 'P.C. 2001', months = 0, fine = 250, color = 'green'}, - [2] = {title = 'Grand Theft', class = 'Misdemeanor', id = 'P.C. 2002', months = 10, fine = 600, color = 'green'}, - [3] = {title = 'Grand Theft Auto A', class = 'Felony', id = 'P.C. 2003', months = 15, fine = 900, color = 'green'}, - [4] = {title = 'Grand Theft Auto B', class = 'Felony', id = 'P.C. 2004', months = 35, fine = 3500, color = 'green'}, - [5] = {title = 'Carjacking', class = 'Felony', id = 'P.C. 2005', months = 30, fine = 2000, color = 'orange'}, - [6] = {title = 'Burglary', class = 'Misdemeanor', id = 'P.C. 2006', months = 10, fine = 500, color = 'green'}, - [7] = {title = 'Robbery', class = 'Felony', id = 'P.C. 2007', months = 25, fine = 2000, color = 'green'}, - [8] = {title = 'Accessory to Robbery', class = 'Felony', id = 'P.C. 2008', months = 12, fine = 1000, color = 'green'}, - [9] = {title = 'Attempted Robbery', class = 'Felony', id = 'P.C. 2009', months = 20, fine = 1000, color = 'green'}, - [10] = {title = 'Armed Robbery', class = 'Felony', id = 'P.C. 2010', months = 30, fine = 3000, color = 'orange'}, - [11] = {title = 'Accessory to Armed Robbery', class = 'Felony', id = 'P.C. 2011', months = 15, fine = 1500, color = 'orange'}, - [12] = {title = 'Attempted Armed Robbery', class = 'Felony', id = 'P.C. 2012', months = 25, fine = 1500, color = 'orange'}, - [13] = {title = 'Grand Larceny', class = 'Felony', id = 'P.C. 2013', months = 45, fine = 7500, color = 'orange'}, - [14] = {title = 'Leaving Without Paying', class = 'Infraction', id = 'P.C. 2014', months = 0, fine = 500, color = 'green'}, - [15] = {title = 'Possession of Nonlegal Currency', class = 'Misdemeanor', id = 'P.C. 2015', months = 10, fine = 750, color = 'green'}, - [16] = {title = 'Possession of Government-Issued Items', class = 'Misdemeanor', id = 'P.C. 2016', months = 15, fine = 1000, color = 'green'}, - [17] = {title = 'Possession of Items Used in the Commission of a Crime', class = 'Misdemeanor', id = 'P.C. 2017', months = 10, fine = 500, color = 'green'}, - [18] = {title = 'Sale of Items Used in the Commission of a Crime', class = 'Felony', id = 'P.C. 2018', months = 15, fine = 1000, color = 'orange'}, - [19] = {title = 'Theft of an Aircraft', class = 'Felony', id = 'P.C. 2019', months = 20, fine = 1000, color = 'green'}, - }, - [3] = { - [1] = {title = 'Impersonating', class = 'Misdemeanor', id = 'P.C. 3001', months = 15, fine = 1250, color = 'green'}, - [2] = {title = 'Impersonating a Peace Officer or Public Servant', class = 'Felony', id = 'P.C. 3002', months = 25, fine = 2750, color = 'green'}, - [3] = {title = 'Impersonating a Judge', class = 'Felony', id = 'P.C. 3003', months = 0, fine = 0, color = 'green'}, - [4] = {title = 'Possession of Stolen Identification', class = 'Misdemeanor', id = 'P.C. 3004', months = 10, fine = 750, color = 'green'}, - [5] = {title = 'Possession of Stolen Government Identification', class = 'Misdemeanor', id = 'P.C. 3005', months = 20, fine = 2000, color = 'green'}, - [6] = {title = 'Extortion', class = 'Felony', id = 'P.C. 3006', months = 20, fine = 900, color = 'orange'}, - [7] = {title = 'Fraud', class = 'Misdemeanor', id = 'P.C. 3007', months = 10, fine = 450, color = 'green'}, - [8] = {title = 'Forgery', class = 'Misdemeanor', id = 'P.C. 3008', months = 15, fine = 750, color = 'green'}, - [9] = {title = 'Money Laundering', class = 'Felony', id = 'P.C. 3009', months = 0, fine = 0, color = 'red'}, - }, - [4] = { - [1] = {title = 'Trespassing', class = 'Misdemeanor', id = 'P.C. 4001', months = 10, fine = 450, color = 'green'}, - [2] = {title = 'Felony Trespassing', class = 'Felony', id = 'P.C. 4002', months = 15, fine = 1500, color = 'green'}, - [3] = {title = 'Arson', class = 'Felony', id = 'P.C. 4003', months = 15, fine = 1500, color = 'orange'}, - [4] = {title = 'Vandalism', class = 'Infraction', id = 'P.C. 4004', months = 0, fine = 300, color = 'green'}, - [5] = {title = 'Vandalism of Government Property', class = 'Felony', id = 'P.C. 4005', months = 20, fine = 1500, color = 'green'}, - [6] = {title = 'Littering', class = 'Infraction', id = 'P.C. 4006', months = 0, fine = 200, color = 'green'}, - }, - [5] = { - [1] = {title = 'Bribery of a Government Official', class = 'Felony', id = 'P.C. 5001', months = 20, fine = 3500, color = 'green'}, - [2] = {title = 'Anti-Mask Law', class = 'Infraction', id = 'P.C. 5002', months = 0, fine = 750, color = 'green'}, - [3] = {title = 'Possession of Contraband in a Government Facility', class = 'Felony', id = 'P.C. 5003', months = 25, fine = 1000, color = 'green'}, - [4] = {title = 'Criminal Possession of Stolen Property', class = 'Misdemeanor', id = 'P.C. 5004', months = 10, fine = 500, color = 'green'}, - [5] = {title = 'Escaping', class = 'Felony', id = 'P.C. 5005', months = 10, fine = 450, color = 'green'}, - [6] = {title = 'Jailbreak', class = 'Felony', id = 'P.C. 5006', months = 30, fine = 2500, color = 'orange'}, - [7] = {title = 'Accessory to Jailbreak', class = 'Felony', id = 'P.C. 5007', months = 25, fine = 2000, color = 'orange'}, - [8] = {title = 'Attempted Jailbreak', class = 'Felony', id = 'P.C. 5008', months = 20, fine = 1500, color = 'orange'}, - [9] = {title = 'Perjury', class = 'Felony', id = 'P.C. 5009', months = 0, fine = 0, color = 'green'}, - [10] = {title = 'Violation of a Restraining Order', class = 'Felony', id = 'P.C. 5010', months = 20, fine = 2250, color = 'green'}, - [11] = {title = 'Embezzlement', class = 'Felony', id = 'P.C. 5011', months = 45, fine = 10000, color = 'green'}, - [12] = {title = 'Unlawful Practice', class = 'Felony', id = 'P.C. 5012', months = 15, fine = 1500, color = 'orange'}, - [13] = {title = 'Misuse of Emergency Systems', class = 'Infraction', id = 'P.C. 5013', months = 0, fine = 600, color = 'orange'}, - [14] = {title = 'Conspiracy', class = 'Misdemeanor', id = 'P.C. 5014', months = 10, fine = 450, color = 'green'}, - [15] = {title = 'Violating a Court Order', class = 'Misdemeanor', id = 'P.C. 5015', months = 0, fine = 0, color = 'orange'}, - [16] = {title = 'Failure to Appear', class = 'Misdemeanor', id = 'P.C. 5016', months = 0, fine = 0, color = 'orange'}, - [17] = {title = 'Contempt of Court', class = 'Felony', id = 'P.C. 5017', months = 0, fine = 0, color = 'orange'}, - [18] = {title = 'Resisting Arrest', class = 'Misdemeanor', id = 'P.C. 5018', months = 5, fine = 300, color = 'orange'}, - }, - [6] = { - [1] = {title = 'Disobeying a Peace Officer', class = 'infraction', id = 'P.C. 6001', months = 0, fine = 750, color = 'green'}, - [2] = {title = 'Disorderly Conduct', class = 'Infraction', id = 'P.C. 6002', months = 0, fine = 250, color = 'green'}, - [3] = {title = 'Disturbing the Peace', class = 'infraction', id = 'P.C. 6003', months = 0, fine = 350, color = 'green'}, - [4] = {title = 'False Reporting', class = 'Misdemeanor', id = 'P.C. 6004', months = 10, fine = 750, color = 'green'}, - [5] = {title = 'Harassment', class = 'Misdemeanor', id = 'P.C. 6005', months = 10, fine = 500, color = 'orange'}, - [6] = {title = 'Misdemeanor Obstruction of Justice', class = 'Misdemeanor', id = 'P.C. 6006', months = 10, fine = 500, color = 'green'}, - [7] = {title = 'Felony Obstruction of Justice', class = 'Felony', id = 'P.C. 6007', months = 15, fine = 900, color = 'green'}, - [8] = {title = 'Inciting a Riot', class = 'Felony', id = 'P.C. 6008', months = 25, fine = 1000, color = 'orange'}, - [9] = {title = 'Loitering on Government Properties', class = 'Infraction', id = 'P.C. 6009', months = 0, fine = 500, color = 'green'}, - [10] = {title = 'Tampering', class = 'Misdemeanor', id = 'P.C. 6010', months = 10, fine = 500, color = 'green'}, - [11] = {title = 'Vehicle Tampering', class = 'Misdemeanor', id = 'P.C. 6011', months = 15, fine = 750, color = 'green'}, - [12] = {title = 'Evidence Tampering', class = 'Felony', id = 'P.C. 6012', months = 20, fine = 1000, color = 'green'}, - [13] = {title = 'Witness Tampering', class = 'Felony', id = 'P.C. 6013', months = 0, fine = 0, color = 'green'}, - [14] = {title = 'Failure to Provide Identification', class = 'Misdemeanor', id = 'P.C. 6014', months = 15, fine = 1500, color = 'green'}, - [15] = {title = 'Vigilantism', class = 'Felony', id = 'P.C. 6015', months = 30, fine = 1500, color = 'orange'}, - [16] = {title = 'Unlawful Assembly', class = 'Misdemeanor', id = 'P.C. 6016', months = 10, fine = 750, color = 'orange'}, - [17] = {title = 'Government Corruption', class = 'Felony', id = 'P.C. 6017', months = 0, fine = 0, color = 'red'}, - [18] = {title = 'Stalking', class = 'Felony', id = 'P.C. 6018', months = 40, fine = 1500, color = 'orange'}, - [19] = {title = 'Aiding and Abetting', class = 'Misdemeanor', id = 'P.C. 6019', months = 15, fine = 450, color = 'orange'}, - [20] = {title = 'Harboring a Fugitive', class = 'Misdemeanor', id = 'P.C. 6020', months = 10, fine = 1000, color = 'green'}, - }, - [7] = { - [1] = {title = 'Misdemeanor Possession of Marijuana', class = 'Mask', id = 'P.C. 7001', months = 5, fine = 250, color = 'green'}, - [2] = {title = 'Felony Possession of Marijuana', class = 'Felony', id = 'P.C. 7002', months = 15, fine = 1000, color = 'green'}, - [3] = {title = 'Cultivation of Marijuana A', class = 'Misdemeanor', id = 'P.C. 7003', months = 10, fine = 750, color = 'green'}, - [4] = {title = 'Cultivation of Marijuana B', class = 'Felony', id = 'P.C. 7004', months = 30, fine = 1500, color = 'orange'}, - [5] = {title = 'Possession of Marijuana with Intent to Distribute', class = 'Felony', id = 'P.C. 7005', months = 30, fine = 3000, color = 'orange'}, - [6] = {title = 'Misdemeanor Possession of Cocaine', class = 'Misdemeanor', id = 'P.C. 7006', months = 7, fine = 500, color = 'green'}, - [7] = {title = 'Felony Possession of Cocaine', class = 'Felony', id = 'P.C. 7007', months = 25, fine = 1500, color = 'green'}, - [8] = {title = 'Possession of Cocaine with Intent to Distribute', class = 'Felony', id = 'P.C. 7008', months = 35, fine = 4500, color = 'orange'}, - [9] = {title = 'Misdemeanor Possession of Methamphetamine', class = 'Misdemeanor', id = 'P.C. 7009', months = 7, fine = 500, color = 'green'}, - [10] = {title = 'Felony Possession of Methamphetamine', class = 'Felony', id = 'P.C. 7010', months = 25, fine = 1500, color = 'green'}, - [11] = {title = 'Possession of Methamphetamine with Intent to Distribute', class = 'Felony', id = 'P.C. 7011', months = 35, fine = 4500, color = 'orange'}, - [12] = {title = 'Misdemeanor Possession of Oxy / Vicodin', class = 'Felony', id = 'P.C. 7012', months = 7, fine = 500, color = 'green'}, - [13] = {title = 'Felony Possession of Oxy / Vicodin', class = 'Felony', id = 'P.C. 7013', months = 25, fine = 1500, color = 'green'}, - [14] = {title = 'Felony Possession of Oxy / Vicodin with Intent to Distribute', class = 'Felony', id = 'P.C. 7014', months = 35, fine = 4500, color = 'orange'}, - [15] = {title = 'Misdemeanor Possession of Ecstasy', class = 'Misdemeanor', id = 'P.C. 7015', months = 7, fine = 500, color = 'green'}, - [16] = {title = 'Felony Possession of Ecstasy', class = 'Felony', id = 'P.C. 7016', months = 25, fine = 1500, color = 'green'}, - [17] = {title = 'Possession of Ecstasy with Intent to Distribute', class = 'Felony', id = 'P.C. 7017', months = 35, fine = 4500, color = 'orange'}, - [18] = {title = 'Misdemeanor Possession of Opium', class = 'Misdemeanor', id = 'P.C. 7018', months = 7, fine = 500, color = 'green'}, - [19] = {title = 'Felony Possession of Opium', class = 'Felony', id = 'P.C. 7019', months = 25, fine = 1500, color = 'green'}, - [20] = {title = 'Possession of Opium with Intent to Distribute', class = 'Felony', id = 'P.C. 7020', months = 35, fine = 4500, color = 'orange'}, - [21] = {title = 'Misdemeanor Possession of Adderall', class = 'Misdemeanor', id = 'P.C. 7021', months = 7, fine = 500, color = 'green'}, - [22] = {title = 'Felony Possession of Adderall', class = 'Felony', id = 'P.C. 7022', months = 25, fine = 1500, color = 'green'}, - [23] = {title = 'Possession of Adderall with Intent to Distribute', class = 'Felony', id = 'P.C. 7023', months = 35, fine = 4500, color = 'orange'}, - [24] = {title = 'Misdemeanor Possession of Xanax', class = 'Misdemeanor', id = 'P.C. 7024', months = 7, fine = 500, color = 'green'}, - [25] = {title = 'Felony Possession of Xanax', class = 'Felony', id = 'P.C. 7025', months = 25, fine = 1500, color = 'green'}, - [26] = {title = 'Possession of Xanax with Intent to Distribute', class = 'Felony', id = 'P.C. 7026', months = 35, fine = 4500, color = 'orange'}, - [27] = {title = 'Misdemeanor Possession of Shrooms', class = 'Misdemeanor', id = 'P.C. 7027', months = 7, fine = 500, color = 'green'}, - [28] = {title = 'Felony Possession of Shrooms', class = 'Felony', id = 'P.C. 7028', months = 25, fine = 1500, color = 'green'}, - [29] = {title = 'Possession of Shrooms with Intent to Distribute', class = 'Felony', id = 'P.C. 7029', months = 35, fine = 4500, color = 'orange'}, - [30] = {title = 'Misdemeanor Possession of Lean', class = 'Misdemeanor', id = 'P.C. 7030', months = 7, fine = 500, color = 'green'}, - [31] = {title = 'Felony Possession of Lean', class = 'Felony', id = 'P.C. 7031', months = 25, fine = 1500, color = 'green'}, - [32] = {title = 'Possession of Lean with Intent to Distribute', class = 'Felony', id = 'P.C. 7032', months = 35, fine = 4500, color = 'orange'}, - [33] = {title = 'Sale of a controlled substance', class = 'Misdemeanor', id = 'P.C. 7033', months = 10, fine = 1000, color = 'green'}, - [34] = {title = 'Drug Trafficking', class = 'Felony', id = 'P.C. 7034', months = 0, fine = 0, color = 'red'}, - [35] = {title = 'Desecration of a Human Corpse', class = 'Felony', id = 'P.C. 7035', months = 20, fine = 1500, color = 'orange'}, - [36] = {title = 'Public Intoxication', class = 'Infraction', id = 'P.C. 7036', months = 0, fine = 500, color = 'green'}, - [37] = {title = 'Public Indecency', class = 'Misdemeanor', id = 'P.C. 7037', months = 10, fine = 750, color = 'green'}, - }, - [8] = { - [1] = {title = 'Criminal Possession of Weapon Class A', class = 'Felony', id = 'P.C. 8001', months = 10, fine = 500, color = 'green'}, - [2] = {title = 'Criminal Possession of Weapon Class B', class = 'Felony', id = 'P.C. 8002', months = 15, fine = 1000, color = 'green'}, - [3] = {title = 'Criminal Possession of Weapon Class C', class = 'Felony', id = 'P.C. 8003', months = 30, fine = 3500, color = 'green'}, - [4] = {title = 'Criminal Possession of Weapon Class D', class = 'Felony', id = 'P.C. 8004', months = 25, fine = 1500, color = 'green'}, - [5] = {title = 'Criminal Sale of Weapon Class A', class = 'Felony', id = 'P.C. 8005', months = 15, fine = 1000, color = 'orange'}, - [6] = {title = 'Criminal Sale of Weapon Class B', class = 'Felony', id = 'P.C. 8006', months = 20, fine = 2000, color = 'orange'}, - [7] = {title = 'Criminal Sale of Weapon Class C', class = 'Felony', id = 'P.C. 8007', months = 35, fine = 7000, color = 'orange'}, - [8] = {title = 'Criminal Sale of Weapon Class D', class = 'Felony', id = 'P.C. 8008', months = 30, fine = 3000, color = 'orange'}, - [9] = {title = 'Criminal Use of Weapon', class = 'Misdemeanor', id = 'P.C. 8009', months = 10, fine = 450, color = 'orange'}, - [10] = {title = 'Possession of Illegal Firearm Modifications', class = 'Misdemeanor', id = 'P.C. 8010', months = 10, fine = 300, color = 'green'}, - [11] = {title = 'Weapon Trafficking', class = 'Felony', id = 'P.C. 8011', months = 0, fine = 0, color = 'red'}, - [12] = {title = 'Brandishing a Weapon', class = 'Misdemeanor', id = 'P.C. 8012', months = 15, fine = 500, color = 'orange'}, - [13] = {title = 'Insurrection', class = 'Felony', id = 'P.C. 8013', months = 0, fine = 0, color = 'red'}, - [14] = {title = 'Flying into Restricted Airspace', class = 'Felony', id = 'P.C. 8014', months = 20, fine = 1500, color = 'green'}, - [15] = {title = 'Jaywalking', class = 'Infraction', id = 'P.C. 8015', months = 0, fine = 150, color = 'green'}, - [16] = {title = 'Criminal Use of Explosives', class = 'Felony', id = 'P.C. 8016', months = 30, fine = 2500, color = 'orange'}, - }, - [9] = { - [1] = {title = 'Driving While Intoxicated', class = 'Misdemeanor', id = 'P.C. 9001', months = 5, fine = 300, color = 'green'}, - [2] = {title = 'Evading', class = 'Misdemeanor', id = 'P.C. 9002', months = 5, fine = 400, color = 'green'}, - [3] = {title = 'Reckless Evading', class = 'Felony', id = 'P.C. 9003', months = 10, fine = 800, color = 'orange'}, - [4] = {title = 'Failure to Yield to Emergency Vehicle', class = 'Infraction', id = 'P.C. 9004', months = 0, fine = 600, color = 'green'}, - [5] = {title = 'Failure to Obey Traffic Control Device', class = 'Infraction', id = 'P.C. 9005', months = 0, fine = 150, color = 'green'}, - [6] = {title = 'Nonfunctional Vehicle', class = 'Infraction', id = 'P.C. 9006', months = 0, fine = 75, color = 'green'}, - [7] = {title = 'Negligent Driving', class = 'Infraction', id = 'P.C. 9007', months = 0, fine = 300, color = 'green'}, - [8] = {title = 'Reckless Driving', class = 'Misdemeanor', id = 'P.C. 9008', months = 10, fine = 750, color = 'orange'}, - [9] = {title = 'Third Degree Speeding', class = 'Infraction', id = 'P.C. 9009', months = 0, fine = 225, color = 'green'}, - [10] = {title = 'Second Degree Speeding', class = 'Infraction', id = 'P.C. 9010', months = 0, fine = 450, color = 'green'}, - [11] = {title = 'First Degree Speeding', class = 'Infraction', id = 'P.C. 9011', months = 0, fine = 750, color = 'green'}, - [12] = {title = 'Unlicensed Operation of Vehicle', class = 'Infraction', id = 'P.C. 9012', months = 0, fine = 500, color = 'green'}, - [13] = {title = 'Illegal U-Turn', class = 'Infraction', id = 'P.C. 9013', months = 0, fine = 75, color = 'green'}, - [14] = {title = 'Illegal Passing', class = 'Infraction', id = 'P.C. 9014', months = 0, fine = 300, color = 'green'}, - [15] = {title = 'Failure to Maintain Lane', class = 'Infraction', id = 'P.C. 9015', months = 0, fine = 300, color = 'green'}, - [16] = {title = 'Illegal Turn', class = 'Infraction', id = 'P.C. 9016', months = 0, fine = 150, color = 'green'}, - [17] = {title = 'Failure to Stop', class = 'Infraction', id = 'P.C. 9017', months = 0, fine = 600, color = 'green'}, - [18] = {title = 'Unauthorized Parking', class = 'Infraction', id = 'P.C. 9018', months = 0, fine = 300, color = 'green'}, - [19] = {title = 'Hit and Run', class = 'Misdemeanor', id = 'P.C. 9019', months = 10, fine = 500, color = 'green'}, - [20] = {title = 'Driving without Headlights or Signals', class = 'Infraction', id = 'P.C. 9020', months = 0, fine = 300, color = 'green'}, - [21] = {title = 'Street Racing', class = 'Felony', id = 'P.C. 9021', months = 15, fine = 1500, color = 'green'}, - [22] = {title = 'Piloting without Proper Licensing', class = 'Felony', id = 'P.C. 9022', months = 20, fine = 1500, color = 'orange'}, - [23] = {title = 'Unlawful Use of a Motorvehicle', class = 'Misdemeanor', id = 'P.C. 9023', months = 10, fine = 750, color = 'green'}, - }, - [10] = { - [1] = {title = 'Hunting in Restricted Areas', class = 'Infraction', id = 'P.C. 10001', months = 0, fine = 450, color = 'green'}, - [2] = {title = 'Unlicensed Hunting', class = 'Infraction', id = 'P.C. 10002', months = 0, fine = 450, color = 'green'}, - [3] = {title = 'Animal Cruelty', class = 'Misdemeanor', id = 'P.C. 10003', months = 10, fine = 450, color = 'green'}, - [4] = {title = 'Hunting with a Non-Hunting Weapon', class = 'Misdemeanor', id = 'P.C. 10004', months = 10, fine = 750, color = 'green'}, - [5] = {title = 'Hunting outside of hunting hours', class = 'Infraction', id = 'P.C. 10005', months = 0, fine = 750, color = 'green'}, - [6] = {title = 'Overhunting', class = 'Misdemeanor', id = 'P.C. 10006', months = 10, fine = 1000, color = 'green'}, - [7] = {title = 'Poaching', class = 'Felony', id = 'P.C. 10007', months = 20, fine = 1250, color = 'red'}, - } -} - -Config.PoliceJobs = { - ['police'] = true, - ['lspd'] = true, - ['bcso'] = true, - ['sast'] = true, - ['sasp'] = true, - ['doc'] = true, - ['sapr'] = true, - ['pa'] = true -- yucky -} - -Config.AmbulanceJobs = { - ['ambulance'] = true, - ['doctor'] = true -} - -Config.DojJobs = { - ['lawyer'] = true, -} - --- Leave my hacky code alone ya goblins -Config.AllowedJobs = {} -for index, value in pairs(Config.PoliceJobs) do - Config.AllowedJobs[index] = value -end -for index, value in pairs(Config.AmbulanceJobs) do - Config.AllowedJobs[index] = value -end -for index, value in pairs(Config.DojJobs) do - Config.AllowedJobs[index] = value -end --- Leave my hacky code alone ya goblins - -Config.LogPerms = { - ['ambulance'] = { - [4] = true, - }, - ['police'] = { - [4] = true, - }, -} - -Config.ColorNames = { - [0] = "Metallic Black", - [1] = "Metallic Graphite Black", - [2] = "Metallic Black Steel", - [3] = "Metallic Dark Silver", - [4] = "Metallic Silver", - [5] = "Metallic Blue Silver", - [6] = "Metallic Steel Gray", - [7] = "Metallic Shadow Silver", - [8] = "Metallic Stone Silver", - [9] = "Metallic Midnight Silver", - [10] = "Metallic Gun Metal", - [11] = "Metallic Anthracite Grey", - [12] = "Matte Black", - [13] = "Matte Gray", - [14] = "Matte Light Grey", - [15] = "Util Black", - [16] = "Util Black Poly", - [17] = "Util Dark silver", - [18] = "Util Silver", - [19] = "Util Gun Metal", - [20] = "Util Shadow Silver", - [21] = "Worn Black", - [22] = "Worn Graphite", - [23] = "Worn Silver Grey", - [24] = "Worn Silver", - [25] = "Worn Blue Silver", - [26] = "Worn Shadow Silver", - [27] = "Metallic Red", - [28] = "Metallic Torino Red", - [29] = "Metallic Formula Red", - [30] = "Metallic Blaze Red", - [31] = "Metallic Graceful Red", - [32] = "Metallic Garnet Red", - [33] = "Metallic Desert Red", - [34] = "Metallic Cabernet Red", - [35] = "Metallic Candy Red", - [36] = "Metallic Sunrise Orange", - [37] = "Metallic Classic Gold", - [38] = "Metallic Orange", - [39] = "Matte Red", - [40] = "Matte Dark Red", - [41] = "Matte Orange", - [42] = "Matte Yellow", - [43] = "Util Red", - [44] = "Util Bright Red", - [45] = "Util Garnet Red", - [46] = "Worn Red", - [47] = "Worn Golden Red", - [48] = "Worn Dark Red", - [49] = "Metallic Dark Green", - [50] = "Metallic Racing Green", - [51] = "Metallic Sea Green", - [52] = "Metallic Olive Green", - [53] = "Metallic Green", - [54] = "Metallic Gasoline Blue Green", - [55] = "Matte Lime Green", - [56] = "Util Dark Green", - [57] = "Util Green", - [58] = "Worn Dark Green", - [59] = "Worn Green", - [60] = "Worn Sea Wash", - [61] = "Metallic Midnight Blue", - [62] = "Metallic Dark Blue", - [63] = "Metallic Saxony Blue", - [64] = "Metallic Blue", - [65] = "Metallic Mariner Blue", - [66] = "Metallic Harbor Blue", - [67] = "Metallic Diamond Blue", - [68] = "Metallic Surf Blue", - [69] = "Metallic Nautical Blue", - [70] = "Metallic Bright Blue", - [71] = "Metallic Purple Blue", - [72] = "Metallic Spinnaker Blue", - [73] = "Metallic Ultra Blue", - [74] = "Metallic Bright Blue", - [75] = "Util Dark Blue", - [76] = "Util Midnight Blue", - [77] = "Util Blue", - [78] = "Util Sea Foam Blue", - [79] = "Uil Lightning blue", - [80] = "Util Maui Blue Poly", - [81] = "Util Bright Blue", - [82] = "Matte Dark Blue", - [83] = "Matte Blue", - [84] = "Matte Midnight Blue", - [85] = "Worn Dark blue", - [86] = "Worn Blue", - [87] = "Worn Light blue", - [88] = "Metallic Taxi Yellow", - [89] = "Metallic Race Yellow", - [90] = "Metallic Bronze", - [91] = "Metallic Yellow Bird", - [92] = "Metallic Lime", - [93] = "Metallic Champagne", - [94] = "Metallic Pueblo Beige", - [95] = "Metallic Dark Ivory", - [96] = "Metallic Choco Brown", - [97] = "Metallic Golden Brown", - [98] = "Metallic Light Brown", - [99] = "Metallic Straw Beige", - [100] = "Metallic Moss Brown", - [101] = "Metallic Biston Brown", - [102] = "Metallic Beechwood", - [103] = "Metallic Dark Beechwood", - [104] = "Metallic Choco Orange", - [105] = "Metallic Beach Sand", - [106] = "Metallic Sun Bleeched Sand", - [107] = "Metallic Cream", - [108] = "Util Brown", - [109] = "Util Medium Brown", - [110] = "Util Light Brown", - [111] = "Metallic White", - [112] = "Metallic Frost White", - [113] = "Worn Honey Beige", - [114] = "Worn Brown", - [115] = "Worn Dark Brown", - [116] = "Worn straw beige", - [117] = "Brushed Steel", - [118] = "Brushed Black steel", - [119] = "Brushed Aluminium", - [120] = "Chrome", - [121] = "Worn Off White", - [122] = "Util Off White", - [123] = "Worn Orange", - [124] = "Worn Light Orange", - [125] = "Metallic Securicor Green", - [126] = "Worn Taxi Yellow", - [127] = "police car blue", - [128] = "Matte Green", - [129] = "Matte Brown", - [130] = "Worn Orange", - [131] = "Matte White", - [132] = "Worn White", - [133] = "Worn Olive Army Green", - [134] = "Pure White", - [135] = "Hot Pink", - [136] = "Salmon pink", - [137] = "Metallic Vermillion Pink", - [138] = "Orange", - [139] = "Green", - [140] = "Blue", - [141] = "Mettalic Black Blue", - [142] = "Metallic Black Purple", - [143] = "Metallic Black Red", - [144] = "Hunter Green", - [145] = "Metallic Purple", - [146] = "Metaillic V Dark Blue", - [147] = "MODSHOP BLACK1", - [148] = "Matte Purple", - [149] = "Matte Dark Purple", - [150] = "Metallic Lava Red", - [151] = "Matte Forest Green", - [152] = "Matte Olive Drab", - [153] = "Matte Desert Brown", - [154] = "Matte Desert Tan", - [155] = "Matte Foilage Green", - [156] = "DEFAULT ALLOY COLOR", - [157] = "Epsilon Blue", - [158] = "Unknown", -} - -Config.ColorInformation = { - [0] = "black", - [1] = "black", - [2] = "black", - [3] = "darksilver", - [4] = "silver", - [5] = "bluesilver", - [6] = "silver", - [7] = "darksilver", - [8] = "silver", - [9] = "bluesilver", - [10] = "darksilver", - [11] = "darksilver", - [12] = "matteblack", - [13] = "gray", - [14] = "lightgray", - [15] = "black", - [16] = "black", - [17] = "darksilver", - [18] = "silver", - [19] = "utilgunmetal", - [20] = "silver", - [21] = "black", - [22] = "black", - [23] = "darksilver", - [24] = "silver", - [25] = "bluesilver", - [26] = "darksilver", - [27] = "red", - [28] = "torinored", - [29] = "formulared", - [30] = "blazered", - [31] = "gracefulred", - [32] = "garnetred", - [33] = "desertred", - [34] = "cabernetred", - [35] = "candyred", - [36] = "orange", - [37] = "gold", - [38] = "orange", - [39] = "red", - [40] = "mattedarkred", - [41] = "orange", - [42] = "matteyellow", - [43] = "red", - [44] = "brightred", - [45] = "garnetred", - [46] = "red", - [47] = "red", - [48] = "darkred", - [49] = "darkgreen", - [50] = "racingreen", - [51] = "seagreen", - [52] = "olivegreen", - [53] = "green", - [54] = "gasolinebluegreen", - [55] = "mattelimegreen", - [56] = "darkgreen", - [57] = "green", - [58] = "darkgreen", - [59] = "green", - [60] = "seawash", - [61] = "midnightblue", - [62] = "darkblue", - [63] = "saxonyblue", - [64] = "blue", - [65] = "blue", - [66] = "blue", - [67] = "diamondblue", - [68] = "blue", - [69] = "blue", - [70] = "brightblue", - [71] = "purpleblue", - [72] = "blue", - [73] = "ultrablue", - [74] = "brightblue", - [75] = "darkblue", - [76] = "midnightblue", - [77] = "blue", - [78] = "blue", - [79] = "lightningblue", - [80] = "blue", - [81] = "brightblue", - [82] = "mattedarkblue", - [83] = "matteblue", - [84] = "matteblue", - [85] = "darkblue", - [86] = "blue", - [87] = "lightningblue", - [88] = "yellow", - [89] = "yellow", - [90] = "bronze", - [91] = "yellow", - [92] = "lime", - [93] = "champagne", - [94] = "beige", - [95] = "darkivory", - [96] = "brown", - [97] = "brown", - [98] = "lightbrown", - [99] = "beige", - [100] = "brown", - [101] = "brown", - [102] = "beechwood", - [103] = "beechwood", - [104] = "chocoorange", - [105] = "yellow", - [106] = "yellow", - [107] = "cream", - [108] = "brown", - [109] = "brown", - [110] = "brown", - [111] = "white", - [112] = "white", - [113] = "beige", - [114] = "brown", - [115] = "brown", - [116] = "beige", - [117] = "steel", - [118] = "blacksteel", - [119] = "aluminium", - [120] = "chrome", - [121] = "wornwhite", - [122] = "offwhite", - [123] = "orange", - [124] = "lightorange", - [125] = "green", - [126] = "yellow", - [127] = "blue", - [128] = "green", - [129] = "brown", - [130] = "orange", - [131] = "white", - [132] = "white", - [133] = "darkgreen", - [134] = "white", - [135] = "pink", - [136] = "pink", - [137] = "pink", - [138] = "orange", - [139] = "green", - [140] = "blue", - [141] = "blackblue", - [142] = "blackpurple", - [143] = "blackred", - [144] = "darkgreen", - [145] = "purple", - [146] = "darkblue", - [147] = "black", - [148] = "purple", - [149] = "darkpurple", - [150] = "red", - [151] = "darkgreen", - [152] = "olivedrab", - [153] = "brown", - [154] = "tan", - [155] = "green", - [156] = "silver", - [157] = "blue", - [158] = "black", -} - -Config.ClassList = { - [0] = "Compact", - [1] = "Sedan", - [2] = "SUV", - [3] = "Coupe", - [4] = "Muscle", - [5] = "Sport Classic", - [6] = "Sport", - [7] = "Super", - [8] = "Motorbike", - [9] = "Off-Road", - [10] = "Industrial", - [11] = "Utility", - [12] = "Van", - [13] = "Bike", - [14] = "Boat", - [15] = "Helicopter", - [16] = "Plane", - [17] = "Service", - [18] = "Emergency", - [19] = "Military", - [20] = "Commercial", - [21] = "Train" -} - -function GetJobType(job) - if Config.PoliceJobs[job] then - return 'police' - elseif Config.AmbulanceJobs[job] then - return 'ambulance' - elseif Config.DojJobs[job] then - return 'doj' - else - return nil - end -end - --- this is a hack, because the qb-menu in qb-policejob populates an impound location and passed it through to the event. --- if this impound locations are changed in qb-policejob, they must also be changed here. -Config.ImpoundLocations = { - [1] = vector4(436.68, -1007.42, 27.32, 180.0), - [2] = vector4(-436.14, 5982.63, 31.34, 136.0), -} +Config = Config or {} + +Config.UsingPsHousing = false +Config.UsingDefaultQBApartments = true +Config.OnlyShowOnDuty = true + +-- RECOMMENDED Fivemerr Images. DOES NOT EXPIRE. +-- YOU NEED TO SET THIS UP FOLLOW INSTRUCTIONS BELOW. +-- Documents: https://docs.fivemerr.com/integrations/mdt-scripts/ps-mdt +Config.FivemerrMugShot = true + +-- Discord webhook for images. NOT RECOMMENDED, IMAGES EXPIRE. +Config.MugShotWebhook = false +Config.UseCQCMugshot = true + +-- Front, Back Side. Use 4 for both sides, we recommend leaving at 1 for default. +Config.MugPhotos = 1 + +-- If set to true = Fine gets automatically removed from bank automatically charging the player. +-- If set to false = The fine gets sent as an Invoice to their phone and it us to the player to pay for it, can remain unpaid and ignored. +Config.BillVariation = true + +-- If set to false (default) = The fine amount is just being removed from the player's bank account +-- If set to true = The fine amount is beeing added to the society account after being removed from the player's bank account +Config.QBBankingUse = false + +-- Set up your inventory to automatically retrieve images when a weapon is registered at a weapon shop or self-registered. +-- If you're utilizing lj-inventory's latest version from GitHub, no further modifications are necessary. +-- However, if you're using a different inventory system, please refer to the "Inventory Edit | Automatic Add Weapons with images" section in ps-mdt's README. +Config.InventoryForWeaponsImages = "lj-inventory" + +-- Only compatible with ox_inventory +Config.RegisterWeaponsAutomatically = true + +-- Set to true to register all weapons that are added via AddItem in ox_inventory +Config.RegisterCreatedWeapons = true + +-- "LegacyFuel", "lj-fuel", "ps-fuel" +Config.Fuel = "ps-fuel" + +-- Google Docs Link +Config.sopLink = { + ['police'] = '', + ['ambulance'] = '', + ['bcso'] = '', + ['doj'] = '', + ['sast'] = '', + ['sasp'] = '', + ['doc'] = '', + ['lssd'] = '', + ['sapr'] = '', +} + +-- Google Docs Link +Config.RosterLink = { + ['police'] = '', + ['ambulance'] = '', + ['bcso'] = '', + ['doj'] = '', + ['sast'] = '', + ['sasp'] = '', + ['doc'] = '', + ['lssd'] = '', + ['sapr'] = '', +} + +Config.PoliceJobs = { + ['police'] = true, + ['lspd'] = true, + ['bcso'] = true, + ['sast'] = true, + ['sasp'] = true, + ['doc'] = true, + ['lssd'] = true, + ['sapr'] = true, + ['pa'] = true +} + +Config.AmbulanceJobs = { + ['ambulance'] = true, + ['doctor'] = true +} + +Config.DojJobs = { + ['lawyer'] = true, + ['judge'] = true +} + +-- This is a workaround solution because the qb-menu present in qb-policejob fills in an impound location and sends it to the event. +-- If the impound locations are modified in qb-policejob, the changes must also be implemented here to ensure consistency. + +Config.ImpoundLocations = { + [1] = vector4(436.68, -1007.42, 27.32, 180.0), + [2] = vector4(-436.14, 5982.63, 31.34, 136.0), +} + +-- Support for Wraith ARS 2X. + +Config.UseWolfknightRadar = false +Config.WolfknightNotifyTime = 5000 -- How long the notification displays for in milliseconds (30000 = 30 seconds) +Config.PlateScanForDriversLicense = false -- If true, plate scanner will check if the owner of the scanned vehicle has a drivers license + +-- IMPORTANT: To avoid making excessive database queries, modify this config to true 'CONFIG.use_sonorancad = true' setting in the configuration file located at 'wk_wars2x/config.lua'. +-- Enabling this setting will limit plate checks to only those vehicles that have been used by a player. + +Config.LogPerms = { + ['ambulance'] = { + [4] = true, + }, + ['police'] = { + [4] = true, + }, + ['bcso'] = { + [4] = true, + }, + ['sast'] = { + [4] = true, + }, + ['sasp'] = { + [4] = true, + }, + ['sapr'] = { + [4] = true, + }, + ['doc'] = { + [4] = true, + }, + ['lssd'] = { + [4] = true, + }, +} + +Config.RemoveIncidentPerms = { + ['ambulance'] = { + [4] = true, + }, + ['police'] = { + [4] = true, + }, + ['bcso'] = { + [4] = true, + }, + ['sast'] = { + [4] = true, + }, + ['sasp'] = { + [4] = true, + }, + ['sapr'] = { + [4] = true, + }, + ['doc'] = { + [4] = true, + }, + ['lssd'] = { + [4] = true, + }, +} + +Config.RemoveReportPerms = { + ['ambulance'] = { + [4] = true, + }, + ['police'] = { + [4] = true, + }, + ['bcso'] = { + [4] = true, + }, + ['sast'] = { + [4] = true, + }, + ['sasp'] = { + [4] = true, + }, + ['sapr'] = { + [4] = true, + }, + ['doc'] = { + [4] = true, + }, + ['lssd'] = { + [4] = true, + }, +} + +Config.RemoveWeaponsPerms = { + ['ambulance'] = { + [4] = true, + }, + ['police'] = { + [4] = true, + }, + ['bcso'] = { + [4] = true, + }, + ['sast'] = { + [4] = true, + }, + ['sasp'] = { + [4] = true, + }, + ['sapr'] = { + [4] = true, + }, + ['doc'] = { + [4] = true, + }, + ['lssd'] = { + [4] = true, + }, +} + +Config.PenalCodeTitles = { + [1] = 'OFFENSES AGAINST PERSONS', + [2] = 'OFFENSES INVOLVING THEFT', + [3] = 'OFFENSES INVOLVING FRAUD', + [4] = 'OFFENSES INVOLVING DAMAGE TO PROPERTY', + [5] = 'OFFENSES AGAINST PUBLIC ADMINISTRATION', + [6] = 'OFFENSES AGAINST PUBLIC ORDER', + [7] = 'OFFENSES AGAINST HEALTH AND MORALS', + [8] = 'OFFENSES AGAINST PUBLIC SAFETY', + [9] = 'OFFENSES INVOLVING THE OPERATION OF A VEHICLE', + [10] = 'OFFENSES INVOLVING THE WELL-BEING OF WILDLIFE', +} + +Config.PenalCode = { + [1] = { + [1] = {title = 'Simple Assault', class = 'Misdemeanor', id = 'P.C. 1001', months = 7, fine = 500, color = 'green', description = 'When a person intentionally or knowingly causes physical contact with another (without a weapon)'}, + [2] = {title = 'Assault', class = 'Misdemeanor', id = 'P.C. 1002', months = 15, fine = 850, color = 'orange', description = 'If a person intentionally or knowingly causes injury to another (without a weapon)'}, + [3] = {title = 'Aggravated Assault', class = 'Felony', id = 'P.C. 1003', months = 20, fine = 1250, color = 'orange', description = 'When a person unintentionally, and recklessly causes bodily injury to another as a result of a confrontation AND causes bodily injury'}, + [4] = {title = 'Assault with a Deadly Weapon', class = 'Felony', id = 'P.C. 1004', months = 30, fine = 3750, color = 'red', description = 'When a person intentionally, knowingly, or recklessly causes bodily injury to another person AND either causes serious bodily injury or uses or exhibits a deadly weapon'}, + [5] = {title = 'Involuntary Manslaughter', class = 'Felony', id = 'P.C. 1005', months = 60, fine = 7500, color = 'red', description = 'When a person unintentionally and recklessly causes the death of another'}, + [6] = {title = 'Vehicular Manslaughter', class = 'Felony', id = 'P.C. 1006', months = 75, fine = 7500, color = 'red', description = 'When a person unintentionally and recklessly causes the death of anther with a vehicle'}, + [7] = {title = 'Attempted Murder of a Civilian', class = 'Felony', id = 'P.C. 1007', months = 50, fine = 7500, color = 'red', description = 'When a non-government person intentionally attacks another with the intent to kill'}, + [8] = {title = 'Second Degree Murder', class = 'Felony', id = 'P.C. 1008', months = 100, fine = 15000, color = 'red', description = 'Any intentional killing that is not premeditated or planned. A situation in which the killer intends only to inflict serious bodily harm.'}, + [9] = {title = 'Accessory to Second Degree Murder', class = 'Felony', id = 'P.C. 1009', months = 50, fine = 5000, color = 'red', description = 'Being present and or participating in the act of parent charge'}, + [10] = {title = 'First Degree Murder', class = 'Felony', id = 'P.C. 1010', months = 0, fine = 0, color = 'red', description = 'Any intentional killing that is willful and premeditated with malice.'}, + [11] = {title = 'Accessory to First Degree Murder', class = 'Felony', id = 'P.C. 1011', months = 0, fine = 0, color = 'red', description = 'Being present and or participating in the act of parent charge'}, + [12] = {title = 'Murder of a Public Servant or Peace Officer', class = 'Felony', id = 'P.C. 1012', months = 0, fine = 0, color = 'red', description = 'Any intentional killing that is done to a government employee'}, + [13] = {title = 'Attempted Murder of a Public Servant or Peace Officer', class = 'Felony', id = 'P.C. 1013', months = 65, fine = 10000, color = 'red', description = 'Any attacks that are done to a government employee with the intent to cause death'}, + [14] = {title = 'Accessory to the Murder of a Public Servant or Peace Officer', class = 'Felony', id = 'P.C. 1014', months = 0, fine = 0, color = 'red', description = 'Being present and or participating in the act of parent charge'}, + [15] = {title = 'Unlawful Imprisonment', class = 'Misdemeanor', id = 'P.C. 1015', months = 10, fine = 600, color = 'green', description = 'The act of taking another against their will and holding them for an extended period of time'}, + [16] = {title = 'Kidnapping', class = 'Felony', id = 'P.C. 1016', months = 15, fine = 900, color = 'orange', description = 'The act of taking another against their will for a short period of time'}, + [17] = {title = 'Accessory to Kidnapping', class = 'Felony', id = 'P.C. 1017', months = 7, fine = 450, color = 'orange', description = 'Being present and or participating in the act of parent charge'}, + [18] = {title = 'Attempted Kidnapping', class = 'Felony', id = 'P.C. 1018', months = 10, fine = 450, color = 'orange', description = 'The act of trying to take someone against their will'}, + [19] = {title = 'Hostage Taking', class = 'Felony', id = 'P.C. 1019', months = 20, fine = 1200, color = 'orange', description = 'The act of taking another against their will for personal gain'}, + [20] = {title = 'Accessory to Hostage Taking', class = 'Felony', id = 'P.C. 1020', months = 10, fine = 600, color = 'orange', description = 'Being present and or participating in the act of parent charge'}, + [21] = {title = 'Unlawful Imprisonment of a Public Servant or Peace Officer.', class = 'Felony', id = 'P.C. 1021', months = 25, fine = 4000, color = 'orange', description = 'The act of taking a government employee against their will for an extended period of time'}, + [22] = {title = 'Criminal Threats', class = 'Misdemeanor', id = 'P.C. 1022', months = 5, fine = 500, color = 'orange', description = 'The act of stating the intent to commit a crime against another'}, + [23] = {title = 'Reckless Endangerment', class = 'Misdemeanor', id = 'P.C. 1023', months = 10, fine = 1000, color = 'orange', description = 'The act of disregarding safety of another which may place another in danger of death or bodily injury'}, + [24] = {title = 'Gang Related Shooting', class = 'Felony', id = 'P.C. 1024', months = 30, fine = 2500, color = 'red', description = 'The act in which a firearm is discharged in relation to gang activity'}, + [25] = {title = 'Cannibalism', class = 'Felony', id = 'P.C. 1025', months = 0, fine = 0, color = 'red', description = 'The act in which a persons consumes the flesh of another willingly'}, + [26] = {title = 'Torture', class = 'Felony', id = 'P.C. 1026', months = 40, fine = 4500, color = 'red', description = 'The act of causing harm to another to extract informaion and or for self enjoyment'}, + }, + [2] = { + [1] = {title = 'Petty Theft', class = 'Infraction', id = 'P.C. 2001', months = 0, fine = 250, color = 'green', description = 'The theft of property below $50 amount'}, + [2] = {title = 'Grand Theft', class = 'Misdemeanor', id = 'P.C. 2002', months = 10, fine = 600, color = 'green', description = 'Theft of property above $700'}, + [3] = {title = 'Grand Theft Auto A', class = 'Felony', id = 'P.C. 2003', months = 15, fine = 900, color = 'green', description = 'The act of stealing a vehicle that belongs to someone else without permission'}, + [4] = {title = 'Grand Theft Auto B', class = 'Felony', id = 'P.C. 2004', months = 35, fine = 3500, color = 'green', description = 'The act of stealing a vehicle that belongs to someone else without permission while armed'}, + [5] = {title = 'Carjacking', class = 'Felony', id = 'P.C. 2005', months = 30, fine = 2000, color = 'orange', description = 'The act of someone forcefully taking a vehicle from its occupants'}, + [6] = {title = 'Burglary', class = 'Misdemeanor', id = 'P.C. 2006', months = 10, fine = 500, color = 'green', description = 'The act of entering into a building illegally with intent to commit a crime, especially theft.'}, + [7] = {title = 'Robbery', class = 'Felony', id = 'P.C. 2007', months = 25, fine = 2000, color = 'green', description = 'The action of taking property unlawfully from a person or place by force or threat of force.'}, + [8] = {title = 'Accessory to Robbery', class = 'Felony', id = 'P.C. 2008', months = 12, fine = 1000, color = 'green', description = 'Being present and or participating in the act of parent charge'}, + [9] = {title = 'Attempted Robbery', class = 'Felony', id = 'P.C. 2009', months = 20, fine = 1000, color = 'green', description = 'The action of attempting property unlawfully from a person or place by force or threat of force.'}, + [10] = {title = 'Armed Robbery', class = 'Felony', id = 'P.C. 2010', months = 30, fine = 3000, color = 'orange', description = 'The action of taking property unlawfully from a person or place by force or threat of force while armed.'}, + [11] = {title = 'Accessory to Armed Robbery', class = 'Felony', id = 'P.C. 2011', months = 15, fine = 1500, color = 'orange', description = 'Being present and or participating in the act of parent charge'}, + [12] = {title = 'Attempted Armed Robbery', class = 'Felony', id = 'P.C. 2012', months = 25, fine = 1500, color = 'orange', description = 'The action of attempting property unlawfully from a person or place by force or threat of force while armed.'}, + [13] = {title = 'Grand Larceny', class = 'Felony', id = 'P.C. 2013', months = 45, fine = 7500, color = 'orange', description = 'Theft of personal property having a value above a legally specified amount.'}, + [14] = {title = 'Leaving Without Paying', class = 'Infraction', id = 'P.C. 2014', months = 0, fine = 500, color = 'green', description = 'The act of leaving an establishment without paying for provided service'}, + [15] = {title = 'Possession of Nonlegal Currency', class = 'Misdemeanor', id = 'P.C. 2015', months = 10, fine = 750, color = 'green', description = 'Being in possession of stolen currency'}, + [16] = {title = 'Possession of Government-Issued Items', class = 'Misdemeanor', id = 'P.C. 2016', months = 15, fine = 1000, color = 'green', description = 'Being in possession of Items only acquireable by government employees'}, + [17] = {title = 'Possession of Items Used in the Commission of a Crime', class = 'Misdemeanor', id = 'P.C. 2017', months = 10, fine = 500, color = 'green', description = 'Being in possession of Items that were previously used to commit crimes'}, + [18] = {title = 'Sale of Items Used in the Commission of a Crime', class = 'Felony', id = 'P.C. 2018', months = 15, fine = 1000, color = 'orange', description = 'The act of selling items that were previously used to commit crimes'}, + [19] = {title = 'Theft of an Aircraft', class = 'Felony', id = 'P.C. 2019', months = 20, fine = 1000, color = 'green', description = 'The act of stealing an aircraft'}, + }, + [3] = { + [1] = {title = 'Impersonating', class = 'Misdemeanor', id = 'P.C. 3001', months = 15, fine = 1250, color = 'green', description = 'The action of falsely identifying as another person to deceive'}, + [2] = {title = 'Impersonating a Peace Officer or Public Servant', class = 'Felony', id = 'P.C. 3002', months = 25, fine = 2750, color = 'green', description = 'The action of falsely identifying as a government employee to deceive'}, + [3] = {title = 'Impersonating a Judge', class = 'Felony', id = 'P.C. 3003', months = 0, fine = 0, color = 'green', description = 'The action of falsely identifying as a Judge to deceive'}, + [4] = {title = 'Possession of Stolen Identification', class = 'Misdemeanor', id = 'P.C. 3004', months = 10, fine = 750, color = 'green', description = 'To have another persons Identification without consent'}, + [5] = {title = 'Possession of Stolen Government Identification', class = 'Misdemeanor', id = 'P.C. 3005', months = 20, fine = 2000, color = 'green', description = 'To have the identification of a government employee without consent'}, + [6] = {title = 'Extortion', class = 'Felony', id = 'P.C. 3006', months = 20, fine = 900, color = 'orange', description = 'To threaten or cause harm to a person or property for financial gain'}, + [7] = {title = 'Fraud', class = 'Misdemeanor', id = 'P.C. 3007', months = 10, fine = 450, color = 'green', description = 'To deceive another for financial gain'}, + [8] = {title = 'Forgery', class = 'Misdemeanor', id = 'P.C. 3008', months = 15, fine = 750, color = 'green', description = 'To falsify legal documentation for personal gain'}, + [9] = {title = 'Money Laundering', class = 'Felony', id = 'P.C. 3009', months = 0, fine = 0, color = 'red', description = 'The processing stolen money for legal currency'}, + }, + [4] = { + [1] = {title = 'Trespassing', class = 'Misdemeanor', id = 'P.C. 4001', months = 10, fine = 450, color = 'green', description = 'For a person to be within the bounds of a location of which they are not legally allowed'}, + [2] = {title = 'Felony Trespassing', class = 'Felony', id = 'P.C. 4002', months = 15, fine = 1500, color = 'green', description = 'For a person to have repeatedly entered the bounds of a location of which they are knowingly not legally allowed'}, + [3] = {title = 'Arson', class = 'Felony', id = 'P.C. 4003', months = 15, fine = 1500, color = 'orange', description = 'The use if fire and accelerants to will and maliciously destroy, harm or cause death to a person or property'}, + [4] = {title = 'Vandalism', class = 'Infraction', id = 'P.C. 4004', months = 0, fine = 300, color = 'green', description = 'The willful destruction of property'}, + [5] = {title = 'Vandalism of Government Property', class = 'Felony', id = 'P.C. 4005', months = 20, fine = 1500, color = 'green', description = 'The willful destruction of government property'}, + [6] = {title = 'Littering', class = 'Infraction', id = 'P.C. 4006', months = 0, fine = 200, color = 'green', description = 'The willful discard of refuse into to open and not in designated bin'}, + }, + [5] = { + [1] = {title = 'Bribery of a Government Official', class = 'Felony', id = 'P.C. 5001', months = 20, fine = 3500, color = 'green', description = 'the use of money, favors and or property to gain favor with a government official'}, + [2] = {title = 'Anti-Mask Law', class = 'Infraction', id = 'P.C. 5002', months = 0, fine = 750, color = 'green', description = 'Wearing a mask in a prohibited zone'}, + [3] = {title = 'Possession of Contraband in a Government Facility', class = 'Felony', id = 'P.C. 5003', months = 25, fine = 1000, color = 'green', description = 'Being in possession of items that are illegal while within a government building'}, + [4] = {title = 'Criminal Possession of Stolen Property', class = 'Misdemeanor', id = 'P.C. 5004', months = 10, fine = 500, color = 'green', description = 'Being in possession of items stolen knowingly or not'}, + [5] = {title = 'Escaping', class = 'Felony', id = 'P.C. 5005', months = 10, fine = 450, color = 'green', description = 'The action of willful and knowingly leaving custody while legally being arrest, detained or in jail'}, + [6] = {title = 'Jailbreak', class = 'Felony', id = 'P.C. 5006', months = 30, fine = 2500, color = 'orange', description = 'The action of leaving state custody from a state or county detention facility'}, + [7] = {title = 'Accessory to Jailbreak', class = 'Felony', id = 'P.C. 5007', months = 25, fine = 2000, color = 'orange', description = 'Being present and or participating in the act of parent charge'}, + [8] = {title = 'Attempted Jailbreak', class = 'Felony', id = 'P.C. 5008', months = 20, fine = 1500, color = 'orange', description = 'The willful and intentional attempted escape from a state or county detention facility'}, + [9] = {title = 'Perjury', class = 'Felony', id = 'P.C. 5009', months = 0, fine = 0, color = 'green', description = 'The action of stating falsities while legally bound to speak the truth'}, + [10] = {title = 'Violation of a Restraining Order', class = 'Felony', id = 'P.C. 5010', months = 20, fine = 2250, color = 'green', description = 'The willful and knowing infringement upon court ordered protective documentation'}, + [11] = {title = 'Embezzlement', class = 'Felony', id = 'P.C. 5011', months = 45, fine = 10000, color = 'green', description = 'The willful and knowingly movement of funds from non personal bank accounts to personal bank accounts for personal gain'}, + [12] = {title = 'Unlawful Practice', class = 'Felony', id = 'P.C. 5012', months = 15, fine = 1500, color = 'orange', description = 'The action of performing a service without proper legal licensing and approval'}, + [13] = {title = 'Misuse of Emergency Systems', class = 'Infraction', id = 'P.C. 5013', months = 0, fine = 600, color = 'orange', description = 'Use of government emergency equipment for its non-intended purpose'}, + [14] = {title = 'Conspiracy', class = 'Misdemeanor', id = 'P.C. 5014', months = 10, fine = 450, color = 'green', description = 'The act of planning a crime but not yet commiting the crime'}, + [15] = {title = 'Violating a Court Order', class = 'Misdemeanor', id = 'P.C. 5015', months = 0, fine = 0, color = 'orange', description = 'The infringement of court ordered documentation'}, + [16] = {title = 'Failure to Appear', class = 'Misdemeanor', id = 'P.C. 5016', months = 0, fine = 0, color = 'orange', description = 'When someone who is legally bound to appear in court does not do so'}, + [17] = {title = 'Contempt of Court', class = 'Felony', id = 'P.C. 5017', months = 0, fine = 0, color = 'orange', description = 'The disruption of court proceedings in a courtroom while it is in session (judicial decision)'}, + [18] = {title = 'Resisting Arrest', class = 'Misdemeanor', id = 'P.C. 5018', months = 5, fine = 300, color = 'orange', description = 'The act of not allowing peace officers to take you into custody willingly'}, + }, + [6] = { + [1] = {title = 'Disobeying a Peace Officer', class = 'infraction', id = 'P.C. 6001', months = 0, fine = 750, color = 'green', description = 'The willful disregard of a lawful order'}, + [2] = {title = 'Disorderly Conduct', class = 'Infraction', id = 'P.C. 6002', months = 0, fine = 250, color = 'green', description = 'Acting in a manner that creates a hazardous or physically offensive condition by any act which serves no legitimate purpose of the actor. '}, + [3] = {title = 'Disturbing the Peace', class = 'infraction', id = 'P.C. 6003', months = 0, fine = 350, color = 'green', description = 'Action in a manner that causes unrest and disrupts public order'}, + [4] = {title = 'False Reporting', class = 'Misdemeanor', id = 'P.C. 6004', months = 10, fine = 750, color = 'green', description = 'The act of reporting a crime that did not happen'}, + [5] = {title = 'Harassment', class = 'Misdemeanor', id = 'P.C. 6005', months = 10, fine = 500, color = 'orange', description = 'The repeated disruption or verbal attacks of another person'}, + [6] = {title = 'Misdemeanor Obstruction of Justice', class = 'Misdemeanor', id = 'P.C. 6006', months = 10, fine = 500, color = 'green', description = 'Acting in a way that hinders the process of Justice or lawful investigations'}, + [7] = {title = 'Felony Obstruction of Justice', class = 'Felony', id = 'P.C. 6007', months = 15, fine = 900, color = 'green', description = 'Acting in a way that hinders the process of Justice or lawful investigations while using violence'}, + [8] = {title = 'Inciting a Riot', class = 'Felony', id = 'P.C. 6008', months = 25, fine = 1000, color = 'orange', description = 'Causing civil unrest in a manner to incite a group to cause harm to people or property'}, + [9] = {title = 'Loitering on Government Properties', class = 'Infraction', id = 'P.C. 6009', months = 0, fine = 500, color = 'green', description = 'When someone is present in a government proper for an extended period of time'}, + [10] = {title = 'Tampering', class = 'Misdemeanor', id = 'P.C. 6010', months = 10, fine = 500, color = 'green', description = 'When someone willfully, knowingly and indirectly interfering with key points of a lawful investigation'}, + [11] = {title = 'Vehicle Tampering', class = 'Misdemeanor', id = 'P.C. 6011', months = 15, fine = 750, color = 'green', description = 'The willful and knowing interference the normal function of a vehicle'}, + [12] = {title = 'Evidence Tampering', class = 'Felony', id = 'P.C. 6012', months = 20, fine = 1000, color = 'green', description = 'The willful and knowing interference with evidence from a lawful investigation'}, + [13] = {title = 'Witness Tampering', class = 'Felony', id = 'P.C. 6013', months = 0, fine = 0, color = 'green', description = 'The willful and knowing coaching or coercing of a witness in a lawful investigation'}, + [14] = {title = 'Failure to Provide Identification', class = 'Misdemeanor', id = 'P.C. 6014', months = 15, fine = 1500, color = 'green', description = 'The act of not presenting identification when lawfully required to do so'}, + [15] = {title = 'Vigilantism', class = 'Felony', id = 'P.C. 6015', months = 30, fine = 1500, color = 'orange', description = 'The act of engaging in enforcing the law with legal authority to do so'}, + [16] = {title = 'Unlawful Assembly', class = 'Misdemeanor', id = 'P.C. 6016', months = 10, fine = 750, color = 'orange', description = 'when a large group gathers in a location that requires prior approval to do so'}, + [17] = {title = 'Government Corruption', class = 'Felony', id = 'P.C. 6017', months = 0, fine = 0, color = 'red', description = 'The act of using political position and power for self gain'}, + [18] = {title = 'Stalking', class = 'Felony', id = 'P.C. 6018', months = 40, fine = 1500, color = 'orange', description = 'When one person monitors another without their consent'}, + [19] = {title = 'Aiding and Abetting', class = 'Misdemeanor', id = 'P.C. 6019', months = 15, fine = 450, color = 'orange', description = 'To assist someone in committing or to encourage someone to commit a crime'}, + [20] = {title = 'Harboring a Fugitive', class = 'Misdemeanor', id = 'P.C. 6020', months = 10, fine = 1000, color = 'green', description = 'When someone willingly hides another who is wanted by the authorities'}, + }, + [7] = { + [1] = {title = 'Misdemeanor Possession of Marijuana', class = 'Misdemeanor', id = 'P.C. 7001', months = 5, fine = 250, color = 'green', description = 'The possession of a quantity of marijuana in the amount of less the 4 blunts'}, + [2] = {title = 'Felony manufacturing of Marijuana', class = 'Felony', id = 'P.C. 7002', months = 15, fine = 1000, color = 'red', description = 'The possession of a quantity of marijuana that is from manufacturing'}, + [3] = {title = 'Cultivation of Marijuana A', class = 'Misdemeanor', id = 'P.C. 7003', months = 10, fine = 750, color = 'green', description = 'The possession of 4 or less marijuana plants'}, + [4] = {title = 'Cultivation of Marijuana B', class = 'Felony', id = 'P.C. 7004', months = 30, fine = 1500, color = 'orange', description = 'The possession of 5 or more marijuana plants'}, + [5] = {title = 'Possession of Marijuana with Intent to Distribute', class = 'Felony', id = 'P.C. 7005', months = 30, fine = 3000, color = 'orange', description = 'The possession of a quantity of Marijuana for distribution'}, + [6] = {title = 'Misdemeanor Possession of Cocaine', class = 'Misdemeanor', id = 'P.C. 7006', months = 7, fine = 500, color = 'green', description = 'The possession of cocaine in a small quantity usually for personal use'}, + [7] = {title = 'Felony manufacturing Possession of Cocaine', class = 'Felony', id = 'P.C. 7007', months = 25, fine = 1500, color = 'red', description = 'The possession of a quantity of cocaine that is from manufacturing'}, + [8] = {title = 'Possession of Cocaine with Intent to Distribute', class = 'Felony', id = 'P.C. 7008', months = 35, fine = 4500, color = 'orange', description = 'The possession of a quantity of Cocaine for distribution'}, + [9] = {title = 'Misdemeanor Possession of Methamphetamine', class = 'Misdemeanor', id = 'P.C. 7009', months = 7, fine = 500, color = 'green', description = 'The possession of methamphetamine in a small quantity usually for personal use'}, + [10] = {title = 'Felony manufacturing Possession of Methamphetamine', class = 'Felony', id = 'P.C. 7010', months = 25, fine = 1500, color = 'red', description = 'The possession of a quantity of methamphetamine that is from manufacturing'}, + [11] = {title = 'Possession of Methamphetamine with Intent to Distribute', class = 'Felony', id = 'P.C. 7011', months = 35, fine = 4500, color = 'orange', description = 'The possession of a quantity of Methamphetamine for distribution'}, + [12] = {title = 'Misdemeanor Possession of Oxy / Vicodin', class = 'Misdemeanor', id = 'P.C. 7012', months = 7, fine = 500, color = 'green', description = 'The possession of oxy / vicodin in a small quantity usually for personal use without prescription'}, + [13] = {title = 'Felony manufacturing Possession of Oxy / Vicodin', class = 'Felony', id = 'P.C. 7013', months = 25, fine = 1500, color = 'red', description = 'The possession of a quantity of oxy / vicodin that is from manufacturing'}, + [14] = {title = 'Felony Possession of Oxy / Vicodin with Intent to Distribute', class = 'Felony', id = 'P.C. 7014', months = 35, fine = 4500, color = 'orange', description = 'The possession of a quantity of oxy / vicodin for distribution'}, + [15] = {title = 'Misdemeanor Possession of Ecstasy', class = 'Misdemeanor', id = 'P.C. 7015', months = 7, fine = 500, color = 'green', description = 'The possession of ecstasy in a small quantity usually for personal use'}, + [16] = {title = 'Felony manufacturing Possession of Ecstasy', class = 'Felony', id = 'P.C. 7016', months = 25, fine = 1500, color = 'red', description = 'The possession of a quantity of ecstasy that is from manufacturing'}, + [17] = {title = 'Possession of Ecstasy with Intent to Distribute', class = 'Felony', id = 'P.C. 7017', months = 35, fine = 4500, color = 'orange', description = 'The possession of a quantity of ecstasy for distribution'}, + [18] = {title = 'Misdemeanor Possession of Opium', class = 'Misdemeanor', id = 'P.C. 7018', months = 7, fine = 500, color = 'green', description = 'The possession of opium in a small quantity usually for personal use'}, + [19] = {title = 'Felony manufacturing Possession of Opium', class = 'Felony', id = 'P.C. 7019', months = 25, fine = 1500, color = 'red', description = 'The possession of a quantity of opium that is from manufacturing'}, + [20] = {title = 'Possession of Opium with Intent to Distribute', class = 'Felony', id = 'P.C. 7020', months = 35, fine = 4500, color = 'orange', description = 'The possession of a quantity of Opium for distribution'}, + [21] = {title = 'Misdemeanor Possession of Adderall', class = 'Misdemeanor', id = 'P.C. 7021', months = 7, fine = 500, color = 'green', description = 'The possession of adderall in a small quantity usually for personal use without prescription'}, + [22] = {title = 'Felony manufacturing Possession of Adderall', class = 'Felony', id = 'P.C. 7022', months = 25, fine = 1500, color = 'red', description = 'The possession of a quantity of adderall that is from manufacturing'}, + [23] = {title = 'Possession of Adderall with Intent to Distribute', class = 'Felony', id = 'P.C. 7023', months = 35, fine = 4500, color = 'orange', description = 'The possession of a quantity of Adderall for distribution'}, + [24] = {title = 'Misdemeanor Possession of Xanax', class = 'Misdemeanor', id = 'P.C. 7024', months = 7, fine = 500, color = 'green', description = 'The possession of xanax in a small quantity usually for personal use without prescription'}, + [25] = {title = 'Felony manufacturing Possession of Xanax', class = 'Felony', id = 'P.C. 7025', months = 25, fine = 1500, color = 'red', description = 'The possession of a quantity of xanax that is from manufacturing'}, + [26] = {title = 'Possession of Xanax with Intent to Distribute', class = 'Felony', id = 'P.C. 7026', months = 35, fine = 4500, color = 'orange', description = 'The possession of a quantity of Xanax for distribution'}, + [27] = {title = 'Misdemeanor Possession of Shrooms', class = 'Misdemeanor', id = 'P.C. 7027', months = 7, fine = 500, color = 'green', description = 'The possession of shrooms in a small quantity usually for personal use'}, + [28] = {title = 'Felony manufacturing Possession of Shrooms', class = 'Felony', id = 'P.C. 7028', months = 25, fine = 1500, color = 'red', description = 'The possession of a quantity of shrooms that is from manufacturing'}, + [29] = {title = 'Possession of Shrooms with Intent to Distribute', class = 'Felony', id = 'P.C. 7029', months = 35, fine = 4500, color = 'orange', description = 'The possession of a quantity of Shrooms for distribution'}, + [30] = {title = 'Misdemeanor Possession of Lean', class = 'Misdemeanor', id = 'P.C. 7030', months = 7, fine = 500, color = 'green', description = 'The possession of lean in a small quantity usually for personal use'}, + [31] = {title = 'Felony manufacturing Possession of Lean', class = 'Felony', id = 'P.C. 7031', months = 25, fine = 1500, color = 'red', description = 'The possession of a quantity of lean that is from manufacturing'}, + [32] = {title = 'Possession of Lean with Intent to Distribute', class = 'Felony', id = 'P.C. 7032', months = 35, fine = 4500, color = 'orange', description = 'The possession of a quantity of lean for distribution'}, + [33] = {title = 'Sale of a controlled substance', class = 'Misdemeanor', id = 'P.C. 7033', months = 10, fine = 1000, color = 'green', description = 'The sale of a substance that is controlled by law'}, + [34] = {title = 'Drug Trafficking', class = 'Felony', id = 'P.C. 7034', months = 0, fine = 0, color = 'red', description = 'The large scale movement of illegal drugs'}, + [35] = {title = 'Desecration of a Human Corpse', class = 'Felony', id = 'P.C. 7035', months = 20, fine = 1500, color = 'orange', description = 'When someone harms, disturbs or destroys the remains of another person'}, + [36] = {title = 'Public Intoxication', class = 'Infraction', id = 'P.C. 7036', months = 0, fine = 500, color = 'green', description = 'When someone is intoxicated above legal limit in public'}, + [37] = {title = 'Public Indecency', class = 'Misdemeanor', id = 'P.C. 7037', months = 10, fine = 750, color = 'green', description = 'The act of someone exposing themself in a way that infringes in public morals'}, + }, + [8] = { + [1] = {title = 'Criminal Possession of Weapon Class A', class = 'Felony', id = 'P.C. 8001', months = 10, fine = 500, color = 'green', description = 'Possession of a Class A firearm without licensing'}, + [2] = {title = 'Criminal Possession of Weapon Class B', class = 'Felony', id = 'P.C. 8002', months = 15, fine = 1000, color = 'green', description = 'Possession of a Class B firearm without licensing'}, + [3] = {title = 'Criminal Possession of Weapon Class C', class = 'Felony', id = 'P.C. 8003', months = 30, fine = 3500, color = 'green', description = 'Possession of a Class C firearm without licensing'}, + [4] = {title = 'Criminal Possession of Weapon Class D', class = 'Felony', id = 'P.C. 8004', months = 25, fine = 1500, color = 'green', description = 'Possession of a Class D firearm without licensing'}, + [5] = {title = 'Criminal Sale of Weapon Class A', class = 'Felony', id = 'P.C. 8005', months = 15, fine = 1000, color = 'orange', description = 'The act of selling a Class A firearm without licensing'}, + [6] = {title = 'Criminal Sale of Weapon Class B', class = 'Felony', id = 'P.C. 8006', months = 20, fine = 2000, color = 'orange', description = 'The act of selling a Class B firearm without licensing'}, + [7] = {title = 'Criminal Sale of Weapon Class C', class = 'Felony', id = 'P.C. 8007', months = 35, fine = 7000, color = 'orange', description = 'The act of selling a Class C firearm without licensing'}, + [8] = {title = 'Criminal Sale of Weapon Class D', class = 'Felony', id = 'P.C. 8008', months = 30, fine = 3000, color = 'orange', description = 'The act of selling a Class D firearm without licensing'}, + [9] = {title = 'Criminal Use of Weapon', class = 'Misdemeanor', id = 'P.C. 8009', months = 10, fine = 450, color = 'orange', description = 'Use of a weapon while in commission of a crime'}, + [10] = {title = 'Possession of Illegal Firearm Modifications', class = 'Misdemeanor', id = 'P.C. 8010', months = 10, fine = 300, color = 'green', description = 'Being in possession of firearm modifications unlawfully'}, + [11] = {title = 'Weapon Trafficking', class = 'Felony', id = 'P.C. 8011', months = 0, fine = 0, color = 'red', description = 'The transportation of a large amount of weapons for one point to another'}, + [12] = {title = 'Brandishing a Weapon', class = 'Misdemeanor', id = 'P.C. 8012', months = 15, fine = 500, color = 'orange', description = 'The act of making a firearm purposely visible'}, + [13] = {title = 'Insurrection', class = 'Felony', id = 'P.C. 8013', months = 0, fine = 0, color = 'red', description = 'Attempting to overthrow the government with violence'}, + [14] = {title = 'Flying into Restricted Airspace', class = 'Felony', id = 'P.C. 8014', months = 20, fine = 1500, color = 'green', description = 'Piloting and aircraft into airspace that is governmentally controlled'}, + [15] = {title = 'Jaywalking', class = 'Infraction', id = 'P.C. 8015', months = 0, fine = 150, color = 'green', description = 'crossing a roadway in a manner that is hazardous to motor vehicles'}, + [16] = {title = 'Criminal Use of Explosives', class = 'Felony', id = 'P.C. 8016', months = 30, fine = 2500, color = 'orange', description = 'Use of explosives to committing a crime'}, + }, + [9] = { + [1] = {title = 'Driving While Intoxicated', class = 'Misdemeanor', id = 'P.C. 9001', months = 5, fine = 300, color = 'green', description = 'Operating a motor vehicle while impaired by alcohol'}, + [2] = {title = 'Evading', class = 'Misdemeanor', id = 'P.C. 9002', months = 5, fine = 400, color = 'green', description = 'Hiding or running from lawful detainment'}, + [3] = {title = 'Reckless Evading', class = 'Felony', id = 'P.C. 9003', months = 10, fine = 800, color = 'orange', description = 'Recklessly disregarding safety and Hiding or running from lawful detainment while '}, + [4] = {title = 'Failure to Yield to Emergency Vehicle', class = 'Infraction', id = 'P.C. 9004', months = 0, fine = 600, color = 'green', description = 'Not giving way to emergency vehicles'}, + [5] = {title = 'Failure to Obey Traffic Control Device', class = 'Infraction', id = 'P.C. 9005', months = 0, fine = 150, color = 'green', description = 'Not following the safety devices of the roadway'}, + [6] = {title = 'Nonfunctional Vehicle', class = 'Infraction', id = 'P.C. 9006', months = 0, fine = 75, color = 'green', description = 'Having a vehicle that is no longer functional in the roadway'}, + [7] = {title = 'Negligent Driving', class = 'Infraction', id = 'P.C. 9007', months = 0, fine = 300, color = 'green', description = 'Driving in a manner as to unknowingly disregard safety'}, + [8] = {title = 'Reckless Driving', class = 'Misdemeanor', id = 'P.C. 9008', months = 10, fine = 750, color = 'orange', description = 'Driving in a manner as to knowingly disregard safety'}, + [9] = {title = 'Third Degree Speeding', class = 'Infraction', id = 'P.C. 9009', months = 0, fine = 225, color = 'green', description = 'Speeding 15 over the limit'}, + [10] = {title = 'Second Degree Speeding', class = 'Infraction', id = 'P.C. 9010', months = 0, fine = 450, color = 'green', description = 'Speeding 35 over the limit'}, + [11] = {title = 'First Degree Speeding', class = 'Infraction', id = 'P.C. 9011', months = 0, fine = 750, color = 'green', description = 'Speeding 50 over the limit'}, + [12] = {title = 'Unlicensed Operation of Vehicle', class = 'Infraction', id = 'P.C. 9012', months = 0, fine = 500, color = 'green', description = 'The operation of a motor vehicle without proper licensing'}, + [13] = {title = 'Illegal U-Turn', class = 'Infraction', id = 'P.C. 9013', months = 0, fine = 75, color = 'green', description = 'Performing a u-turn where it is prohibited'}, + [14] = {title = 'Illegal Passing', class = 'Infraction', id = 'P.C. 9014', months = 0, fine = 300, color = 'green', description = 'Passing other motor vehicles in a prohibited manner'}, + [15] = {title = 'Failure to Maintain Lane', class = 'Infraction', id = 'P.C. 9015', months = 0, fine = 300, color = 'green', description = 'Not staying in the correct lane with a motor vehicle'}, + [16] = {title = 'Illegal Turn', class = 'Infraction', id = 'P.C. 9016', months = 0, fine = 150, color = 'green', description = 'Performing a turn where it is prohibited'}, + [17] = {title = 'Failure to Stop', class = 'Infraction', id = 'P.C. 9017', months = 0, fine = 600, color = 'green', description = 'Not stopping for a lawful stop or traffic device'}, + [18] = {title = 'Unauthorized Parking', class = 'Infraction', id = 'P.C. 9018', months = 0, fine = 300, color = 'green', description = 'Parking a vehicle in a location that requires approval with any'}, + [19] = {title = 'Hit and Run', class = 'Misdemeanor', id = 'P.C. 9019', months = 10, fine = 500, color = 'green', description = 'Striking another person or vehicle and fleeing the location'}, + [20] = {title = 'Driving without Headlights or Signals', class = 'Infraction', id = 'P.C. 9020', months = 0, fine = 300, color = 'green', description = 'Operating a vehicle with no functional lights'}, + [21] = {title = 'Street Racing', class = 'Felony', id = 'P.C. 9021', months = 15, fine = 1500, color = 'green', description = 'Operating motorvehicles in a contest'}, + [22] = {title = 'Piloting without Proper Licensing', class = 'Felony', id = 'P.C. 9022', months = 20, fine = 1500, color = 'orange', description = 'Failure to be in possession of valid licensing when operating an aircraft'}, + [23] = {title = 'Unlawful Use of a Motor Vehicle', class = 'Misdemeanor', id = 'P.C. 9023', months = 10, fine = 750, color = 'green', description = 'The use of a motor vehicle without a lawful reason'}, + }, + [10] = { + [1] = {title = 'Hunting in Restricted Areas', class = 'Infraction', id = 'P.C. 10001', months = 0, fine = 450, color = 'green', description = 'Harvesting game in areas where it is prohibited to do so'}, + [2] = {title = 'Unlicensed Hunting', class = 'Infraction', id = 'P.C. 10002', months = 0, fine = 450, color = 'green', description = 'Harvesting game without proper licensing'}, + [3] = {title = 'Animal Cruelty', class = 'Misdemeanor', id = 'P.C. 10003', months = 10, fine = 450, color = 'green', description = 'The act of abusing an animal knowingly or not'}, + [4] = {title = 'Hunting with a Non-Hunting Weapon', class = 'Misdemeanor', id = 'P.C. 10004', months = 10, fine = 750, color = 'green', description = 'To use a weapon not lawfully stated or manufactured to be used for the harvesting of wild game'}, + [5] = {title = 'Hunting outside of hunting hours', class = 'Infraction', id = 'P.C. 10005', months = 0, fine = 750, color = 'green', description = 'Harvesting animals outside of specified time to do so'}, + [6] = {title = 'Overhunting', class = 'Misdemeanor', id = 'P.C. 10006', months = 10, fine = 1000, color = 'green', description = 'Taking more than legally specified amount of game'}, + [7] = {title = 'Poaching', class = 'Felony', id = 'P.C. 10007', months = 20, fine = 1250, color = 'red', description = 'Harvesting an animal that is listed as legally non-harvestable'}, + } +} + +Config.AllowedJobs = {} +for index, value in pairs(Config.PoliceJobs) do + Config.AllowedJobs[index] = value +end +for index, value in pairs(Config.AmbulanceJobs) do + Config.AllowedJobs[index] = value +end +for index, value in pairs(Config.DojJobs) do + Config.AllowedJobs[index] = value +end + +Config.ColorNames = { + [0] = "Metallic Black", + [1] = "Metallic Graphite Black", + [2] = "Metallic Black Steel", + [3] = "Metallic Dark Silver", + [4] = "Metallic Silver", + [5] = "Metallic Blue Silver", + [6] = "Metallic Steel Gray", + [7] = "Metallic Shadow Silver", + [8] = "Metallic Stone Silver", + [9] = "Metallic Midnight Silver", + [10] = "Metallic Gun Metal", + [11] = "Metallic Anthracite Grey", + [12] = "Matte Black", + [13] = "Matte Gray", + [14] = "Matte Light Grey", + [15] = "Util Black", + [16] = "Util Black Poly", + [17] = "Util Dark silver", + [18] = "Util Silver", + [19] = "Util Gun Metal", + [20] = "Util Shadow Silver", + [21] = "Worn Black", + [22] = "Worn Graphite", + [23] = "Worn Silver Grey", + [24] = "Worn Silver", + [25] = "Worn Blue Silver", + [26] = "Worn Shadow Silver", + [27] = "Metallic Red", + [28] = "Metallic Torino Red", + [29] = "Metallic Formula Red", + [30] = "Metallic Blaze Red", + [31] = "Metallic Graceful Red", + [32] = "Metallic Garnet Red", + [33] = "Metallic Desert Red", + [34] = "Metallic Cabernet Red", + [35] = "Metallic Candy Red", + [36] = "Metallic Sunrise Orange", + [37] = "Metallic Classic Gold", + [38] = "Metallic Orange", + [39] = "Matte Red", + [40] = "Matte Dark Red", + [41] = "Matte Orange", + [42] = "Matte Yellow", + [43] = "Util Red", + [44] = "Util Bright Red", + [45] = "Util Garnet Red", + [46] = "Worn Red", + [47] = "Worn Golden Red", + [48] = "Worn Dark Red", + [49] = "Metallic Dark Green", + [50] = "Metallic Racing Green", + [51] = "Metallic Sea Green", + [52] = "Metallic Olive Green", + [53] = "Metallic Green", + [54] = "Metallic Gasoline Blue Green", + [55] = "Matte Lime Green", + [56] = "Util Dark Green", + [57] = "Util Green", + [58] = "Worn Dark Green", + [59] = "Worn Green", + [60] = "Worn Sea Wash", + [61] = "Metallic Midnight Blue", + [62] = "Metallic Dark Blue", + [63] = "Metallic Saxony Blue", + [64] = "Metallic Blue", + [65] = "Metallic Mariner Blue", + [66] = "Metallic Harbor Blue", + [67] = "Metallic Diamond Blue", + [68] = "Metallic Surf Blue", + [69] = "Metallic Nautical Blue", + [70] = "Metallic Bright Blue", + [71] = "Metallic Purple Blue", + [72] = "Metallic Spinnaker Blue", + [73] = "Metallic Ultra Blue", + [74] = "Metallic Bright Blue", + [75] = "Util Dark Blue", + [76] = "Util Midnight Blue", + [77] = "Util Blue", + [78] = "Util Sea Foam Blue", + [79] = "Uil Lightning blue", + [80] = "Util Maui Blue Poly", + [81] = "Util Bright Blue", + [82] = "Matte Dark Blue", + [83] = "Matte Blue", + [84] = "Matte Midnight Blue", + [85] = "Worn Dark blue", + [86] = "Worn Blue", + [87] = "Worn Light blue", + [88] = "Metallic Taxi Yellow", + [89] = "Metallic Race Yellow", + [90] = "Metallic Bronze", + [91] = "Metallic Yellow Bird", + [92] = "Metallic Lime", + [93] = "Metallic Champagne", + [94] = "Metallic Pueblo Beige", + [95] = "Metallic Dark Ivory", + [96] = "Metallic Choco Brown", + [97] = "Metallic Golden Brown", + [98] = "Metallic Light Brown", + [99] = "Metallic Straw Beige", + [100] = "Metallic Moss Brown", + [101] = "Metallic Biston Brown", + [102] = "Metallic Beechwood", + [103] = "Metallic Dark Beechwood", + [104] = "Metallic Choco Orange", + [105] = "Metallic Beach Sand", + [106] = "Metallic Sun Bleeched Sand", + [107] = "Metallic Cream", + [108] = "Util Brown", + [109] = "Util Medium Brown", + [110] = "Util Light Brown", + [111] = "Metallic White", + [112] = "Metallic Frost White", + [113] = "Worn Honey Beige", + [114] = "Worn Brown", + [115] = "Worn Dark Brown", + [116] = "Worn straw beige", + [117] = "Brushed Steel", + [118] = "Brushed Black steel", + [119] = "Brushed Aluminium", + [120] = "Chrome", + [121] = "Worn Off White", + [122] = "Util Off White", + [123] = "Worn Orange", + [124] = "Worn Light Orange", + [125] = "Metallic Securicor Green", + [126] = "Worn Taxi Yellow", + [127] = "police car blue", + [128] = "Matte Green", + [129] = "Matte Brown", + [130] = "Worn Orange", + [131] = "Matte White", + [132] = "Worn White", + [133] = "Worn Olive Army Green", + [134] = "Pure White", + [135] = "Hot Pink", + [136] = "Salmon pink", + [137] = "Metallic Vermillion Pink", + [138] = "Orange", + [139] = "Green", + [140] = "Blue", + [141] = "Mettalic Black Blue", + [142] = "Metallic Black Purple", + [143] = "Metallic Black Red", + [144] = "Hunter Green", + [145] = "Metallic Purple", + [146] = "Metaillic V Dark Blue", + [147] = "MODSHOP BLACK1", + [148] = "Matte Purple", + [149] = "Matte Dark Purple", + [150] = "Metallic Lava Red", + [151] = "Matte Forest Green", + [152] = "Matte Olive Drab", + [153] = "Matte Desert Brown", + [154] = "Matte Desert Tan", + [155] = "Matte Foilage Green", + [156] = "DEFAULT ALLOY COLOR", + [157] = "Epsilon Blue", + [158] = "Unknown", +} + +Config.ColorInformation = { + [0] = "black", + [1] = "black", + [2] = "black", + [3] = "darksilver", + [4] = "silver", + [5] = "bluesilver", + [6] = "silver", + [7] = "darksilver", + [8] = "silver", + [9] = "bluesilver", + [10] = "darksilver", + [11] = "darksilver", + [12] = "matteblack", + [13] = "gray", + [14] = "lightgray", + [15] = "black", + [16] = "black", + [17] = "darksilver", + [18] = "silver", + [19] = "utilgunmetal", + [20] = "silver", + [21] = "black", + [22] = "black", + [23] = "darksilver", + [24] = "silver", + [25] = "bluesilver", + [26] = "darksilver", + [27] = "red", + [28] = "torinored", + [29] = "formulared", + [30] = "blazered", + [31] = "gracefulred", + [32] = "garnetred", + [33] = "desertred", + [34] = "cabernetred", + [35] = "candyred", + [36] = "orange", + [37] = "gold", + [38] = "orange", + [39] = "red", + [40] = "mattedarkred", + [41] = "orange", + [42] = "matteyellow", + [43] = "red", + [44] = "brightred", + [45] = "garnetred", + [46] = "red", + [47] = "red", + [48] = "darkred", + [49] = "darkgreen", + [50] = "racingreen", + [51] = "seagreen", + [52] = "olivegreen", + [53] = "green", + [54] = "gasolinebluegreen", + [55] = "mattelimegreen", + [56] = "darkgreen", + [57] = "green", + [58] = "darkgreen", + [59] = "green", + [60] = "seawash", + [61] = "midnightblue", + [62] = "darkblue", + [63] = "saxonyblue", + [64] = "blue", + [65] = "blue", + [66] = "blue", + [67] = "diamondblue", + [68] = "blue", + [69] = "blue", + [70] = "brightblue", + [71] = "purpleblue", + [72] = "blue", + [73] = "ultrablue", + [74] = "brightblue", + [75] = "darkblue", + [76] = "midnightblue", + [77] = "blue", + [78] = "blue", + [79] = "lightningblue", + [80] = "blue", + [81] = "brightblue", + [82] = "mattedarkblue", + [83] = "matteblue", + [84] = "matteblue", + [85] = "darkblue", + [86] = "blue", + [87] = "lightningblue", + [88] = "yellow", + [89] = "yellow", + [90] = "bronze", + [91] = "yellow", + [92] = "lime", + [93] = "champagne", + [94] = "beige", + [95] = "darkivory", + [96] = "brown", + [97] = "brown", + [98] = "lightbrown", + [99] = "beige", + [100] = "brown", + [101] = "brown", + [102] = "beechwood", + [103] = "beechwood", + [104] = "chocoorange", + [105] = "yellow", + [106] = "yellow", + [107] = "cream", + [108] = "brown", + [109] = "brown", + [110] = "brown", + [111] = "white", + [112] = "white", + [113] = "beige", + [114] = "brown", + [115] = "brown", + [116] = "beige", + [117] = "steel", + [118] = "blacksteel", + [119] = "aluminium", + [120] = "chrome", + [121] = "wornwhite", + [122] = "offwhite", + [123] = "orange", + [124] = "lightorange", + [125] = "green", + [126] = "yellow", + [127] = "blue", + [128] = "green", + [129] = "brown", + [130] = "orange", + [131] = "white", + [132] = "white", + [133] = "darkgreen", + [134] = "white", + [135] = "pink", + [136] = "pink", + [137] = "pink", + [138] = "orange", + [139] = "green", + [140] = "blue", + [141] = "blackblue", + [142] = "blackpurple", + [143] = "blackred", + [144] = "darkgreen", + [145] = "purple", + [146] = "darkblue", + [147] = "black", + [148] = "purple", + [149] = "darkpurple", + [150] = "red", + [151] = "darkgreen", + [152] = "olivedrab", + [153] = "brown", + [154] = "tan", + [155] = "green", + [156] = "silver", + [157] = "blue", + [158] = "black", +} + +Config.ClassList = { + [0] = "Compact", + [1] = "Sedan", + [2] = "SUV", + [3] = "Coupe", + [4] = "Muscle", + [5] = "Sport Classic", + [6] = "Sport", + [7] = "Super", + [8] = "Motorbike", + [9] = "Off-Road", + [10] = "Industrial", + [11] = "Utility", + [12] = "Van", + [13] = "Bike", + [14] = "Boat", + [15] = "Helicopter", + [16] = "Plane", + [17] = "Service", + [18] = "Emergency", + [19] = "Military", + [20] = "Commercial", + [21] = "Train" +} + +function GetJobType(job) + if Config.PoliceJobs[job] then + return 'police' + elseif Config.AmbulanceJobs[job] then + return 'ambulance' + elseif Config.DojJobs[job] then + return 'doj' + else + return nil + end +end diff --git a/mdt.sql b/sql/qbcore.sql similarity index 76% rename from mdt.sql rename to sql/qbcore.sql index 03bb0ae9..a9a43dc6 100644 --- a/mdt.sql +++ b/sql/qbcore.sql @@ -1,111 +1,136 @@ -CREATE TABLE IF NOT EXISTS `mdt_data` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `cid` VARCHAR(20) DEFAULT NULL, - `information` MEDIUMTEXT DEFAULT NULL, - `tags` TEXT NOT NULL, - `gallery` TEXT NOT NULL, - `jobtype` VARCHAR(25) DEFAULT 'police', - `pfp` TEXT DEFAULT NULL, - `fingerprint` VARCHAR(50) DEFAULT NULL, - PRIMARY KEY (`cid`), - KEY `id` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - -CREATE TABLE IF NOT EXISTS `mdt_bulletin` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `title` TEXT NOT NULL, - `desc` TEXT NOT NULL, - `author` varchar(50) NOT NULL, - `time` varchar(20) NOT NULL, - `jobtype` VARCHAR(25) DEFAULT 'police', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - -CREATE TABLE IF NOT EXISTS `mdt_reports` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `author` varchar(50) DEFAULT NULL, - `title` varchar(255) DEFAULT NULL, - `type` varchar(50) DEFAULT NULL, - `details` text DEFAULT NULL, - `tags` text DEFAULT NULL, - `officersinvolved` text DEFAULT NULL, - `civsinvolved` text DEFAULT NULL, - `gallery` text DEFAULT NULL, - `time` varchar(20) DEFAULT NULL, - `jobtype` varchar(25) DEFAULT 'police', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - -CREATE TABLE IF NOT EXISTS `mdt_bolos` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `author` varchar(50) DEFAULT NULL, - `title` varchar(50) DEFAULT NULL, - `plate` varchar(50) DEFAULT NULL, - `owner` varchar(50) DEFAULT NULL, - `individual` varchar(50) DEFAULT NULL, - `detail` text DEFAULT NULL, - `tags` text DEFAULT NULL, - `gallery` text DEFAULT NULL, - `officersinvolved` text DEFAULT NULL, - `time` varchar(20) DEFAULT NULL, - `jobtype` varchar(25) NOT NULL DEFAULT 'police', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - -CREATE TABLE IF NOT EXISTS `mdt_convictions` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `cid` varchar(50) DEFAULT NULL, - `linkedincident` int(11) NOT NULL DEFAULT 0, - `warrant` varchar(50) DEFAULT NULL, - `guilty` varchar(50) DEFAULT NULL, - `processed` varchar(50) DEFAULT NULL, - `associated` varchar(50) DEFAULT '0', - `charges` text DEFAULT NULL, - `fine` int(11) DEFAULT 0, - `sentence` int(11) DEFAULT 0, - `recfine` int(11) DEFAULT 0, - `recsentence` int(11) DEFAULT 0, - `time` varchar(20) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - -CREATE TABLE IF NOT EXISTS `mdt_incidents` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `author` varchar(50) NOT NULL DEFAULT '', - `title` varchar(50) NOT NULL DEFAULT '0', - `details` text NOT NULL, - `tags` text NOT NULL, - `officersinvolved` text NOT NULL, - `civsinvolved` text NOT NULL, - `evidence` text NOT NULL, - `time` varchar(20) DEFAULT NULL, - `jobtype` varchar(25) NOT NULL DEFAULT 'police', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - -CREATE TABLE IF NOT EXISTS `mdt_logs` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `text` text NOT NULL, - `time` varchar(20) DEFAULT NULL, - `jobtype` varchar(25) DEFAULT 'police', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - -CREATE TABLE IF NOT EXISTS `mdt_vehicleinfo` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `plate` varchar(50) DEFAULT NULL, - `information` text NOT NULL DEFAULT '', - `stolen` tinyint(1) NOT NULL DEFAULT 0, - `code5` tinyint(1) NOT NULL DEFAULT 0, - `image` text NOT NULL DEFAULT '', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; - -CREATE TABLE IF NOT EXISTS `mdt_impound` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `vehicleid` int(11) NOT NULL, - `linkedreport` int(11) NOT NULL, - `fee` int(11) DEFAULT NULL, - `time` varchar(255) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; \ No newline at end of file +CREATE TABLE IF NOT EXISTS `mdt_data` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `cid` VARCHAR(20) DEFAULT NULL, + `information` MEDIUMTEXT DEFAULT NULL, + `tags` TEXT NOT NULL, + `gallery` TEXT NOT NULL, + `jobtype` VARCHAR(25) DEFAULT 'police', + `pfp` TEXT DEFAULT NULL, + `fingerprint` VARCHAR(50) DEFAULT NULL, + PRIMARY KEY (`cid`), + KEY `id` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE IF NOT EXISTS `mdt_bulletin` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` TEXT NOT NULL, + `desc` TEXT NOT NULL, + `author` varchar(50) NOT NULL, + `time` varchar(20) NOT NULL, + `jobtype` VARCHAR(25) DEFAULT 'police', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE IF NOT EXISTS `mdt_reports` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `author` varchar(50) DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + `type` varchar(50) DEFAULT NULL, + `details` LONGTEXT DEFAULT NULL, + `tags` text DEFAULT NULL, + `officersinvolved` text DEFAULT NULL, + `civsinvolved` text DEFAULT NULL, + `gallery` text DEFAULT NULL, + `time` varchar(20) DEFAULT NULL, + `jobtype` varchar(25) DEFAULT 'police', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE IF NOT EXISTS `mdt_bolos` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `author` varchar(50) DEFAULT NULL, + `title` varchar(50) DEFAULT NULL, + `plate` varchar(50) DEFAULT NULL, + `owner` varchar(50) DEFAULT NULL, + `individual` varchar(50) DEFAULT NULL, + `detail` text DEFAULT NULL, + `tags` text DEFAULT NULL, + `gallery` text DEFAULT NULL, + `officersinvolved` text DEFAULT NULL, + `time` varchar(20) DEFAULT NULL, + `jobtype` varchar(25) NOT NULL DEFAULT 'police', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE IF NOT EXISTS `mdt_convictions` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `cid` varchar(50) DEFAULT NULL, + `linkedincident` int(11) NOT NULL DEFAULT 0, + `warrant` varchar(50) DEFAULT NULL, + `guilty` varchar(50) DEFAULT NULL, + `processed` varchar(50) DEFAULT NULL, + `associated` varchar(50) DEFAULT '0', + `charges` text DEFAULT NULL, + `fine` int(11) DEFAULT 0, + `sentence` int(11) DEFAULT 0, + `recfine` int(11) DEFAULT 0, + `recsentence` int(11) DEFAULT 0, + `time` varchar(20) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE IF NOT EXISTS `mdt_incidents` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `author` varchar(50) NOT NULL DEFAULT '', + `title` varchar(50) NOT NULL DEFAULT '0', + `details` LONGTEXT NOT NULL, + `tags` text NOT NULL, + `officersinvolved` text NOT NULL, + `civsinvolved` text NOT NULL, + `evidence` text NOT NULL, + `time` varchar(20) DEFAULT NULL, + `jobtype` varchar(25) NOT NULL DEFAULT 'police', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE IF NOT EXISTS `mdt_logs` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `text` text NOT NULL, + `time` varchar(20) DEFAULT NULL, + `jobtype` varchar(25) DEFAULT 'police', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE IF NOT EXISTS `mdt_vehicleinfo` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `plate` varchar(50) DEFAULT NULL, + `information` text NOT NULL DEFAULT '', + `stolen` tinyint(1) NOT NULL DEFAULT 0, + `code5` tinyint(1) NOT NULL DEFAULT 0, + `image` text NOT NULL DEFAULT '', + `points` int(11) DEFAULT 0, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE IF NOT EXISTS `mdt_weaponinfo` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `serial` varchar(50) DEFAULT NULL, + `owner` varchar(50) DEFAULT NULL, + `information` text NOT NULL DEFAULT '', + `weapClass` varchar(50) DEFAULT NULL, + `weapModel` varchar(50) DEFAULT NULL, + `image` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `serial` (`serial`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE IF NOT EXISTS `mdt_impound` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `vehicleid` int(11) NOT NULL, + `linkedreport` int(11) NOT NULL, + `fee` int(11) DEFAULT NULL, + `time` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +CREATE TABLE IF NOT EXISTS `mdt_clocking` ( + `id` int(10) NOT NULL AUTO_INCREMENT, + `user_id` varchar(50) NOT NULL DEFAULT '', + `firstname` varchar(255) NOT NULL DEFAULT '', + `lastname` varchar(255) NOT NULL DEFAULT '', + `clock_in_time` varchar(255) NOT NULL DEFAULT '', + `clock_out_time` varchar(50) DEFAULT NULL, + `total_time` int(10) NOT NULL DEFAULT '0', + PRIMARY KEY (`user_id`) USING BTREE, + KEY `id` (`id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; diff --git a/sql/qbox.sql b/sql/qbox.sql new file mode 100644 index 00000000..662ce44b --- /dev/null +++ b/sql/qbox.sql @@ -0,0 +1,136 @@ +CREATE TABLE IF NOT EXISTS `mdt_data` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `cid` VARCHAR(20) DEFAULT NULL, + `information` MEDIUMTEXT DEFAULT NULL, + `tags` TEXT NOT NULL, + `gallery` TEXT NOT NULL, + `jobtype` VARCHAR(25) DEFAULT 'police', + `pfp` TEXT DEFAULT NULL, + `fingerprint` VARCHAR(50) DEFAULT NULL, + PRIMARY KEY (`cid`), + KEY `id` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `mdt_bulletin` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` TEXT NOT NULL, + `desc` TEXT NOT NULL, + `author` varchar(50) NOT NULL, + `time` varchar(20) NOT NULL, + `jobtype` VARCHAR(25) DEFAULT 'police', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `mdt_reports` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `author` varchar(50) DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + `type` varchar(50) DEFAULT NULL, + `details` LONGTEXT DEFAULT NULL, + `tags` text DEFAULT NULL, + `officersinvolved` text DEFAULT NULL, + `civsinvolved` text DEFAULT NULL, + `gallery` text DEFAULT NULL, + `time` varchar(20) DEFAULT NULL, + `jobtype` varchar(25) DEFAULT 'police', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `mdt_bolos` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `author` varchar(50) DEFAULT NULL, + `title` varchar(50) DEFAULT NULL, + `plate` varchar(50) DEFAULT NULL, + `owner` varchar(50) DEFAULT NULL, + `individual` varchar(50) DEFAULT NULL, + `detail` text DEFAULT NULL, + `tags` text DEFAULT NULL, + `gallery` text DEFAULT NULL, + `officersinvolved` text DEFAULT NULL, + `time` varchar(20) DEFAULT NULL, + `jobtype` varchar(25) NOT NULL DEFAULT 'police', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `mdt_convictions` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `cid` varchar(50) DEFAULT NULL, + `linkedincident` int(11) NOT NULL DEFAULT 0, + `warrant` varchar(50) DEFAULT NULL, + `guilty` varchar(50) DEFAULT NULL, + `processed` varchar(50) DEFAULT NULL, + `associated` varchar(50) DEFAULT '0', + `charges` text DEFAULT NULL, + `fine` int(11) DEFAULT 0, + `sentence` int(11) DEFAULT 0, + `recfine` int(11) DEFAULT 0, + `recsentence` int(11) DEFAULT 0, + `time` varchar(20) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `mdt_incidents` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `author` varchar(50) NOT NULL DEFAULT '', + `title` varchar(50) NOT NULL DEFAULT '0', + `details` LONGTEXT NOT NULL, + `tags` text NOT NULL, + `officersinvolved` text NOT NULL, + `civsinvolved` text NOT NULL, + `evidence` text NOT NULL, + `time` varchar(20) DEFAULT NULL, + `jobtype` varchar(25) NOT NULL DEFAULT 'police', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `mdt_logs` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `text` text NOT NULL, + `time` varchar(20) DEFAULT NULL, + `jobtype` varchar(25) DEFAULT 'police', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `mdt_vehicleinfo` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `plate` varchar(50) DEFAULT NULL, + `information` text NOT NULL DEFAULT '', + `stolen` tinyint(1) NOT NULL DEFAULT 0, + `code5` tinyint(1) NOT NULL DEFAULT 0, + `image` text NOT NULL DEFAULT '', + `points` int(11) DEFAULT 0, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `mdt_weaponinfo` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `serial` varchar(50) DEFAULT NULL, + `owner` varchar(50) DEFAULT NULL, + `information` text NOT NULL DEFAULT '', + `weapClass` varchar(50) DEFAULT NULL, + `weapModel` varchar(50) DEFAULT NULL, + `image` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `serial` (`serial`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `mdt_impound` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `vehicleid` int(11) NOT NULL, + `linkedreport` int(11) NOT NULL, + `fee` int(11) DEFAULT NULL, + `time` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +CREATE TABLE IF NOT EXISTS `mdt_clocking` ( + `id` int(10) NOT NULL AUTO_INCREMENT, + `user_id` varchar(50) NOT NULL DEFAULT '', + `firstname` varchar(255) NOT NULL DEFAULT '', + `lastname` varchar(255) NOT NULL DEFAULT '', + `clock_in_time` varchar(255) NOT NULL DEFAULT '', + `clock_out_time` varchar(50) DEFAULT NULL, + `total_time` int(10) NOT NULL DEFAULT '0', + PRIMARY KEY (`user_id`) USING BTREE, + KEY `id` (`id`) USING BTREE +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; diff --git a/ui/app.js b/ui/app.js index 391c3972..29978f48 100644 --- a/ui/app.js +++ b/ui/app.js @@ -1,5076 +1,5893 @@ -let canSearchForProfiles = true; -let canSaveProfile = true; -let canRefreshBolo = true; -let canRefreshReports = true; -let canRefreshIncidents = true; -let canInputTag = true; -let canInputBoloTag = true; -let canInputBoloOfficerTag = true; -let canSearchReports = true; -let canCreateBulletin = 0; -let mouse_is_inside = false; -let currentTab = ".dashboard-page-container"; -let MyName = ""; -let canInputReportTag = true; -let canInputReportOfficerTag = true; -let canInputReportCivilianTag = true; -let canSearchForVehicles = true; -let canSearchForReports = true; -let canSaveVehicle = true; -var LastName = ""; -var DispatchNum = 0; -var playerJob = ""; -let rosterLink = ""; - -let impoundChanged = false; - -// TEMP CONFIG OF JOBS -const PoliceJobs = { - ['police']: true, -} - -const AmbulanceJobs = { - ['ambulance']: true, -} - -const DojJobs = { - ['lawyer']: true -} - -const MONTH_NAMES = [ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December", -]; - -function getFormattedDate(date, prefomattedDate = false, hideYear = false) { - const day = date.getDate(); - const month = MONTH_NAMES[date.getMonth()]; - const year = date.getFullYear(); - const hours = date.getHours(); - let minutes = date.getMinutes(); - - if (minutes < 10) { - minutes = `0${minutes}`; - } - - if (prefomattedDate) { - return `${prefomattedDate} at ${hours}:${minutes}`; - } - - if (hideYear) { - return `${day}. ${month} at ${hours}:${minutes}`; - } - - return `${day}. ${month} ${year}. at ${hours}:${minutes}`; -} - -var quotes = [ - 'Project Sloth On Top!', - 'A Discord rewrite fixes everything.', - 'Does anyone even read these?', -] - -function randomizeQuote() { - return randomQuote = quotes[Math.floor(Math.random() * quotes.length)]; -} - -function timeAgo(dateParam) { - if (!dateParam) { - return null; - } - - const date = - typeof dateParam === "object" ? dateParam : new Date(dateParam); - const DAY_IN_MS = 86400000; - const today = new Date(); - const yesterday = new Date(today - DAY_IN_MS); - const seconds = Math.round((today - date) / 1000); - const minutes = Math.round(seconds / 60); - const isToday = today.toDateString() === date.toDateString(); - const isYesterday = yesterday.toDateString() === date.toDateString(); - const isThisYear = today.getFullYear() === date.getFullYear(); - - if (seconds < 5) { - return "Just Now"; - } else if (seconds < 60) { - return `${seconds} Seconds ago`; - } else if (seconds < 90) { - return "About a minute ago"; - } else if (minutes < 60) { - return `${minutes} Minutes ago`; - } else if (isToday) { - return getFormattedDate(date, "Today"); - } else if (isYesterday) { - return getFormattedDate(date, "Yesterday"); - } else if (isThisYear) { - return getFormattedDate(date, false, true); - } - - return getFormattedDate(date); -} - -$(document).ready(() => { - $(".header").hover( - function () { - $(".close-all").css("opacity", "0.5"); - }, - function () { - $(".close-all").css("opacity", "1"); - } - ); - $(".incidents-charges-title-container").hover( - function () { - $(".incidents-charges-table-container").css("opacity", "0.1"); - $(".close-all").css("filter", "none"); - }, - function () { - $(".close-all").css("filter", "brightness(30%)"); - $(".incidents-charges-table-container").css("opacity", "1"); - } - ); - $(".nav-item").click(function () { - if ($(this).hasClass("active-nav") == false) { - fidgetSpinner($(this).data("page")); - currentTab = $(this).data("page"); - } - }); - - $(".profile-items").on("click", ".profile-item", async function () { - let id = $(this).data("id"); - let result = await $.post( - `https://${GetParentResourceName()}/getProfileData`, - JSON.stringify({ - id: id, - }) - ); - - if (!canInputTag) { - if ($(".tags-add-btn").hasClass("fa-minus")) { - $(".tags-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - $(".tag-input").remove(); - canInputTag = true; - } - - if ($(".gallery-upload-input").css("display") == "block") { - $(".gallery-upload-input").slideUp(250); - setTimeout(() => { - $(".gallery-upload-input").css("display", "none"); - }, 250); - } - - if ($(".gallery-add-btn").hasClass("fa-minus")) { - $(".gallery-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - - $(".manage-profile-editing-title").html(`You are currently editing ${result["firstname"]} ${result["lastname"]}`); - $(".manage-profile-citizenid-input").val(result['cid']); - $(".manage-profile-name-input-1").val(result["firstname"]); - $(".manage-profile-name-input-2").val(result["lastname"]); - $(".manage-profile-dob-input").val(result["dob"]); - $(".manage-profile-job-input").val(`${result.job}, ${result.grade}`); - $(".manage-profile-url-input").val(result["profilepic"] ?? ""); - $(".manage-profile-info").val(result["mdtinfo"]); - $(".manage-profile-info").removeAttr("disabled"); - $(".manage-profile-fingerprint").val(result["fingerprint"]); - $(".manage-profile-fingerprint").removeAttr("disabled"); - $(".manage-profile-pic").attr("src", result["profilepic"] ?? "img/male.png"); - - const { vehicles, tags, gallery, convictions, properties } = result - - $(".licenses-holder").empty(); - $(".tags-holder").empty(); - $(".vehs-holder").empty(); - $(".gallery-inner-container").empty(); - $(".convictions-holder").empty(); - - let licencesHTML = '
No Licenses
'; - let tagsHTML = '
No Tags
'; - let convHTML = '
Clean Record ?
'; - let vehHTML = '
No Vehicles
'; - let galleryHTML = '
No Photos
'; - let propertyHTML = '
No Properties
'; - - // convert key value pair object of licenses to array - let licenses = Object.entries(result.licences); - - if (licenses.length == 0 || licenses.length == undefined) { - var licenseTypes = ['business', 'pilot', 'weapon', 'driver']; - licenses = Object.entries(licenseTypes.reduce((licenseType, licenseValue) => (licenseType[licenseValue] = false, licenseType), {})); - } - - if (licenses.length > 0 && (PoliceJobs[playerJob] !== undefined || DojJobs[playerJob] !== undefined)) { - licencesHTML = ''; - for (const [lic, hasLic] of licenses) { - - let tagColour = hasLic == true ? "green-tag" : "red-tag"; - licencesHTML += `${titleCase(lic)}`; - } - if (vehicles && vehicles.length > 0) { - - vehHTML = ''; - vehicles.forEach(value => { - vehHTML += `
${value.plate} - ${value.model}
` - }) - } - if (convictions && convictions.length > 0) { - convHTML = ''; - convictions.forEach(value => { - convHTML += `
${value}
`; - }) - } - if (properties && properties.length > 0) { - propertyHTML = ''; - properties.forEach(value => { - propertyHTML += `
${value.label}
`; - }) - } - } - if (tags && tags.length > 0) { - tagsHTML = ''; - tags.forEach((tag) => { - tagsHTML += `
${tag}
`; - }) - } - - if (gallery && gallery.length > 0) { - galleryHTML = ''; - gallery.forEach(value => { - galleryHTML += ``; - }) - } - - if (result.isLimited) { - $(".manage-profile-vehs-container").fadeOut(250); - $(".manage-profile-houses-container").fadeOut(250); - $(".manage-profile-houses-container").fadeOut(250); - } else { - $(".manage-profile-vehs-container").fadeIn(250); - $(".manage-profile-houses-container").fadeIn(250); - $(".manage-profile-houses-container").fadeIn(250); - } - - $(".licenses-holder").html(licencesHTML); - $(".tags-holder").html(tagsHTML); - $(".convictions-holder").html(convHTML); - $(".vehs-holder").html(vehHTML); - $(".gallery-inner-container").html(galleryHTML); - $(".houses-holder").html(propertyHTML); - }); - //
ID: ${BulletinId}
- - $(".bulletin-add-btn").click(function () { - if (canCreateBulletin == 0) { - $(this).removeClass("fa-plus").addClass("fa-minus"); - let BulletinId = Number($(".bulletin-item").first().data("id")) + 1; - if (Number.isNaN(BulletinId)) { - BulletinId = 1; - } - canCreateBulletin = BulletinId; - $(".bulletin-items-continer") - .prepend(`
- - -
-
${MyName} - Just Now
-
-
`); - } else { - $(this).removeClass("fa-minus").addClass("fa-plus"); - $(".bulletin-items-continer") - .find("[data-id='" + canCreateBulletin + "']") - .remove(); - canCreateBulletin = 0; - } - }); - //
ID: ${canCreateBulletin}
- $(".bulletin-items-continer").on("keydown", ".bulletin-item", function (e) { - if (e.keyCode === 13) { - $(".bulletin-add-btn").removeClass("fa-minus").addClass("fa-plus"); - let id = $(this).find(".bulletin-id").text(); - let date = $(this).find(".bulletin-date").text(); - let title = $(this).find(".bulletin-item-title").text(); - let info = $(this).find(".bulletin-item-info").text(); - let time = new Date(); - $.post( - `https://${GetParentResourceName()}/newBulletin`, - JSON.stringify({ - title: title, - info: info, - time: time.getTime(), - }) - ); - $(".bulletin-items-continer") - .find("[data-id='" + canCreateBulletin + "']") - .remove(); - $(".bulletin-items-continer") - .prepend(`
-
${title}
-
${info}
-
- -
${MyName} - ${timeAgo( - Number(time.getTime()) - )}
-
-
`); - canCreateBulletin = 0; - } - }); - $(".bulletin-items-continer").on( - "contextmenu", - ".bulletin-item", - function (e) { - let args = [ - { - className: "remove-bulletin", - icon: "fas fa-times", - text: "Remove Item", - info: $(this).data("id"), - status: $(this).data("title"), - }, - ]; - openContextMenu(e, args); - } - ); - $(".contextmenu").on("click", ".remove-bulletin", function () { - let id = $(this).data("info"); - let title = $(this).data("status") - $(".bulletin-items-continer") - .find("[data-id='" + id + "']") - .remove(); - $.post( - `https://${GetParentResourceName()}/deleteBulletin`, - JSON.stringify({ - id: id, - title: title - }) - ); - if (canCreateBulletin == id) { - canCreateBulletin = 0; - } - if ($(".bulletin-add-btn").hasClass("fa-minus")) { - $(".bulletin-add-btn").removeClass("fa-minus").addClass("fa-plus"); - } - }); - $(".associated-incidents-tags-add-btn").on("click", "", function () { - document.addEventListener("mouseup", onMouseDownIcidents); - $(".icidents-person-search-container").fadeIn(250); - $(".close-all").css("filter", "brightness(15%)"); - }); - $(".gallery-add-btn").click(function () { - if ($(".manage-profile-citizenid-input").val()) { - if ($(".gallery-upload-input").css("display") == "none") { - $(".gallery-upload-input").slideDown(250); - $(".gallery-upload-input").css("display", "block"); - $(this).removeClass("fa-plus").addClass("fa-minus"); - } else { - $(".gallery-upload-input").slideUp(250); - setTimeout(() => { - $(".gallery-upload-input").css("display", "none"); - }, 250); - $(this).removeClass("fa-minus").addClass("fa-plus"); - } - } else { - $(this).effect("shake", { times: 2, distance: 2 }, 500); - } - }); - $("#gallery-upload-input").keydown(function (e) { - if (e.keyCode === 13) { - let URL = $("#gallery-upload-input").val(); - let cid = $(".manage-profile-citizenid-input").val(); - if (URL !== "") { - let randomNum = Math.ceil(Math.random() * 10).toString(); - $(".gallery-inner-container").prepend( - `` - ); - $("#gallery-upload-input").val(""); - $(".gallery-upload-input").slideUp(250); - setTimeout(() => { - $(".gallery-upload-input").css("display", "none"); - }, 250); - $(".gallery-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - } - }); - $(".manage-profile-save").click(function () { - if (canSaveProfile == true) { - canSaveProfile = false; - $(".manage-profile-save").empty(); - $(".manage-profile-save").prepend( - `` - ); - setTimeout(() => { - $(".manage-profile-save").empty(); - $(".manage-profile-save").html("Save"); - canSaveProfile = true; - }, 750); - - setTimeout(() => { - let tags = new Array(); - let gallery = new Array(); - let licenses = {}; - - $(".tags-holder") - .find("div") - .each(function () { - if ($(this).text() != "" && $(this).text() != "No Tags") { - tags.push($(this).text()); - } - }); - - $(".gallery-inner-container") - .find("img") - .each(function () { - if ($(this).attr("src") != "") { - gallery.push($(this).attr("src")); - } - }); - - let pfp = $(".manage-profile-pic").attr("src"); - let newpfp = $(".manage-profile-url-input").val(); - if (newpfp.includes("base64")) { - newpfp = "img/not-found.webp"; - } else { - pfp = newpfp; - } - let description = $(".manage-profile-info").val(); - let fingerprint = $(".manage-profile-fingerprint").val(); - let id = $(".manage-profile-citizenid-input").val(); - - $(".licenses-holder") - .find("span") - .each(function(){ - let type = $(this).data("type") - if ($(this).attr('class').includes('green-tag')){ - licenses[type] = true; - } - else{ - licenses[type] = false; - } - }) - - const fName = $(".manage-profile-name-input-1").val(); - const sName = $(".manage-profile-name-input-2").val(); - - $.post( - `https://${GetParentResourceName()}/saveProfile`, - JSON.stringify({ - pfp: pfp, - description: description, - id: id, - fName: fName, - sName: sName, - tags: tags, - gallery: gallery, - fingerprint: fingerprint, - licenses: licenses - }) - ); - $(".manage-profile-pic").attr("src", newpfp); - }, 250); - } - }); - $(".manage-incidents-title-holder").on( - "click", - ".manage-incidents-save", - function () { - if (canSaveProfile == true) { - canSaveProfile = false; - $(".manage-incidents-save").empty(); - $(".manage-incidents-save").prepend( - `` - ); - setTimeout(() => { - $(".manage-incidents-save").empty(); - $(".manage-incidents-save").prepend( - `` - ); - canSaveProfile = true; - }, 750); - - // Title, information, tags, officers involved, civs involved, evidence - const title = $("#manage-incidents-title-input").val(); - const information = $( - ".manage-incidents-reports-content" - ).val(); - const dbid = $(".manage-incidents-editing-title").data("id"); - - let tags = new Array(); - let officers = new Array(); - let civilians = new Array(); - let evidence = new Array(); - - $(".manage-incidents-tags-holder") - .find("div") - .each(function () { - if ($(this).text() != "") { - tags.push($(this).text()); - } - }); - - $(".manage-incidents-officers-holder") - .find("div") - .each(function () { - if ($(this).text() != "") { - officers.push($(this).text()); - } - }); - - $(".manage-incidents-civilians-holder") - .find("div") - .each(function () { - if ($(this).text() != "") { - civilians.push($(this).text()); - } - }); - - $(".manage-incidents-evidence-holder") - .find("img") - .each(function () { - if ($(this).attr("src") != "") { - evidence.push($(this).attr("src")); - } - }); - - let time = new Date(); - - let associated = new Array(); - - $(".associated-incidents-user-container").each(function ( - index - ) { - var cid = $(this).data("id"); - var guilty = false; - var warrant = false; - var processed = false; - var isassociated = false; - var charges = new Array(); - - $(".associated-incidents-user-tags-holder") - .children("div") - .each(function (index) { - if ($(this).data("id") == cid) { - if ($(this).hasClass("green-tag")) { - if ($(this).text() == "Guilty") { - guilty = true; - } - if ($(this).text() == "Warrant") { - warrant = true; - } - if ($(this).text() == "Processed") { - processed = true; - } - if ($(this).text() == "Associated") { - isassociated = true; - } - } - } - }); - - $(".associated-incidents-user-holder") - .children("div") - .each(function (index) { - if ( - ( $(".associated-incidents-user-holder") - .children() - .eq(index) - .data("id") == cid ) - ) { - charges.push( - $(".associated-incidents-user-holder") - .children() - .eq(index) - .html() - ); - } - }); - - associated.push({ - Cid: $(this).data("id"), - Warrant: warrant, - Guilty: guilty, - Processed: processed, - Isassociated: isassociated, - Charges: charges, - Fine: $(".fine-amount") - .filter("[data-id='" + $(this).data("id") + "']") - .val(), - Sentence: $(".sentence-amount") - .filter("[data-id='" + $(this).data("id") + "']") - .val(), - recfine: $(".fine-recommended-amount") - .filter("[data-id='" + $(this).data("id") + "']") - .val(), - recsentence: $(".sentence-recommended-amount") - .filter("[data-id='" + $(this).data("id") + "']") - .val(), - }); - }); - - $.post( - `https://${GetParentResourceName()}/saveIncident`, - JSON.stringify({ - ID: dbid, - title: title, - information: information, - tags: tags, - officers: officers, - civilians: civilians, - evidence: evidence, - associated: associated, - time: time.getTime(), - }) - ); - - setTimeout(() => { - if (canRefreshIncidents == true) { - canRefreshIncidents = false; - $(".incidents-search-refresh").empty(); - $(".incidents-search-refresh").prepend( - `` - ); - setTimeout(() => { - $(".incidents-search-refresh").empty(); - $(".incidents-search-refresh").html("Refresh"); - canRefreshIncidents = true; - $.post( - `https://${GetParentResourceName()}/getAllIncidents`, - JSON.stringify({}) - ); - }, 1500); - } - }, 1000); - } - } - ); - $(".manage-incidents-title-holder").on( - "click", - ".manage-incidents-create", - function () { - let tempalte = - "📝 Summary:\n\n[Insert Report Summary Here]\n\n🧍 Hostage: [Name Here]\n\n🔪 Weapons/Items Confiscated:\n\n· [Insert List Here]\n\n-----\n💸 Fine:\n⌚ Sentence:\n-----"; - $("#manage-incidents-title-input").val( - "Name - Charge - " + $(".date").html() - ); - $(".manage-incidents-reports-content").val(tempalte); - - $(".manage-incidents-tags-holder").empty(); - $(".manage-incidents-officers-holder").empty(); - $(".manage-incidents-civilians-holder").empty(); - $(".manage-incidents-evidence-holder").empty(); - $(".manage-incidents-title-holder").empty(); - $(".manage-incidents-title-holder").prepend( - ` -
Manage Incident
-
-
- ` - ); - $(".manage-incidents-title").css("width", "66%"); - $(".manage-incidents-create").css("margin-right", "0px"); - - $(".incidents-ghost-holder").html(""); - $(".associated-incidents-tags-holder").html(""); - - $(".manage-incidents-editing-title").html( - "You are currently creating a new Incident" - ); - $(".manage-incidents-editing-title").data("id", 0); - - $(".manage-incidents-tags-add-btn").css("pointer-events", "auto"); - $(".manage-incidents-reports-content").css( - "pointer-events", - "auto" - ); - $(".manage-incidents-officers-add-btn").css( - "pointer-events", - "auto" - ); - $(".manage-incidents-civilians-add-btn").css( - "pointer-events", - "auto" - ); - $(".manage-incidents-evidence-add-btn").css( - "pointer-events", - "auto" - ); - $(".associated-incidents-tags-add-btn").css( - "pointer-events", - "auto" - ); - } - ); - $(".tags-add-btn").click(function () { - if ($(".manage-profile-citizenid-input").val()) { - if (canInputTag) { - $(this).removeClass("fa-plus").addClass("fa-minus"); - $(".tags-holder").prepend( - `` - ); - canInputTag = false; - } else if (!canInputTag) { - $(this).removeClass("fa-minus").addClass("fa-plus"); - $(".tag-input").remove(); - canInputTag = true; - } - } else { - $(this).effect("shake", { times: 2, distance: 2 }, 500); - } - }); - - $(".tags-holder").on("keydown", ".tag-input", function (e) { - if (e.keyCode === 13) { - addTag($(".tag-input").text()); - if ($(".tags-add-btn").hasClass("fa-minus")) { - $(".tags-add-btn").removeClass("fa-minus").addClass("fa-plus"); - } - $(".tag-input").remove(); - } - }); - $(".contextmenu").on("click", ".search-vehicle", function () { - let plate = $(this).data("info"); - fidgetSpinner(".dmv-page-container"); - currentTab = ".dmv-page-container"; - setTimeout(() => { - $(".dmv-search-input").slideDown(250); - $(".dmv-search-input").css("display", "block"); - setTimeout(() => { - $("#dmv-search-input:text").val(plate.toString()); - setTimeout(() => { - var e = jQuery.Event("keydown"); - e.which = 13; // # Some key code value - e.keyCode = 13 - $("#dmv-search-input").trigger(e); - }, 250); - }, 250); - }, 250); - }); - $(".vehs-holder").on("contextmenu", ".veh-tag", function (e) { - let args = [ - { - className: "search-vehicle", - icon: "fas fa-car", - text: "Search Vehicle", - info: $(this).data("plate"), - status: "", - }, - ]; - openContextMenu(e, args); - }); - - $(".contextmenu").on("click", ".make-waypoint", function () { - let coord = $(this).data("info").split("===") - setTimeout(() => { - $.post( - `https://${GetParentResourceName()}/SetHouseLocation`, - JSON.stringify({ - coord: coord, - }) - ); - }, 250); - }); - $(".houses-holder").on("contextmenu", ".white-tag", function (e) { - let args = [ - { - className: "make-waypoint", - icon: "fas fa-map-pin", - text: "Make Waypoint", - info: $(this).data("location"), - status: "", - }, - ]; - openContextMenu(e, args); - }); - $(".gallery-inner-container").on("click", ".gallery-img", function () { - if ($(this).css("filter") == "none") { - $(this).css("filter", "blur(5px)"); - } else { - $(this).css("filter", "none"); - } - }); - $(".contextmenu").on("click", ".expand-image", function () { - expandImage($(this).data("info")); - }); - $(".contextmenu").on("click", ".remove-image", function () { - removeImage($(this).data("info")); - }); - $(".contextmenu").on("click", ".remove-image-incident", function () { - $(".manage-incidents-evidence-holder img") - .filter("[src='" + $(this).data("info") + "']") - .remove(); - }); - $(".gallery-inner-container").on( - "contextmenu", - ".gallery-img", - function (e) { - let args = [ - { - className: "remove-image", - icon: "fas fa-times", - text: "Remove Image", - info: $(this).attr("src"), - status: "", - }, - { - className: "expand-image", - icon: "fas fa-expand", - text: "Expand Image", - info: $(this).attr("src"), - status: $(this).css("filter"), - }, - ]; - openContextMenu(e, args); - } - ); - - $(".licenses-holder").on("contextmenu", ".license-tag", function (e) { - const status = $(this).data("type"); - let type = $(this).html(); - - if (type == "Theory") { - info = "theory"; - } else if (type == "Car") { - info = "drive"; - } else if (type == "Bike") { - info = "drive_bike"; - } else if (type == "Truck") { - info = "drive_truck"; - } else if (type == "Hunting") { - info = "hunting"; - } else if (type == "Pilot") { - info = "pilot"; - } else if (type == "Weapon") { - info = "weapon"; - } else { - info = type; - } - - if ($(this).hasClass("green-tag")) { - openContextMenu(e, [ - { - className: "revoke-licence", - icon: "fas fa-times", - text: "Revoke License", - info: info, - status: status, - }, - ]); - } else if ($(this).hasClass("red-tag")) { - openContextMenu(e, [ - { - className: "give-licence", - icon: "fas fa-check", - text: "Give License", - info: info, - status: status, - }, - ]); - } - }); - - $(".contextmenu").on("click", ".revoke-licence", function () { - // $.post( - // `https://${GetParentResourceName()}/updateLicence`, - // JSON.stringify({ - // cid: $(".manage-profile-citizenid-input").val(), - // type: $(this).data("status"), - // status: "revoke", - // }) - // ); - - const Elem = $(this).data("status"); - $(".license-tag") - .filter(`[data-type="${Elem}"]`) - .removeClass("green-tag") - .addClass("red-tag"); - - onMouseDown(); - }); - - $(".contextmenu").on("click", ".give-licence", function () { - // $.post( - // `https://${GetParentResourceName()}/updateLicence`, - // JSON.stringify({ - // cid: $(".manage-profile-citizenid-input").val(), - // type: $(this).data("status"), - // status: "give", - // }) - // ); - - const Elem = $(this).data("status"); - $(".license-tag") - .filter(`[data-type="${Elem}"]`) - .removeClass("red-tag") - .addClass("green-tag"); - - onMouseDown(); - }); - - $(".profile-title").click(function () { - if (canSearchForProfiles == true) { - if ($(".profile-search-input").css("display") == "none") { - $(".profile-search-input").slideDown(250); - $(".profile-search-input").css("display", "block"); - } else { - $(".profile-search-input").slideUp(250); - setTimeout(() => { - $(".profile-search-input").css("display", "none"); - }, 250); - } - } - }); - - $("#profile-search-input").keydown(async function (e) { - if (e.keyCode === 13 && canSearchForProfiles == true) { - let name = $("#profile-search-input").val(); - if (name != "") { - canSearchForProfiles = false; - $(".profile-items").empty(); - $(".profile-items").prepend( - `
` - ); - - let result = await $.post( - `https://${GetParentResourceName()}/searchProfiles`, - JSON.stringify({ - name: name, - }) - ); - - searchProfilesResults(result); - } - } - }); - - $(".incidents-title").click(function () { - if (canSearchForProfiles == true) { - if ($(".incidents-search-input").css("display") == "none") { - $(".incidents-search-input").slideDown(250); - $(".incidents-search-input").css("display", "block"); - } else { - $(".incidents-search-input").slideUp(250); - setTimeout(() => { - $(".incidents-search-input").css("display", "none"); - }, 250); - } - } - }); - - $("#incidents-search-input").keydown(function (e) { - if (e.keyCode === 13 && canSearchForProfiles == true) { - let incident = $("#incidents-search-input").val(); - if (incident !== "") { - canSearchForProfiles = false; - $.post( - `https://${GetParentResourceName()}/searchIncidents`, - JSON.stringify({ - incident: incident, - }) - ); - $(".incidents-items").empty(); - $(".incidents-items").prepend( - `
` - ); - } - } - }); - - $("#dispatchmsg").keydown(function (e) { - const keyCode = e.which || e.keyCode; - if (keyCode === 13 && !e.shiftKey) { - e.preventDefault(); - const time = new Date(); - $.post( - `https://${GetParentResourceName()}/dispatchMessage`, - JSON.stringify({ - message: $(this).val(), - time: time.getTime(), - }) - ); - $(this).val(""); - } - }); - - $(".incidents-items").on("click", ".incidents-item", function () { - const id = $(this).data("id"); - $.post( - `https://${GetParentResourceName()}/getIncidentData`, - JSON.stringify({ - id: id, - }) - ); - }); - $(".manage-incidents-civilians-holder").on("click", ".manage-incidents-civilians", async function () { - const name = $(this).text(); - fidgetSpinner(".profile-page-container"); - currentTab = ".profile-page-container"; - $(".profile-search-input").slideDown(250); - $(".profile-search-input").css("display", "block"); - $("#profile-search-input:text").val(name); - canSearchForProfiles = false; - let result = await $.post( - `https://${GetParentResourceName()}/searchProfiles`, - JSON.stringify({ - name: name, - }) - ); - - searchProfilesResults(result); - } - ); - document.onkeyup = function (data) { - if (data.which == 27) { - let shouldClose = true; - - if ($(".respond-calls-container").css("display") == "block") { - shouldClose = false; - $(".respond-calls-container").fadeOut(500); - setTimeout(() => { - $(".close-all").css("filter", "none"); - }, 250); - } - - if ($(".gallery-image-enlarged").css("display") == "block") { - shouldClose = false; - $(".gallery-image-enlarged").fadeOut(150); - $(".gallery-image-enlarged").css("display", "none"); - $(".close-all").css("filter", "none"); - } - - if ($(".incidents-image-enlarged").css("display") == "block") { - shouldClose = false; - $(".incidents-image-enlarged").fadeOut(150); - $(".incidents-image-enlarged").css("display", "none"); - } - - if ( - $(".icidents-person-search-container").css("display") != "none" - ) { - shouldClose = false; - $(".icidents-person-search-container").fadeOut(250); - $(".close-all").css("filter", "none"); - } - - if ($(".incidents-charges-table").css("display") != "none") { - shouldClose = false; - $(".incidents-charges-table").slideUp(500); - $(".incidents-charges-table").fadeOut(500); - setTimeout(() => { - $(".close-all").css("filter", "none"); - }, 550); - } - - if ($(".dispatch-attached-units").css("display") != "none") { - shouldClose = false; - $(".dispatch-attached-units").slideUp(500); - $(".dispatch-attached-units").fadeOut(500); - setTimeout(() => { - $(".close-all").css("filter", "none"); - }, 550); - } - - if ($(".impound-form").css("display") != "none") { - shouldClose = false; - $(".impound-form").slideUp(250); - $(".impound-form").fadeOut(250); - setTimeout(() => { - $(".close-all").css("filter", "none"); - }, 550); - } - - if (shouldClose == true) { - $.post(`https://${GetParentResourceName()}/escape`, JSON.stringify({})); - } - } - }; - $(".manage-incidents-tags-add-btn").click(function () { - if ($(".tag-incident-input")[0]) { - $(this).removeClass("fa-minus").addClass("fa-plus"); - $(".tag-incident-input").remove(); - } else { - $(this).removeClass("fa-plus").addClass("fa-minus"); - $(".manage-incidents-tags-holder").prepend( - `` - ); - } - }); - - $(".icidents-person-search-name-input").on("keydown", "", function (e) { - if (e.keyCode === 13) { - let name = $(".icidents-person-search-name-input").val(); - $.post( - `https://${GetParentResourceName()}/incidentSearchPerson`, - JSON.stringify({ - name: name, - }) - ); - } - }); - $(".manage-incidents-tags-holder").on( - "keydown", - ".tag-incident-input", - function (e) { - if (e.keyCode === 13) { - $(".manage-incidents-tags-holder").prepend( - `
${$( - ".tag-incident-input" - ).text()}
` - ); - // Have it save instantly if it's an existing report. - if ($(".manage-incidents-tags-add-btn").hasClass("fa-minus")) { - $(".manage-incidents-tags-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - $(".tag-incident-input").remove(); - } - } - ); - - $(".manage-incidents-officers-add-btn").click(function () { - if ($(".officers-incident-input")[0]) { - $(this).removeClass("fa-minus").addClass("fa-plus"); - $(".officers-incident-input").remove(); - } else { - $(this).removeClass("fa-plus").addClass("fa-minus"); - $(".manage-incidents-officers-holder").prepend( - `` - ); - } - }); - - $(".manage-incidents-officers-holder").on( - "keydown", - ".officers-incident-input", - function (e) { - if (e.keyCode === 13) { - $(".manage-incidents-officers-holder").prepend( - `
${$( - ".officers-incident-input" - ).text()}
` - ); - // Have it save instantly if it's an existing report. - if ( - $(".manage-incidents-officers-add-btn").hasClass("fa-minus") - ) { - $(".manage-incidents-officers-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - $(".officers-incident-input").remove(); - } - } - ); - - $(".manage-incidents-civilians-add-btn").click(function () { - if ($(".civilians-incident-input")[0]) { - $(this).removeClass("fa-minus").addClass("fa-plus"); - $(".civilians-incident-input").remove(); - } else { - $(this).removeClass("fa-plus").addClass("fa-minus"); - $(".manage-incidents-civilians-holder").prepend( - `` - ); - } - }); - - $(".manage-incidents-civilians-holder").on( - "keydown", - ".civilians-incident-input", - function (e) { - if (e.keyCode === 13) { - $(".manage-incidents-civilians-holder").prepend( - `
${$( - ".civilians-incident-input" - ).text()}
` - ); - // Have it save instantly if it's an existing report. - if ( - $(".manage-incidents-civilians-add-btn").hasClass( - "fa-minus" - ) - ) { - $(".manage-incidents-civilians-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - $(".civilians-incident-input").remove(); - } - } - ); - - $(".manage-incidents-evidence-add-btn").click(function () { - if ($(".incidents-upload-input").css("display") == "none") { - $(".incidents-upload-input").slideDown(250); - $(".incidents-upload-input").css("display", "block"); - $(this).removeClass("fa-plus").addClass("fa-minus"); - } else { - $(".incidents-upload-input").slideUp(250); - setTimeout(() => { - $(".incidents-upload-input").css("display", "none"); - }, 250); - $(this).removeClass("fa-minus").addClass("fa-plus"); - } - }); - - $("#incidents-upload-input").keydown(function (e) { - if (e.keyCode === 13) { - let URL = $("#incidents-upload-input").val(); - let cid = $(".manage-profile-citizenid-input").val(); - if (URL !== "") { - let randomNum = Math.ceil(Math.random() * 10).toString(); - $(".manage-incidents-evidence-holder").prepend( - `` - ); - $("#incidents-upload-input").val(""); - $(".incidents-upload-input").slideUp(250); - setTimeout(() => { - $(".incidents-upload-input").css("display", "none"); - }, 250); - $(".manage-incidents-evidence-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - } - }); - - $(".manage-incidents-evidence-holder").on( - "click", - ".incidents-img", - function () { - if ($(this).css("filter") == "none") { - $(this).css("filter", "blur(5px)"); - } else { - $(this).css("filter", "none"); - } - } - ); - - $(".manage-bolos-title-holder").on( - "click", - ".manage-bolos-new", - function () { - //if ($(".manage-bolos-editing-title").html() == 'You are currently creating a new BOLO') { - //$(".manage-bolos-new").effect("shake", { times: 2, distance: 2 }, 500) - //} else { - var template = ""; - if ($(".badge-logo").attr("src") == "img/ems_badge.png") { - template = - "ICU Room #: [ # ]\n\nReport ID: [ Report ID ]\n\nTime Admitted: [ Date and Time Here ]\n\nSurgery: [Yes/No]\n\nInjuries/Ailments:\n - [ Enter List Of Injuries Here ]\n\n\nAdditional Attending:\n - [ List Any Other Staff Here ]\n\n\n🧑‍🤝‍🧑 Additional Emergency Contacts:\n - [ Name And Number ]\n\n\nNotes:\n[Additional Notes Here]"; - } - $(".manage-bolos-editing-title").html( - "You are currently creating a new BOLO" - ); - $(".manage-bolos-input-title").val(""); - $(".manage-bolos-input-plate").val(""); - $(".manage-bolos-input-owner").val(""); - $(".manage-bolos-input-individual").val(""); - $(".manage-bolos-reports-content").val(template); - $(".manage-bolos-tags-holder").empty(); - $(".bolo-gallery-inner-container").empty(); - $(".manage-officers-tags-holder").empty(); - - if ($(".manage-bolos-tags-add-btn").hasClass("fa-minus")) { - $(".manage-bolos-tags-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - if ($(".bolo-gallery-add-btn").hasClass("fa-minus")) { - $(".bolo-gallery-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - if ($(".officers-add-btn").hasClass("fa-minus")) { - $(".officers-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - - if ($(".bolo-gallery-upload-input").css("display") == "block") { - $(".bolo-gallery-upload-input").slideUp(250); - setTimeout(() => { - $(".bolo-gallery-upload-input").css("display", "none"); - }, 250); - } - - canInputTag = true; - canInputBoloTag = true; - canInputBoloOfficerTag = true; - - $(".tag-bolo-input").remove(); - canInputBoloTag = true; - - //} - } - ); - - $(".manage-bolos-title-holder").on( - "click", - ".manage-bolos-save", - function () { - let existing = !( - $(".manage-bolos-editing-title").html() == - "You are currently creating a new BOLO" - ); - let id = $(".manage-bolos-editing-title").data("id"); - let title = $("#bolotitle").val(); - let plate = $("#boloplate").val(); - let owner = $("#boloowner").val(); - let individual = $("#boloindividual").val(); - let detail = $("#bolodetail").val(); - - let tags = new Array(); - let gallery = new Array(); - let officers = new Array(); - - $(".manage-bolos-tags-holder").each(function (index) { - if ($(this).text() != "") { - tags.push($(this).text()); - } - }); - - $(".bolo-gallery-inner-container") - .find("img") - .each(function () { - if ($(this).attr("src") != "") { - gallery.push($(this).attr("src")); - } - }); - - $(".manage-officers-tags-holder").each(function (index) { - if ($(this).text() != "") { - officers.push($(this).text()); - } - }); - - let time = new Date(); - - $.post( - `https://${GetParentResourceName()}/newBolo`, - JSON.stringify({ - existing: existing, - id: id, - title: title, - plate: plate, - owner: owner, - individual: individual, - detail: detail, - tags: tags, - gallery: gallery, - officers: officers, - time: time.getTime(), - }) - ); - } - ); - - $(".manage-incidents-evidence-holder").on( - "contextmenu", - ".incidents-img", - function (e) { - let args = [ - { - className: "remove-image-incident", - icon: "fas fa-times", - text: "Remove Image", - info: $(this).attr("src"), - status: "", - }, - { - className: "expand-image", - icon: "fas fa-expand", - text: "Expand Image", - info: $(this).attr("src"), - status: $(this).css("filter"), - }, - ]; - openContextMenu(e, args); - } - ); - - $(".bolos-search-title").click(function () { - if (canSearchForProfiles == true) { - if ($(".bolos-search-input").css("display") == "none") { - $(".bolos-search-input").slideDown(250); - $(".bolos-search-input").css("display", "block"); - } else { - $(".bolos-search-input").slideUp(250); - setTimeout(() => { - $(".bolos-search-input").css("display", "none"); - }, 250); - } - } - }); - - $("#bolos-search-input").keydown(function (e) { - if (e.keyCode === 13 && canSearchForProfiles == true) { - let searchVal = $("#bolos-search-input").val(); - if (searchVal !== "") { - canSearchForProfiles = false; - $.post( - `https://${GetParentResourceName()}/searchBolos`, - JSON.stringify({ - searchVal: searchVal, - }) - ); - $(".bolos-items").empty(); - $(".bolos-items").prepend(`
`); - } - } - }); - - $(".bolos-search-refresh").click(function () { - if (canRefreshBolo == true) { - canRefreshBolo = false; - $(".bolos-search-refresh").empty(); - $(".bolos-search-refresh").prepend( - `` - ); - setTimeout(() => { - $(".bolos-search-refresh").empty(); - $(".bolos-search-refresh").html("Refresh"); - canRefreshBolo = true; - $.post(`https://${GetParentResourceName()}/getAllBolos`, JSON.stringify({})); - }, 1500); - } - }); - - $(".manage-bolos-tags-add-btn").click(function () { - if (canInputBoloTag) { - $(this).removeClass("fa-plus").addClass("fa-minus"); - $(".manage-bolos-tags-holder").prepend( - `` - ); - canInputBoloTag = false; - } else if (!canInputBoloTag) { - $(this).removeClass("fa-minus").addClass("fa-plus"); - $(".tag-bolo-input").remove(); - canInputBoloTag = true; - } - }); - - $(".manage-bolos-tags-holder").on( - "keydown", - ".tag-bolo-input", - function (e) { - if (e.keyCode === 13) { - $(".manage-bolos-tags-holder").prepend( - `
${$(".tag-bolo-input").text()}
` - ); - // Have it save instantly if it's an existing report. - if ($(".manage-bolos-tags-add-btn").hasClass("fa-minus")) { - $(".manage-bolos-tags-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - $(".tag-bolo-input").remove(); - canInputBoloTag = true; - } - } - ); - - $(".bolo-gallery-add-btn").click(function () { - //if ($(".manage-profile-citizenid-input").val()) { - if ($(".bolo-gallery-upload-input").css("display") == "none") { - $(".bolo-gallery-upload-input").slideDown(250); - $(".bolo-gallery-upload-input").css("display", "block"); - $(this).removeClass("fa-plus").addClass("fa-minus"); - } else { - $(".bolo-gallery-upload-input").slideUp(250); - setTimeout(() => { - $(".bolo-gallery-upload-input").css("display", "none"); - }, 250); - $(this).removeClass("fa-minus").addClass("fa-plus"); - } - //} else { - // $(this).effect("shake", { times: 2, distance: 2 }, 500) - // } - }); - - $("#bolo-gallery-upload-input").keydown(function (e) { - if (e.keyCode === 13) { - let URL = $("#bolo-gallery-upload-input").val(); - let cid = $(".manage-profile-citizenid-input").val(); - if (URL !== "") { - let randomNum = Math.ceil(Math.random() * 10).toString(); - $(".bolo-gallery-inner-container").prepend( - `` - ); - $("#bolo-gallery-upload-input").val(""); - $(".bolo-gallery-upload-input").slideUp(250); - setTimeout(() => { - $(".bolo-gallery-upload-input").css("display", "none"); - }, 250); - $(".bolo-gallery-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - } - }); - - $(".bolos-items").on("click", ".bolo-item", function () { - if ($(".manage-bolos-tags-add-btn").hasClass("fa-minus")) { - $(".manage-bolos-tags-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - if ($(".bolo-gallery-add-btn").hasClass("fa-minus")) { - $(".bolo-gallery-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - if ($(".officers-add-btn").hasClass("fa-minus")) { - $(".officers-add-btn").removeClass("fa-minus").addClass("fa-plus"); - } - - if ($(".bolo-gallery-upload-input").css("display") == "block") { - $(".bolo-gallery-upload-input").slideUp(250); - setTimeout(() => { - $(".bolo-gallery-upload-input").css("display", "none"); - }, 250); - } - - canInputTag = true; - canInputBoloTag = true; - canInputBoloOfficerTag = true; - let id = $(this).data("id"); - $.post( - `https://${GetParentResourceName()}/getBoloData`, - JSON.stringify({ - id: id, - }) - ); - }); - - $(".contextmenu").on("click", ".bolo-delete", function () { - if ($(this).data("info") != 0) { - if ($(".badge-logo").attr("src") == "img/ems_badge.png") { - $(".bolos-items") - .find("[data-id='" + $(this).data("info") + "']") - .remove(); - $.post( - `https://${GetParentResourceName()}/deleteICU`, - JSON.stringify({ - id: $(this).data("info"), - }) - ); - } - $(".bolos-items") - .find("[data-id='" + $(this).data("info") + "']") - .remove(); - $.post( - `https://${GetParentResourceName()}/deleteBolo`, - JSON.stringify({ - id: $(this).data("info"), - }) - ); - } - }); - - $(".bolos-items").on("contextmenu", ".bolo-item", function (e) { - var args = ""; - args = [ - { - className: "bolo-delete", - icon: "fas fa-times", - text: "Delete Bolo", - info: $(this).data("id"), - status: "", - }, - ]; - if ($(".badge-logo").attr("src") == "img/ems_badge.png") { - args = [ - { - className: "bolo-delete", - icon: "fas fa-times", - text: "Delete Check-In", - info: $(this).data("id"), - status: "", - }, - ]; - } - openContextMenu(e, args); - }); - $(".incidents-ghost-holder").on( - "contextmenu", - ".associated-incidents-user-holder", - function (e) { - let args = [ - { - className: "add-charge", - icon: "fas fa-check", - text: "Modify Charges", - info: $(this).data("name"), - status: "", - }, - ]; - openContextMenu(e, args); - } - ); - $(".contextmenu").on("click", ".add-charge", function () { - let stupidasscid = $(this).data("info"); - $(".incidents-charges-table").slideDown(500); - $(".incidents-charges-table").fadeIn(500); - $("#current-charges-holder").data("cid", $(this).data("info")); - $("#current-charges-holder").html(""); - $(".associated-incidents-user-holder") - .children("div") - .each(function (index) { - if ( - $(".associated-incidents-user-holder") - .children() - .eq(index) - .data("id") == stupidasscid - ) { - const randomNum = Math.ceil( - Math.random() * 1000 - ).toString(); - $("#current-charges-holder").prepend( - `
${$( - ".associated-incidents-user-holder" - ) - .children() - .eq(index) - .html()}
` - ); - } - }); - setTimeout(() => { - $(".close-all").css("filter", "brightness(30%)"); - }, 250); - $.post(`https://${GetParentResourceName()}/getPenalCode`, JSON.stringify({})); - }); - - var shiftPressed = false; - $(document).keydown(function (event) { - shiftPressed = event.keyCode == 16; - }); - $(document).keyup(function (event) { - if (event.keyCode == 16) { - shiftPressed = false; - } - }); - - $(".offenses-main-container").on("mousedown",".offense-item",function (e) { - const cid = $("#current-charges-holder").data("cid"); - const newItem = $(this).find(".offense-item-offense").html(); - const Fine = +$(this).data("fine"); - const Sentence = +$(this).data("sentence"); - if (e.which == 1) { - let randomNum = Math.ceil(Math.random() * 1000).toString(); - $(`[data-name="${cid}"]`).prepend(`
${$(this).find(".offense-item-offense").html()}
`); - $("#current-charges-holder").prepend(`
${$(this).find(".offense-item-offense").html()}
`); - - const CurrRfine = $(".fine-recommended-amount").filter(`[data-id="${cid}"]`).val(); - const NewFine = +CurrRfine + +Fine; - $(".fine-recommended-amount").filter(`[data-id="${cid}"]`).val(NewFine); - - const CurrRsentence = $(".sentence-recommended-amount").filter(`[data-id="${cid}"]`).val(); - const NewSentence = +CurrRsentence + +Sentence; - $(".sentence-recommended-amount").filter(`[data-id="${cid}"]`).val(NewSentence); - - } else if (e.which == 3) { - $(".associated-incidents-user-holder").children("div").each(function (index) { - if ($(".associated-incidents-user-holder").children().eq(index).data("id") == cid) { - if ($(".associated-incidents-user-holder").children().eq(index).html() == newItem) { - const linkedId = $(".associated-incidents-user-holder").children().eq(index).data("link"); - //$(".current-charges-tag").filter(`[data-link="${linkedId}"]`).remove() - $(".white-tag").filter(`[data-link="${linkedId}"]`).remove(); - - var stop = false; - - $("#current-charges-holder").children("div").each(function (index) { - if (stop == false) { - if ($("#current-charges-holder").children().eq(index).html() == newItem) { - const linkedId = $("#current-charges-holder").children().eq(index).data("link"); - $(".current-charges-tag").filter(`[data-link="${linkedId}"]`).remove(); - stop = true; - } - } - }); - - const CurrRfine = $(".fine-recommended-amount").filter(`[data-id="${cid}"]`).val(); - const NewFine = +CurrRfine - Fine; - $(".fine-recommended-amount").filter(`[data-id="${cid}"]`).val(NewFine); - - const CurrRsentence = $(".sentence-recommended-amount").filter(`[data-id="${cid}"]`).val(); - const NewSentence = +CurrRsentence - +Sentence; - $(".sentence-recommended-amount").filter(`[data-id="${cid}"]`).val(NewSentence); - return false; - } - } - }); - } - } - ); - - $(".bolo-gallery-inner-container").on("click", ".bolo-img", function () { - if ($(this).css("filter") == "none") { - $(this).css("filter", "blur(5px)"); - } else { - $(this).css("filter", "none"); - } - }); - $(".contextmenu").on("click", ".bolo-remove-image", function () { - $(".bolo-gallery-inner-container img") - .filter("[src='" + $(this).data("info") + "']") - .remove(); - }); - $(".bolo-gallery-inner-container").on( - "contextmenu", - ".bolo-img", - function (e) { - let args = [ - { - className: "bolo-remove-image", - icon: "fas fa-times", - text: "Remove Image", - info: $(this).attr("src"), - status: "", - }, - { - className: "expand-image", - icon: "fas fa-expand", - text: "Expand Image", - info: $(this).attr("src"), - status: $(this).css("filter"), - }, - ]; - openContextMenu(e, args); - } - ); - - $(".officers-add-btn").click(function () { - if (canInputBoloOfficerTag) { - $(this).removeClass("fa-plus").addClass("fa-minus"); - $(".manage-officers-tags-holder").prepend( - `` - ); - canInputBoloOfficerTag = false; - } else if (!canInputBoloOfficerTag) { - $(this).removeClass("fa-minus").addClass("fa-plus"); - $(".officer-tag-bolo-input").remove(); - canInputBoloOfficerTag = true; - } - }); - - $(".manage-officers-tags-holder").on( - "keydown", - ".officer-tag-bolo-input", - function (e) { - if (e.keyCode === 13) { - $(".manage-officers-tags-holder").prepend( - `
${$( - ".officer-tag-bolo-input" - ).text()}
` - ); - // Have it save instantly if it's an existing report. - if ($(".officers-add-btn").hasClass("fa-minus")) { - canInputBoloOfficerTag = true; - $(".officers-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - canInputBoloOfficerTag = true; - $(".officer-tag-bolo-input").remove(); - } - } - ); - $(".incidents-ghost-holder").on( - "click", - ".associated-incidents-user-tag", - function () { - if ($(this).hasClass("red-tag")) { - $(this).removeClass("red-tag"); - $(this).addClass("green-tag"); - if ($(this).text() == "Associated") { - $(".associated-incidents-user-holder") - .filter(`[data-name="${$(this).data("id")}"]`) - .css("display", "none"); - $(".associated-incidents-fine-input") - .filter(`[data-id="${$(this).data("id")}"]`) - .css("display", "none"); - $(".manage-incidents-title-tag") - .filter(`[data-id="${$(this).data("id")}"]`) - .css("display", "none"); - $(".associated-incidents-sentence-input") - .filter(`[data-id="${$(this).data("id")}"]`) - .css("display", "none"); - } - } else { - $(this).removeClass("green-tag"); - $(this).addClass("red-tag"); - if ($(this).text() == "Associated") { - $(".associated-incidents-user-holder") - .filter(`[data-name="${$(this).data("id")}"]`) - .fadeIn(100); - $(".associated-incidents-fine-input") - .filter(`[data-id="${$(this).data("id")}"]`) - .fadeIn(100); - $(".manage-incidents-title-tag") - .filter(`[data-id="${$(this).data("id")}"]`) - .fadeIn(100); - $(".associated-incidents-sentence-input") - .filter(`[data-id="${$(this).data("id")}"]`) - .fadeIn(100); - } - } - } - ); - $(".contextmenu").on( - "click", - ".associated-incidents-remove-tag", - function () { - $( - `.associated-incidents-tag:contains(${$(this).data("info")})` - ).remove(); - $( - `.associated-incidents-user-title:contains(${$(this).data( - "info" - )})` - ) - .parent() - .remove(); - const incidentId = $(".manage-incidents-editing-title").data("id"); - if (incidentId != 0) { - $.post( - `https://${GetParentResourceName()}/removeIncidentCriminal`, - JSON.stringify({ - cid: $(this).data("status"), - incidentId: incidentId, - }) - ); - } - } - ); - $(".associated-incidents-tags-holder").on( - "contextmenu", - ".associated-incidents-tag", - function (e) { - let args = [ - { - className: "associated-incidents-remove-tag", - icon: "fas fa-times", - text: "Remove Tag", - info: $(this).html(), - status: $(this).data("id"), - }, - ]; - openContextMenu(e, args); - } - ); - $(".icidents-person-search-holder").on( - "click", - ".icidents-person-search-item", - function () { - $(".icidents-person-search-container").fadeOut(250); - $(".close-all").css("filter", "none"); - $(".associated-incidents-tags-holder").prepend( - `
${$(this).data("name")}
` - ); - - $(".incidents-ghost-holder").prepend( - ` -
-
${$(this).data( - "info" - )}
-
-
Warrant
-
Guilty
-
Processed
-
Associated
-
-
-
-
Recommended Fine
-
-
Recommended Sentence
-
-
Fine
-
-
Sentence
-
-
- ` - ); - } - ); - - $(".contextmenu").on("click", ".incidents-remove-tag", function () { - $(`.tag:contains(${$(this).data("info")})`).remove(); - }); - - $(".manage-incidents-tags-holder").on("contextmenu", ".tag", function (e) { - let args = [ - { - className: "incidents-remove-tag", - icon: "fas fa-times", - text: "Remove Tag", - info: $(this).html(), - status: "", - }, - ]; - openContextMenu(e, args); - }); - - $(".contextmenu").on("click", ".incidents-remove-officer-tag", function () { - $( - `.manage-incidents-officers:contains(${$(this).data("info")})` - ).remove(); - }); - - $(".manage-incidents-officers-holder").on( - "contextmenu", - ".manage-incidents-officers", - function (e) { - let args = [ - { - className: "incidents-remove-officer-tag", - icon: "fas fa-times", - text: "Remove Tag", - info: $(this).html(), - status: "", - }, - ]; - openContextMenu(e, args); - } - ); - - $(".contextmenu").on("click", ".incidents-remove-civ-tag", function () { - $( - `.manage-incidents-civilians:contains(${$(this).data("info")})` - ).remove(); - }); - - $(".manage-incidents-civilians-holder").on( - "contextmenu", - ".manage-incidents-civilians", - function (e) { - let args = [ - { - className: "incidents-remove-civ-tag", - icon: "fas fa-times", - text: "Remove Tag", - info: $(this).html(), - status: "", - }, - ]; - openContextMenu(e, args); - } - ); - - $(".incidents-search-refresh").click(function () { - if (canRefreshIncidents == true) { - canRefreshIncidents = false; - $(".incidents-search-refresh").empty(); - $(".incidents-search-refresh").prepend( - `` - ); - setTimeout(() => { - $(".incidents-search-refresh").empty(); - $(".incidents-search-refresh").html("Refresh"); - canRefreshIncidents = true; - $.post(`https://${GetParentResourceName()}/getAllIncidents`, JSON.stringify({})); - }, 1500); - } - }); - - $(".contextmenu").on("click", ".incidents-remove-normal-tag", function () { - $(`.tag:contains(${$(this).data("info")})`).remove(); - let cid = $(".manage-profile-citizenid-input").val(); - if (cid) { - $.post( - `https://${GetParentResourceName()}/removeProfileTag`, - JSON.stringify({ - cid: cid, - text: $(this).data("info"), - }) - ); - } - }); - $(".tags-holder").on("contextmenu", ".tag", function (e) { - let args = [ - { - className: "incidents-remove-normal-tag", - icon: "fas fa-times", - text: "Remove Tag", - info: $(this).html(), - status: "", - }, - ]; - openContextMenu(e, args); - }); - $(".reports-search-title").click(function () { - if (canSearchReports == true) { - if ($(".reports-search-input").css("display") == "none") { - $(".reports-search-input").slideDown(250); - $(".reports-search-input").css("display", "block"); - } else { - $(".reports-search-input").slideUp(250); - setTimeout(() => { - $(".reports-search-input").css("display", "none"); - }, 250); - } - } - }); - $(".icidents-person-search-container").hover( - function () { - mouse_is_inside = true; - }, - function () { - mouse_is_inside = false; - } - ); - - $(".reports-search-refresh").click(function () { - if (canRefreshReports == true) { - canRefreshReports = false; - $(".reports-search-refresh").empty(); - $(".reports-search-refresh").prepend( - `` - ); - setTimeout(() => { - $(".reports-search-refresh").empty(); - $(".reports-search-refresh").html("Refresh"); - canRefreshReports = true; - $.post(`https://${GetParentResourceName()}/getAllReports`, JSON.stringify({})); - }, 1500); - } - }); - - $(".dispatch-comms-refresh").click(function () { - $(".dispatch-comms-refresh").empty(); - $(".dispatch-comms-refresh").prepend( - `` - ); - setTimeout(() => { - $(".dispatch-comms-refresh").empty(); - $(".dispatch-comms-refresh").html("Refresh"); - canRefreshReports = true; - $.post(`https://${GetParentResourceName()}/refreshDispatchMsgs`, JSON.stringify({})); - }, 1500); - }); - - $(".reports-items").on("click", ".reports-item", function () { - if (currentTab != ".reports-page-container") { - fidgetSpinner(".reports-page-container"); - currentTab = ".reports-page-container"; - } - - if ($(".manage-reports-tags-add-btn").hasClass("fa-minus")) { - $(".manage-reports-tags-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - if ($(".reports-gallery-add-btn").hasClass("fa-minus")) { - $(".reports-gallery-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - if ($(".reports-officers-add-btn").hasClass("fa-minus")) { - $(".reports-officers-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - - if ($(".reports-gallery-upload-input").css("display") == "block") { - $(".reports-gallery-upload-input").slideUp(250); - setTimeout(() => { - $(".reports-gallery-upload-input").css("display", "none"); - }, 250); - } - - canInputTag = true; - canInputReportTag = true; - canInputReportOfficerTag = true; - let id = $(this).data("id"); - $.post( - `https://${GetParentResourceName()}/getReportData`, - JSON.stringify({ - id: id, - }) - ); - }); - - $(".manage-reports-tags-add-btn").click(function () { - if (canInputReportTag) { - $(this).removeClass("fa-plus").addClass("fa-minus"); - $(".manage-reports-tags-holder").prepend( - `` - ); - canInputReportTag = false; - } else if (!canInputReportTag) { - $(this).removeClass("fa-minus").addClass("fa-plus"); - $(".tag-reports-input").remove(); - canInputReportTag = true; - } - }); - - $(".manage-reports-tags-holder").on( - "keydown", - ".tag-reports-input", - function (e) { - if (e.keyCode === 13) { - $(".manage-reports-tags-holder").prepend( - `
${$(".tag-reports-input").text()}
` - ); - // Have it save instantly if it's an existing report. - if ($(".manage-reports-tags-add-btn").hasClass("fa-minus")) { - $(".manage-reports-tags-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - $(".tag-reports-input").remove(); - canInputReportTag = true; - } - } - ); - - $(".reports-gallery-add-btn").click(function () { - //if ($(".manage-profile-citizenid-input").val()) { - if ($(".reports-gallery-upload-input").css("display") == "none") { - $(".reports-gallery-upload-input").slideDown(250); - $(".reports-gallery-upload-input").css("display", "block"); - $(this).removeClass("fa-plus").addClass("fa-minus"); - } else { - $(".reports-gallery-upload-input").slideUp(250); - setTimeout(() => { - $(".reports-gallery-upload-input").css("display", "none"); - }, 250); - $(this).removeClass("fa-minus").addClass("fa-plus"); - } - //} else { - // $(this).effect("shake", { times: 2, distance: 2 }, 500) - // } - }); - - $("#reports-gallery-upload-input").keydown(function (e) { - if (e.keyCode === 13) { - let URL = $("#reports-gallery-upload-input").val(); - let cid = $(".manage-profile-citizenid-input").val(); - if (URL !== "") { - let randomNum = Math.ceil(Math.random() * 10).toString(); - $(".reports-gallery-inner-container").prepend( - `` - ); - $("#reports-gallery-upload-input").val(""); - $(".reports-gallery-upload-input").slideUp(250); - setTimeout(() => { - $(".reports-gallery-upload-input").css("display", "none"); - }, 250); - $(".reports-gallery-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - } - }); - - $(".reports-gallery-inner-container").on( - "click", - ".reports-img", - function () { - if ($(this).css("filter") == "none") { - $(this).css("filter", "blur(5px)"); - } else { - $(this).css("filter", "none"); - } - } - ); - $(".contextmenu").on("click", ".reports-remove-image", function () { - $(".reports-gallery-inner-container img") - .filter("[src='" + $(this).data("info") + "']") - .remove(); - }); - - $(".reports-gallery-inner-container").on( - "contextmenu", - ".reports-img", - function (e) { - let args = [ - { - className: "reports-remove-image", - icon: "fas fa-times", - text: "Remove Image", - info: $(this).attr("src"), - status: "", - }, - { - className: "expand-image", - icon: "fas fa-expand", - text: "Expand Image", - info: $(this).attr("src"), - status: $(this).css("filter"), - }, - ]; - openContextMenu(e, args); - } - ); - - $(".reports-officers-add-btn").click(function () { - if (canInputReportOfficerTag) { - $(this).removeClass("fa-plus").addClass("fa-minus"); - $(".reports-officers-tags-holder").prepend( - `` - ); - canInputReportOfficerTag = false; - } else if (!canInputReportOfficerTag) { - $(this).removeClass("fa-minus").addClass("fa-plus"); - $(".officer-tag-reports-input").remove(); - canInputReportOfficerTag = true; - } - }); - - $(".reports-officers-tags-holder").on( - "keydown", - ".officer-tag-reports-input", - function (e) { - if (e.keyCode === 13) { - $(".reports-officers-tags-holder").prepend( - `
${$( - ".officer-tag-reports-input" - ).text()}
` - ); - // Have it save instantly if it's an existing report. - if ($(".reports-officers-add-btn").hasClass("fa-minus")) { - canInputReportOfficerTag = true; - $(".reports-officers-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - canInputReportOfficerTag = true; - $(".officer-tag-reports-input").remove(); - } - } - ); - - $(".reports-civilians-add-btn").click(function () { - if (canInputReportCivilianTag) { - $(this).removeClass("fa-plus").addClass("fa-minus"); - $(".reports-civilians-tags-holder").prepend( - `` - ); - canInputReportCivilianTag = false; - } else if (!canInputReportCivilianTag) { - $(this).removeClass("fa-minus").addClass("fa-plus"); - $(".civilian-tag-reports-input").remove(); - canInputReportCivilianTag = true; - } - }); - - $(".reports-civilians-tags-holder").on( - "keydown", - ".civilian-tag-reports-input", - function (e) { - if (e.keyCode === 13) { - $(".reports-civilians-tags-holder").prepend( - `
${$( - ".civilian-tag-reports-input" - ).text()}
` - ); - // Have it save instantly if it's an existing report. - if ($(".reports-civilians-add-btn").hasClass("fa-minus")) { - canInputReportCivilianTag = true; - $(".reports-civilians-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - canInputReportCivilianTag = true; - $(".civilian-tag-reports-input").remove(); - } - } - ); - - $(".manage-reports-title-holder").on( - "click", - ".manage-reports-new", - function () { - //if ($(".manage-bolos-editing-title").html() == 'You are currently creating a new BOLO') { - //$(".manage-bolos-new").effect("shake", { times: 2, distance: 2 }, 500) - //} else { - let template = ""; - if ($(".badge-logo").attr("src") == "img/ems_badge.png") { - template = - "Submitted to ICU?: [Yes/No]\n\nIncident Report:\n[ Brief summary of what happened and who did what while on scene. Note anything that stood out about the scene as well as what was done to treat the patient ]\n\n\nList of Injuries:\n- [ State what injury or injuries occurred ]\n\n\n💉 Surgical Report:\n[ Full report on what was done in surgery, list any complications or anything that was found while in operation. Note who was attending and what they did during the surgery. At the end of the report be sure to note the state of the patient after ]\n\n\nAttending:\n- [ List Any Attending Here ]\n\n\nMedications Applied:\n- [ List Any Attending Here ]\n\n\nNotes:\n[ Additional Notes Here ]"; - } - $(".manage-reports-editing-title").html( - "You are currently creating a new report" - ); - $(".manage-reports-input-title").val(""); - $(".manage-reports-input-type").val(""); - $(".manage-reports-reports-content").val(template); - $(".manage-reports-tags-holder").empty(); - $(".reports-gallery-inner-container").empty(); - $(".reports-officers-tags-holder").empty(); - $(".reports-civilians-tags-holder").empty(); - - if ($(".manage-reports-tags-add-btn").hasClass("fa-minus")) { - $(".manage-reports-tags-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - if ($(".reports-gallery-add-btn").hasClass("fa-minus")) { - $(".reports-gallery-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - if ($(".officers-add-btn").hasClass("fa-minus")) { - $(".officers-add-btn") - .removeClass("fa-minus") - .addClass("fa-plus"); - } - - if ($(".reports-gallery-upload-input").css("display") == "block") { - $(".reports-gallery-upload-input").slideUp(250); - setTimeout(() => { - $(".reports-gallery-upload-input").css("display", "none"); - }, 250); - } - - canInputTag = true; - canInputReportTag = true; - canInputReportOfficerTag = true; - - $(".tag-reports-input").remove(); - canInputReportTag = true; - - //} - } - ); - - $("#reports-search-input").keydown(function (e) { - if (e.keyCode === 13 && canSearchForReports == true) { - let name = $(this).val(); - if (name !== "") { - canSearchForReports = false; - $.post( - `https://${GetParentResourceName()}/searchReports`, - JSON.stringify({ - name: name, - }) - ); - $(".reports-items").empty(); - $(".reports-items").prepend( - `
` - ); - } - } - }); - - $(".manage-reports-title-holder").on( - "click", - ".manage-reports-save", - function () { - let existing = !( - $(".manage-reports-editing-title").html() == - "You are currently creating a new report" - ); - let id = $(".manage-reports-editing-title").data("id"); - let title = $("#reporttitle").val(); - let type = $("#reporttype").val(); - let details = $("#reportdetail").val(); - let tags = new Array(); - let gallery = new Array(); - let officers = new Array(); - let civilians = new Array(); - - $(".manage-reports-tags-holder") - .find("div") - .each(function () { - if ($(this).text() != "") { - tags.push($(this).text()); - } - }); - - $(".reports-gallery-inner-container") - .find("img") - .each(function () { - if ($(this).attr("src") != "") { - gallery.push($(this).attr("src")); - } - }); - - $(".reports-officers-tags-holder") - .find("div") - .each(function () { - if ($(this).text() != "") { - officers.push($(this).text()); - } - }); - - $(".reports-civilians-tags-holder") - .find("div") - .each(function () { - if ($(this).text() != "") { - civilians.push($(this).text()); - } - }); - - let time = new Date(); - - $.post( - `https://${GetParentResourceName()}/newReport`, - JSON.stringify({ - existing: existing, - id: id, - title: title, - type: type, - details: details, - tags: tags, - gallery: gallery, - officers: officers, - civilians: civilians, - time: time.getTime(), - }) - ); - } - ); - - $(".dmv-search-title").click(function () { - if (canSearchForVehicles == true) { - if ($(".dmv-search-input").css("display") == "none") { - $(".dmv-search-input").slideDown(250); - $(".dmv-search-input").css("display", "block"); - } else { - $(".dmv-search-input").slideUp(250); - setTimeout(() => { - $(".dmv-search-input").css("display", "none"); - }, 250); - } - } - }); - - $("#dmv-search-input").keydown(async function (e) { - if (e.keyCode === 13 && canSearchForVehicles == true) { - let name = $("#dmv-search-input").val(); - if (name !== "") { - canSearchForVehicles = false; - $(".dmv-items").empty(); - $(".dmv-items").prepend(`
`); - - let result = await $.post( - `https://${GetParentResourceName()}/searchVehicles`, - JSON.stringify({ - name: name, - }) - ); - if (result.length === 0) { - $(".dmv-items").html( - ` -
- -
-
-
No Vehicles Matching that search
-
-
-
-
-
- ` - ); - canSearchForVehicles = true; - return true; - } - $(".dmv-items").empty(); - - let vehicleHTML = ""; - - result.forEach((value) => { - let paint = value.color; - let impound = "red-tag"; - let bolo = "red-tag"; - let codefive = "red-tag"; - let stolen = "red-tag"; - - if (value.state == 'Impounded') { - impound = "green-tag"; - } - - if (value.bolo) { - bolo = "green-tag"; - } - - if (value.code) { - codefive = "green-tag"; - } - - if (value.stolen) { - stolen = "green-tag"; - } - - vehicleHTML += ` -
- -
-
-
${value.model}
-
-
${value.colorName}
-
Impound
-
BOLO
-
Stolen
-
Code 5
-
-
-
-
Plate: ${value.plate} · Owner: ${value.owner}
-
-
-
- `; - }); - - $(".dmv-items").html(vehicleHTML); - - canSearchForVehicles = true; - - } - } - }); - - $(".dmv-items").on("click", ".dmv-item", function () { - $.post( - `https://${GetParentResourceName()}/getVehicleData`, - JSON.stringify({ - plate: $(this).data("plate"), - }) - ); - }); - - $(".vehicle-information-title-holder").on( - "click", - ".vehicle-information-save", - function () { - if (canSaveVehicle) { - canSaveVehicle = false; - $(".vehicle-information-save").empty(); - $(".vehicle-information-save").prepend( - `` - ); - setTimeout(() => { - $(".vehicle-information-save").empty(); - $(".vehicle-information-save").html("Save"); - canSaveVehicle = true; - }, 750); - setTimeout(() => { - let dbid = $(".vehicle-information-title-holder").data( - "dbid" - ); - let plate = $(".vehicle-info-plate-input").val(); - let notes = $(".vehicle-info-content").val(); - - let imageurl = $(".vehicle-info-image").attr("src"); - let newImageurl = $(".vehicle-info-imageurl-input").val(); - if (newImageurl.includes("base64")) { - imageurl = "img/not-found.webp"; - } else { - imageurl = newImageurl; - } - - let code5 = false; - let code5tag = $(".vehicle-tags").find(".code5-tag"); - if (code5tag.hasClass("green-tag")) { - code5 = true - } - - let stolen = false; - let stolentag = $(".vehicle-tags").find(".stolen-tag"); - if (stolentag.hasClass("green-tag")) { - stolen = true - } - - let impoundInfo = {} - impoundInfo.impoundActive = $(".vehicle-tags").find(".impound-tag").hasClass("green-tag") - impoundInfo.impoundChanged = impoundChanged - if (impoundChanged === true) { - if (impoundInfo.impoundActive === true) { - impoundInfo.plate = $(".impound-plate").val(); - impoundInfo.linkedreport = $(".impound-linkedreport").val(); - impoundInfo.fee = $(".impound-fee").val(); - impoundInfo.time = $(".impound-time").val(); - } - } - - $.post( - `https://${GetParentResourceName()}/saveVehicleInfo`, - JSON.stringify({ - dbid: dbid, - plate: plate, - imageurl: imageurl, - notes: notes, - stolen: stolen, - code5: code5, - impound: impoundInfo, - }) - ); - - impoundChanged = false; - $(".vehicle-info-image").attr("src", newImageurl); - }, 250); - } - } - ); - - $(".contextmenu").on("click", ".mark-code-5", function () { - let tag = $(".vehicle-tags").find(".code5-tag"); - if (tag.hasClass("red-tag")) { - tag.removeClass("red-tag").addClass("green-tag"); - } - }); - - $(".contextmenu").on("click", ".remove-code-5", function () { - let tag = $(".vehicle-tags").find(".code5-tag"); - if (tag.hasClass("green-tag")) { - tag.removeClass("green-tag").addClass("red-tag"); - } - }); - - $(".vehicle-tags").on("contextmenu", ".code5-tag", function (e) { - let plate = $(".vehicle-info-plate-input").val(); - if (plate) { - let args = []; - if ($(this).hasClass("red-tag")) { - args = [ - { - className: "mark-code-5", - icon: "fas fa-check", - text: "Mark as Code 5", - info: plate, - status: "", - }, - ]; - } else { - args = [ - { - className: "remove-code-5", - icon: "fas fa-times", - text: "Remove Code 5 Status", - info: plate, - status: "", - }, - ]; - } - - openContextMenu(e, args); - } - }); - - $(".contextmenu").on("click", ".mark-stolen", function () { - let tag = $(".vehicle-tags").find(".stolen-tag"); - if (tag.hasClass("red-tag")) { - tag.removeClass("red-tag").addClass("green-tag"); - } - }); - - $(".contextmenu").on("click", ".remove-stolen", function () { - let tag = $(".vehicle-tags").find(".stolen-tag"); - if (tag.hasClass("green-tag")) { - tag.removeClass("green-tag").addClass("red-tag"); - } - }); - - $(".vehicle-tags").on("contextmenu", ".stolen-tag", function (e) { - let plate = $(".vehicle-info-plate-input").val(); - if (plate) { - let args = []; - if ($(this).hasClass("red-tag")) { - args = [ - { - className: "mark-stolen", - icon: "fas fa-check", - text: "Mark as Stolen", - info: plate, - status: "", - }, - ]; - } else { - args = [ - { - className: "remove-stolen", - icon: "fas fa-times", - text: "Remove Code 5 Status", - info: plate, - status: "", - }, - ]; - } - - openContextMenu(e, args); - } - }); - - $(".contextmenu").on("click", ".impound-vehicle", function () { - const plate = $(this).data("info"); - $(".impound-linkedreport").val("").removeAttr("disabled"); - $(".impound-fee").val("").removeAttr("disabled"); - $(".impound-time").val("").removeAttr("disabled"); - $(".impound-fee").css("color", "white"); - $(".impound-cancel").html("Cancel"); - $(".impound-submit").fadeIn(250); - $(".impound-form").slideDown(250); - $(".impound-form").fadeIn(250); - $(".impound-form").data("plate", plate); - $(".impound-plate").val(plate); - }); - - $(".impound-submit").click(function () { - const plate = $(".impound-plate").val(); - const linkedreport = $(".impound-linkedreport").val(); - const fee = $(".impound-fee").val(); - const time = $(".impound-time").val(); - - if (!plate || plate === "") { - $(".impound-form").css("border", "1px solid rgb(184, 3, 3)"); - setTimeout(() => { - $(".impound-form").css( - "border", - "1px solid rgb(168, 168, 168)" - ); - }, 500); - return; - } - - if (!linkedreport || linkedreport === "") { - $(".impound-form").css("border", "1px solid rgb(184, 3, 3)"); - setTimeout(() => { - $(".impound-form").css( - "border", - "1px solid rgb(168, 168, 168)" - ); - }, 500); - return; - } - - if (!fee || fee === "") { - $(".impound-form").css("border", "1px solid rgb(184, 3, 3)"); - setTimeout(() => { - $(".impound-form").css( - "border", - "1px solid rgb(168, 168, 168)" - ); - }, 500); - return; - } - - if (!time || time === "") { - $(".impound-form").css("border", "1px solid rgb(184, 3, 3)"); - setTimeout(() => { - $(".impound-form").css( - "border", - "1px solid rgb(168, 168, 168)" - ); - }, 500); - return; - } - - /* $.post( - `https://${GetParentResourceName()}/impoundVehicle`, - JSON.stringify({ - plate: plate, - linkedreport: linkedreport, - fee: fee, - time: time, - }) - ); */ - - //$(".impound-plate").val(""); - //$(".impound-linkedreport").val(""); - //$(".impound-fee").val(""); - //$(".impound-time").val(""); - //$(".impound-fee").css("color", "white"); - - $(".vehicle-tags").find(".impound-tag").addClass("green-tag").removeClass("red-tag"); - - $(".impound-form").slideUp(250); - $(".impound-form").fadeOut(250); - impoundChanged = true; - }); - - $(".impound-cancel").click(function () { - $(".impound-form").slideUp(250); - $(".impound-form").fadeOut(250); - - $(".impound-plate").val(""); - $(".impound-linkedreport").val(""); - $(".impound-fee").val(""); - $(".impound-time").val(""); - $(".impound-fee").css("color", "white"); - }); - - $(".contextmenu").on("click", ".remove-impound", function () { - const plate = $(this).data("info"); - /* $.post( - `https://${GetParentResourceName()}/removeImpound`, - JSON.stringify({ - plate: plate, - }) - ); */ - $(".impound-plate").val(""); - $(".impound-linkedreport").val(""); - $(".impound-fee").val(""); - $(".impound-time").val(""); - impoundChanged = true; - - $(".vehicle-tags") - .find(".impound-tag") - .addClass("red-tag") - .removeClass("green-tag"); - }); - - $(".contextmenu").on("click", ".status-impound", function () { - const plate = $(this).data("info"); - $.post( - `https://${GetParentResourceName()}/statusImpound`, - JSON.stringify({ - plate: plate, - }) - ); - }); - - $(".vehicle-tags").on("contextmenu", ".impound-tag", function (e) { - let plate = $(".vehicle-info-plate-input").val(); - if (plate) { - let args = []; - if ($(this).hasClass("red-tag")) { - args = [ - { - className: "impound-vehicle", - icon: "fas fa-check", - text: "State Impound", - info: plate, - status: "", - }, - ]; - } else { - args = [ - { - className: "remove-impound", - icon: "fas fa-times", - text: "Unimpound Vehicle", - info: plate, - status: "", - }, - { - className: "status-impound", - icon: "fas fa-info-circle", - text: "View Impound Status", - info: plate, - status: "", - }, - ]; - } - openContextMenu(e, args); - } - }); - - $(".contextmenu").on("click", ".view-profile", async function () { - const cid = $(this).data("info"); - fidgetSpinner(".profile-page-container"); - currentTab = ".profile-page-container"; - $(".profile-search-input").slideDown(250); - $(".profile-search-input").css("display", "block"); - $("#profile-search-input:text").val(cid.toString()); - canSearchForProfiles = false; - let result = await $.post( - `https://${GetParentResourceName()}/searchProfiles`, - JSON.stringify({ - name: cid, - }) - ); - - searchProfilesResults(result); - }); - - $(".contextmenu").on("click", ".view-incident", function () { - const incidentId = $(this).data("info"); - fidgetSpinner(".incidents-page-container"); - currentTab = ".incidents-page-container"; - setTimeout(() => { - $(".incidents-search-input").slideDown(250); - $(".incidents-search-input").css("display", "block"); - setTimeout(() => { - $("#incidents-search-input:text").val(incidentId.toString()); - canSearchForProfiles = false; - $.post( - `https://${GetParentResourceName()}/searchIncidents`, - JSON.stringify({ - incident: incidentId.toString(), - }) - ); - $(".incidents-items").empty(); - $(".incidents-items").prepend( - `
` - ); - setTimeout(() => { - $.post( - `https://${GetParentResourceName()}/getIncidentData`, - JSON.stringify({ - id: incidentId.toString(), - }) - ); - }, 250); - }, 250); - }, 250); - }); - - $(".warrants-items").on("contextmenu", ".warrants-item", function (e) { - //let information = $(this).html() - //if (information) { - args = [ - { - className: "view-profile", - icon: "far fa-eye", - text: "View Profile", - info: $(this).data("cid"), - status: "", - }, - { - className: "view-incident", - icon: "fas fa-search", - text: "View Incident", - info: $(this).data("id"), - status: "", - }, - ]; - openContextMenu(e, args); - //} - }); - - $(".contextmenu").on("click", ".toggle-duty", function () { - let info = $(this).data("info"); - let currentStatus = $(`[data-id="${info}"]`) - .find(".unit-status") - .html(); - if (currentStatus == "10-8") { - $(`[data-id="${info}"]`).find(".unit-status").html("10-7"); - $(`[data-id="${info}"]`) - .find(".unit-status") - .removeClass("green-status") - .addClass("yellow-status"); - $.post( - `https://${GetParentResourceName()}/toggleDuty`, - JSON.stringify({ - cid: info, - status: 0, - }) - ); - } else if (currentStatus == "10-7") { - $(`[data-id="${info}"]`).find(".unit-status").html("10-8"); - $(`[data-id="${info}"]`) - .find(".unit-status") - .removeClass("yellow-status") - .addClass("green-status"); - $.post( - `https://${GetParentResourceName()}/toggleDuty`, - JSON.stringify({ - cid: info, - status: 1, - }) - ); - } - }); - - $(".contextmenu").on("click", ".set-callsign", function () { - let info = $(this).data("info"); - $(".callsign-container").fadeIn(0); - $(".callsign-inner-container").slideDown(500); - $(".callsign-inner-container").fadeIn(500); - $(".callsign-container").data("id", info); - }); - - $(".contextmenu").on("click", ".set-radio", function () { - let info = $(this).data("info"); - $(".radio-container").fadeIn(0); - $(".radio-inner-container").slideDown(500); - $(".radio-inner-container").fadeIn(500); - $(".radio-container").data("id", info); - }); - - $(".contextmenu").on("click", ".set-waypoint", function () { - let info = $(this).data("info"); - $.post( - `https://${GetParentResourceName()}/setWaypointU`, - JSON.stringify({ - cid: info, - }) - ); - }); - - $(".active-unit-list").on("contextmenu", ".active-unit-item", function (e) { - let cid = $(this).data("id"); - if (cid) { - args = [ - { - className: "toggle-duty", - icon: "fas fa-thumbtack", - text: "Toggle Duty", - info: cid, - status: "", - }, - { - className: "set-callsign", - icon: "far fa-id-badge", - text: "Set Callsign", - info: cid, - status: "", - }, - { - className: "set-radio", - icon: "fas fa-broadcast-tower", - text: "Set Radio", - info: cid, - status: "", - }, - { - className: "set-waypoint", - icon: "fas fa-map-marker-alt", - text: "Set Waypoint", - info: cid, - status: "", - }, - ]; - openContextMenu(e, args); - } - }); - - $(".contextmenu").on("click", ".Set-Waypoint", function () { - const callId = $(this).data("info"); - $.post( - `https://${GetParentResourceName()}/setWaypoint`, - JSON.stringify({ - callid: callId, - }) - ); - }); - - $(".contextmenu").on("click", ".call-attach", function () { - const callId = $(this).data("info"); - $.post( - `https://${GetParentResourceName()}/callAttach`, - JSON.stringify({ - callid: callId, - }) - ); - }); - - $(".contextmenu").on("click", ".call-detach", function () { - const callId = $(this).data("info"); - $.post( - `https://${GetParentResourceName()}/callDetach`, - JSON.stringify({ - callid: callId, - }) - ); - }); - - $(".contextmenu").on("click", ".remove-blip", function () { - const callId = $(this).data("info"); - $.post( - `https://${GetParentResourceName()}/removeCallBlip`, - JSON.stringify({ - callid: callId, - }) - ); - }); - - $(".contextmenu").on("click", ".attached-units", function () { - const callId = $(this).data("info"); - $.post( - `https://${GetParentResourceName()}/attachedUnits`, - JSON.stringify({ - callid: callId, - }) - ); - }); - - $("#respondcalls").keydown(function (e) { - const keyCode = e.which || e.keyCode; - if (keyCode === 13 && !e.shiftKey) { - const callid = $(".respond-calls-container").data("id"); - e.preventDefault(); - const time = new Date(); - $.post( - `https://${GetParentResourceName()}/sendCallResponse`, - JSON.stringify({ - message: $(this).val(), - time: time.getTime(), - callid: callid, - }) - ); - $(this).val(""); - } - }); - - $(".contextmenu").on("click", ".respond-call", function () { - const callId = $(this).data("info"); - $.post( - `https://${GetParentResourceName()}/getCallResponses`, - JSON.stringify({ - callid: callId, - }) - ); - /**$(".respond-calls").fadeIn(0) - $(".respond-calls-container").fadeIn(250) - $(".close-all").css("filter", "brightness(15%)"); - $("#respondcalls").val("")*/ - }); - - $(".active-calls-list").on( - "contextmenu", - ".active-calls-item", - function (e) { - const callId = $(this).data("id"); - const canRespond = $(this).data("canrespond"); - if (callId) { - if (canRespond == true) { - args = [ - { - className: "respond-call", - icon: "fas fa-reply", - text: "Respond to Call", - info: callId, - status: "", - }, - { - className: "attached-units", - icon: "fas fa-link", - text: "Attached Units", - info: callId, - status: "", - }, - { - className: "call-detach", - icon: "fas fa-sign-out-alt", - text: "Detach", - info: callId, - status: "", - }, - { - className: "call-attach", - icon: "fas fa-sign-in-alt", - text: "Respond", - info: callId, - status: "", - }, - { - className: "Set-Waypoint", - icon: "fas fa-map-marker-alt", - text: "Set Waypoint", - info: callId, - status: "", - }, - { - className: "remove-blip", - icon: "fa-solid fa-circle-minus", - text: "Remove Blip", - info: callId, - status: "", - }, - ]; - } else if (canRespond == false) { - args = [ - { - className: "attached-units", - icon: "fas fa-link", - text: "Attached Units", - info: callId, - status: "", - }, - { - className: "call-detach", - icon: "fas fa-sign-out-alt", - text: "Detach", - info: callId, - status: "", - }, - { - className: "call-attach", - icon: "fas fa-sign-in-alt", - text: "Respond", - info: callId, - status: "", - }, - { - className: "Set-Waypoint", - icon: "fas fa-map-marker-alt", - text: "Set Waypoint", - info: callId, - status: "", - }, - { - className: "remove-blip", - icon: "fa-solid fa-circle-minus", - text: "Remove Blip", - info: callId, - status: "", - }, - ]; - } - - openContextMenu(e, args); - } - } - ); - - $(".contextmenu").on("click", ".call-dispatch-detach", function () { - const cid = $(this).data("info"); - $.post( - `https://${GetParentResourceName()}/callDispatchDetach`, - JSON.stringify({ - callid: $(".dispatch-attached-units-container").attr("id"), - cid: cid, - }) - ); - $(".dispatch-attached-unit-item").filter(`[data-id="${cid}"]`).remove(); - }); - - $(".contextmenu").on("click", ".Set-Dispatch-Waypoint", function () { - const cid = $(this).data("info"); - $.post( - `https://${GetParentResourceName()}/setDispatchWaypoint`, - JSON.stringify({ - callid: $(".dispatch-attached-units-container").attr("id"), - cid: cid, - }) - ); - }); - - $(".dispatch-attached-units-holder").on( - "contextmenu", - ".dispatch-attached-unit-item", - function (e) { - const cid = $(this).data("id"); - if (cid) { - args = [ - { - className: "set-waypoint", - icon: "fas fa-map-marker-alt", - text: "Set Waypoint", - info: cid, - status: "", - }, - ]; - openContextMenu(e, args); - } - } - ); - - $(".contextmenu").on("click", ".dispatch-reply", function () { - const callsign = $(this).data("info"); - const currVal = $(".dispatch-input").val(); - if (currVal === "") { - $(".dispatch-input").val(callsign + " "); - } else { - $(".dispatch-input").val(currVal + " " + callsign + " "); - } - $(".dispatch-input").focus(); - }); - - $(".dispatch-items").on( - "contextmenu", - ".dispatch-item-message", - function (e) { - const Callsign = $(this).data("author"); - - var mySubString = Callsign.substring( - Callsign.indexOf("(") + 1, - Callsign.lastIndexOf(")") - ); - - args = [ - { - className: "dispatch-reply", - icon: "fas fa-reply", - text: "Reply", - info: mySubString, - status: "", - }, - ]; - openContextMenu(e, args); - } - ); - - $(".callsign-buttons").on("click", ".callsign-cancel", function () { - $(".callsign-inner-container").slideUp(500); - $(".callsign-inner-container").fadeOut(500); - setTimeout(() => { - $(".callsign-container").slideUp(500); - $(".callsign-container").fadeOut(500); - $(".callsign-input").val(""); - }, 500); - }); - - $(".callsign-buttons").on("click", ".callsign-submit", function () { - const callsign = $(".callsign-input").val(); - if (callsign.length > 2) { - let editingcallsign = $(".callsign-container").data("id"); - let name = $(`[data-id="${editingcallsign}"]`) - .find(".unit-name") - .html() - .replace(/\s*(?:\[[^\]]*\]|\([^)]*\))\s*/g, ""); - let newunitname = `(${callsign}) ${name}`; - $(`[data-id="${editingcallsign}"]`) - .find(".unit-name") - .html(newunitname); - $.post( - `https://${GetParentResourceName()}/setCallsign`, - JSON.stringify({ - cid: editingcallsign, - newcallsign: callsign, - }) - ); - - $(".callsign-inner-container").slideUp(500); - $(".callsign-inner-container").fadeOut(500); - setTimeout(() => { - $(".callsign-container").slideUp(500); - $(".callsign-container").fadeOut(500); - $(".callsign-input").val(""); - }, 500); - } - }); - - $(".radio-buttons").on("click", ".radio-cancel", function () { - $(".radio-inner-container").slideUp(500); - $(".radio-inner-container").fadeOut(500); - setTimeout(() => { - $(".radio-container").slideUp(500); - $(".radio-container").fadeOut(500); - $(".radio-input").val(""); - }, 500); - }); - - $(".radio-buttons").on("click", ".radio-submit", function () { - const radio = $(".radio-input").val(); - if (radio.length > 0) { - let editingradio = $(".radio-container").data("id"); - let newunitname = `${radio}`; - $(`[data-id="${editingradio}"]`) - .find(".unit-radio") - .html(newunitname); - $.post( - `https://${GetParentResourceName()}/setRadio`, - JSON.stringify({ - cid: editingradio, - newradio: radio, - }) - ); - - $(".radio-inner-container").slideUp(500); - $(".radio-inner-container").fadeOut(500); - setTimeout(() => { - $(".radio-container").slideUp(500); - $(".radio-container").fadeOut(500); - $(".radio-input").val(""); - }, 500); - } - }); - - $(".cams-items").click(function () { - var camId = this.id; - $.post( - `https://${GetParentResourceName()}/openCamera`, - JSON.stringify({ - cam: camId, - }) - ); - $.post(`https://${GetParentResourceName()}/escape`, JSON.stringify({})); - }) - - var draggedElement = 0; - var dragging = false; - - $(".active-unit-list").on("click", ".active-unit-item", function (e) { - if (dragging) { - $("#draggedItem").css("opacity", 0.0); - document.getElementById("draggedItem").innerHTML = ""; - dragging = false; - } else { - dragging = true; - draggedElement = $(this).data("id"); - let draggedItemHtml = $(this).html(); - document.getElementById("draggedItem").innerHTML = draggedItemHtml; - document.getElementById("draggedItem").style.left = "cursorX-50"; - document.getElementById("draggedItem").style.top = "cursorY-50"; - document.getElementById("draggedItem").style.opacity = "0.5"; - } - }); - - document.onmousemove = handleMouseMove; - - function handleMouseMove(event) { - let dot, eventDoc, doc, body, pageX, pageY; - event = event || window.event; // IE-ism - if (event.pageX == null && event.clientX != null) { - eventDoc = (event.target && event.target.ownerDocument) || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = - event.clientX + - ((doc && doc.scrollLeft) || (body && body.scrollLeft) || 0) - - ((doc && doc.clientLeft) || (body && body.clientLeft) || 0); - event.pageY = - event.clientY + - ((doc && doc.scrollTop) || (body && body.scrollTop) || 0) - - ((doc && doc.clientTop) || (body && body.clientTop) || 0); - } - - if (dragging) { - cursorX = event.pageX; - cursorY = event.pageY; - document.getElementById("draggedItem").style.left = - "" + cursorX - 50 + "px"; - document.getElementById("draggedItem").style.top = - "" + cursorY - 50 + "px"; - } - } - - $(".active-calls-list").on("click", ".active-calls-item", function (e) { - const callId = $(this).data("id"); - $("#draggedItem").css("opacity", 0.0); - document.getElementById("draggedItem").innerHTML = ""; - dragging = false; - if (callId && draggedElement) { - $.post( - `https://${GetParentResourceName()}/callDragAttach`, - JSON.stringify({ - callid: callId, - cid: draggedElement, - }) - ); - draggedElement = 0; - } - }); - - function JobColors(sentJob) { - if (sentJob) { - if (PoliceJobs[sentJob] !== undefined) { - document.documentElement.style.setProperty( - "--color-1", - "#1E3955" - ); - document.documentElement.style.setProperty( - "--color-2", - "#213F5F" - ); - document.documentElement.style.setProperty( - "--color-3", - "#2C537B" - ); - document.documentElement.style.setProperty( - "--color-4", - "#23405E" - ); - document.documentElement.style.setProperty( - "--color-5", - "#152638" - ); - document.documentElement.style.setProperty( - "--color-6", - "#121f2c" - ); - document.documentElement.style.setProperty( - "--color-7", - "rgb(28, 54, 82)" - ); - document.documentElement.style.setProperty( - "--color-8", - "#2554cc" - ); - document.documentElement.style.setProperty( - "--color-9", - "#6E707C" - ); - document.documentElement.style.setProperty( - "--color-10", - "#8f741b" - ); - $(".badge-logo").attr("src", "img/sasp_badge.png"); - $(".header-title").html("SAN ANDREAS STATE POLICE"); - $(".bolo-nav-item").html("BOLOs"); - $(".bolos-search-title").html("Bolos"); - $("#bolos-search-input").attr("placeholder", "Search Bolo..."); - $(".manage-bolos-title").html("Manage Bolo"); - $(".manage-bolos-editing-title").html( - "You are currently creating a new BOLO" - ); - $(".boloplate-title").html("Plate"); - $(".boloowner-title").html("Owner"); - $(".boloindividual-title").html("Individual"); - $("#boloplate").attr("placeholder", "Place plate here..."); - $("#bolodetail").attr( - "placeholder", - "Bolo detail goes here..." - ); - $("#boloowner").attr( - "placeholder", - "Place vehicle owner here..." - ); - $("#boloindividual").attr( - "placeholder", - "Place invidivual here..." - ); - $("#home-warrants-container").fadeIn(0); - $("#home-reports-container").fadeOut(0); - //$(".quote-span").html("TUCKER MALD, BEST MALD"); - $(".incidents-nav-item").show(); - $(".bolo-nav-item").show(); - $(".dmv-nav-item").show(); - $(".cams-nav-item").show(); - $(".dispatch-title-ofsomesort").html("Dispatch"); - $(".dispatch-comms-container").fadeIn(0); - $(".manage-profile-name-input-1").attr("readonly", true); - $(".manage-profile-name-input-2").attr("readonly", true); - $("#reports-officers-involved-tag-title").html( - "Officers Involved" - ); - $(".roster-iframe").attr("src", rosterLink); - - $(".manage-profile-save").css("display", "block"); - $(".manage-profile-editing-title").css("display", "block"); - $(".manage-incidents-create").css("display", "block"); - $(".manage-incidents-save").css("display", "block"); - $(".manage-incidents-editing-title").css("display", "block"); - $(".manage-reports-new").css("display", "block"); - $(".manage-reports-save").css("display", "block"); - $(".manage-reports-editing-title").css("display", "block"); - $(".vehicle-information-save").css("display", "block"); - $(".vehicle-information-title").css("margin-right", "0px").css("width", "81%"); - $(".manage-incidents-title ").css("margin-right", "0px") - $(".manage-reports-title").css("margin-right", "0px").css("width", "66%"); - } else if (AmbulanceJobs[sentJob] !== undefined) { - $("#home-warrants-container").fadeOut(0); - $("#home-reports-container").fadeIn(0); - document.documentElement.style.setProperty( - "--color-1", - "#5F2121" - ); - document.documentElement.style.setProperty( - "--color-2", - "#7B2C2C" - ); - document.documentElement.style.setProperty( - "--color-3", - "#4A1C1C" - ); - document.documentElement.style.setProperty( - "--color-4", - "#5E2323" - ); - document.documentElement.style.setProperty( - "--color-5", - "#381515" - ); - document.documentElement.style.setProperty( - "--color-6", - "#2C1212" - ); - document.documentElement.style.setProperty( - "--color-7", - "#521C1C" - ); - document.documentElement.style.setProperty( - "--color-8", - "#CC2525" - ); - document.documentElement.style.setProperty( - "--color-9", - "#8A8D91" - ); - document.documentElement.style.setProperty( - "--color-10", - "#444444" - ); - $(".badge-logo").attr("src", "img/ems_badge.png"); - $(".header-title").html("PILLBOX HILL MEDICAL CENTER"); - //$(".quote-span").html("The simplest explanation is almost always somebody screwed up."); - $(".bolo-nav-item").html("ICU"); - $(".bolos-search-title").html("ICU Check-ins"); - $("#bolos-search-input").attr( - "placeholder", - "Search Check-ins..." - ); - $(".manage-bolos-title").html("Manage ICU Check-in"); - $(".manage-bolos-editing-title").html( - "You are creating a new ICU Check-in" - ); - $(".boloplate-title").html("Estimated Recovery"); - $(".boloowner-title").html("Emergency Contact"); - $(".boloindividual-title").html("Patient"); - $("#boloplate").attr( - "placeholder", - "Enter recovery time here..." - ); - $("#bolodetail").attr( - "placeholder", - "Enter ICU Check-in details here..." - ); - $("#boloowner").attr( - "placeholder", - "Enter emergency contact here..." - ); - $("#boloindividual").attr( - "placeholder", - "Enter patient name and CID here..." - ); - $(".incidents-nav-item").hide(); - $(".dmv-nav-item").hide(); - $(".cams-nav-item").hide(); - $("#reports-officers-involved-tag-title").html("EMS Involved"); - $(".dispatch-title-ofsomesort").html("Dispatch"); - $(".dispatch-comms-container").fadeIn(0); - $(".manage-profile-name-input-1").attr("readonly", true); - $(".manage-profile-name-input-2").attr("readonly", true); - $(".roster-iframe").attr("src", rosterLink); - - $(".manage-profile-save").css("display", "block"); - $(".manage-profile-editing-title").css("display", "block"); - $(".manage-incidents-create").css("display", "block"); - $(".manage-incidents-save").css("display", "block"); - $(".manage-incidents-editing-title").css("display", "block"); - $(".manage-reports-new").css("display", "block"); - $(".manage-reports-save").css("display", "block"); - $(".manage-reports-editing-title").css("display", "block"); - $(".vehicle-information-save").css("display", "block"); - $(".vehicle-information-title").css("margin-right", "0px").css("width", "81%"); - $(".manage-incidents-title ").css("margin-right", "0px") - $(".manage-reports-title").css("margin-right", "0px").css("width", "66%"); - } else if (DojJobs[sentJob] !== undefined) { - document.documentElement.style.setProperty( - "--color-1", - "#553a1e" - ); - document.documentElement.style.setProperty( - "--color-2", - "#5f4321" - ); - document.documentElement.style.setProperty( - "--color-3", - "#7b552c" - ); - document.documentElement.style.setProperty( - "--color-4", - "#5e4123" - ); - document.documentElement.style.setProperty( - "--color-5", - "#382815" - ); - document.documentElement.style.setProperty( - "--color-6", - "#2c2312" - ); - document.documentElement.style.setProperty( - "--color-7", - "rgb(82, 60, 28)" - ); - document.documentElement.style.setProperty( - "--color-8", - "#cc9225" - ); - $(".badge-logo").attr("src", "img/court.png"); - $(".header-title").html("DEPARTMENT OF JUSTICE"); - //$(".quote-span").html("Actually useless."); - //$(".dmv-nav-item").hide(); - $(".bolo-nav-item").hide(); - $(".dispatch-title-ofsomesort").html("Message Board"); - $(".dispatch-comms-container").fadeOut(0); - $(".manage-profile-name-input-1").attr("readonly", false); - $(".manage-profile-name-input-2").attr("readonly", false); - $("#home-warrants-container").css("height", "98%"); - $(".roster-iframe").attr("src", rosterLink); - - $(".manage-profile-save").css("display", "none"); - $(".manage-profile-editing-title").css("display", "none"); - $(".manage-incidents-create").css("display", "none"); - $(".manage-incidents-title").css("margin-right", "auto"); - $(".manage-incidents-title").css("width", "95%"); - $(".manage-incidents-save").css("display", "none"); - $(".manage-incidents-editing-title").css("display", "none"); - $(".manage-reports-new").css("display", "none"); - $(".manage-reports-save").css("display", "none"); - $(".manage-reports-editing-title").css("display", "none"); - $(".vehicle-information-save").css("display", "none"); - $(".vehicle-information-title").css("margin-right", "auto").css("width", "95%"); - $(".manage-incidents-title ").css("margin-right", "auto") - $(".manage-reports-title").css("margin-right", "auto").css("width", "95%"); - } - } - } -{/*
ID: ${value.id}
*/} - window.addEventListener("message", function (event) { - let eventData = event.data; - $(".dispatch-msg-notif").fadeIn(500); - if (eventData.type == "show") { - if (eventData.enable == true) { - rosterLink = eventData.rosterLink; - playerJob = eventData.job; - JobColors(playerJob); - $(".quote-span").html(randomizeQuote()); - if (PoliceJobs[playerJob] !== undefined || DojJobs[playerJob] !== undefined) { - $(".manage-profile-licenses-container").removeClass("display_hidden"); - $(".manage-convictions-container").removeClass("display_hidden"); - $(".manage-profile-vehs-container").removeClass("display_hidden"); - $(".manage-profile-houses-container").removeClass("display_hidden"); - } - - /* if (PoliceJobs[playerJob] !== undefined || AmbulanceJobs[playerJob] !== undefined) { - $(".manage-profile-save").css("display", "block"); - $(".manage-profile-editing-title").css("display", "block"); - $(".manage-incidents-create").css("display", "block"); - $(".manage-incidents-save").css("display", "block"); - $(".manage-incidents-editing-title").css("display", "block"); - $(".manage-reports-new").css("display", "block"); - $(".manage-reports-save").css("display", "block"); - $(".manage-reports-editing-title").css("display", "block"); - } else if (DojJobs[playerJob] !== undefined) { - $(".manage-profile-save").css("display", "none"); - $(".manage-profile-editing-title").css("display", "none"); - $(".manage-incidents-create").css("display", "none"); - $(".manage-incidents-save").css("display", "none"); - $(".manage-incidents-editing-title").css("display", "none"); - $(".manage-reports-new").css("display", "none"); - $(".manage-reports-save").css("display", "none"); - $(".manage-reports-editing-title").css("display", "none"); - } */ - - $("body").fadeIn(0); - $(".close-all").css("filter", "none"); - $(".close-all").fadeOut(0); - if (!currentTab) { - currentTab = ".dashboard-page-container"; - } - $(currentTab).slideDown(250); - timeShit(); - } else { - $(".callsign-inner-container").fadeOut(0); - $(".callsign-container").fadeOut(0); - $(".radio-inner-container").fadeOut(0); - $(".radio-container").fadeOut(0); - $(".icidents-person-search-container").fadeOut(0); - $(".dispatch-attached-units").fadeOut(0); - $(".respond-calls").fadeOut(0); - $(".respond-calls-container").fadeOut(0); - $("body").slideUp(250); - $(".close-all").slideUp(250); - } - } else if (eventData.type == "data") { - $(".name-shit").html(eventData.name); - $(".header-location").html(" " + eventData.location); - MyName = eventData.fullname; - - $(".bulletin-items-continer").empty(); - $.each(eventData.bulletin, function (index, value) { - $( - ".bulletin-items-continer" - ).prepend(`
-
${value.title}
-
${value.desc}
-
-
${value.author - } - ${timeAgo(Number(value.time))}
-
-
`); - }); - - let policeCount = 0; - let emsCount = 0; - let dojCount = 0; - let fireCount = 0; - - let activeUnits = eventData.activeUnits; - let cid = eventData.citizenid; - let onDutyOnly = eventData.ondutyonly; - $(".active-unit-list").html(' '); - let unitListHTML = ''; - - activeUnits = Object.values(activeUnits) - activeUnits.forEach((unit) => { - if (onDutyOnly && unit.duty == 0 && unit.cid != cid) { - return - } - let status = unit.duty == 1 ? "10-8" : '10-7'; - let statusColor = unit.duty == 1 ? "green-status" : 'yellow-status'; - let radioBack = unit.sig100 ? "#7b2c2c" : "var(--color-3)"; - let radio = unit.radio ? unit.radio : "0"; - let callSign = unit.callSign ? unit.callSign : "000"; - let activeInfoJob = `
UNKNOWN
`; - if (PoliceJobs[unit.unitType] !== undefined) { - policeCount++; - activeInfoJob = `
LSPD
`; - } else if (AmbulanceJobs[unit.unitType] !== undefined) { - activeInfoJob = `
Ambulance
` - emsCount++; - /* } else if (DojJobs[unit.unitType] !== undefined) { - activeInfoJob = `
FIRE
` - fireCount++; */ - } else if (DojJobs[unit.unitType] !== undefined) { - activeInfoJob = `
DOJ
` - dojCount++; - } - - unitListHTML += ` -
-
${status}
- ${activeInfoJob} -
(${callSign}) ${unit.firstName} ${unit.lastName}
-
${radio}
-
- `; - }); - - $(".active-unit-list").html(unitListHTML) - - - $("#police-count").html(policeCount); - $("#ems-count").html(emsCount); - $("#doj-count").html(dojCount); - $("#fire-count").html(fireCount); - /* } else if (eventData.type == "bulletin") { - $(".bulletin-items-continer").empty(); - $.each(eventData.data, function (index, value) { - $( - ".bulletin-items-continer" - ).prepend(`
-
${value.title}
-
${value.desc}
-
-
ID: ${value.id}
-
${value.author - } - ${timeAgo(Number(value.time))}
-
-
`); - }); */ - } else if (eventData.type == "newBulletin") { - const value = eventData.data; - $(".bulletin-items-continer") - .prepend(`
-
${value.title}
-
${value.info}
-
-
ID: ${value.id}
-
${value.author} - ${timeAgo( - Number(value.time) - )}
-
-
`); - } else if (eventData.type == "deleteBulletin") { - $(".bulletin-items-continer") - .find("[data-id='" + eventData.data + "']") - .remove(); - } else if (eventData.type == "warrants") { - $(".warrants-items").empty(); - $.each(eventData.data, function (index, value) { - $('.warrants-items').prepend(`
-
-
${value.name}
-
-
-
Incident ID: ${value.linkedincident}
-
-
`) - }) - } else if (eventData.type == "dispatchmessages") { - const table = eventData.data; - LastName = ""; - DispatchNum = 0; - $(".dispatch-items").empty(); - $.each(table, function (index, value) { - DispatchNum = DispatchNum + 1; - if (LastName == value.name) { - $(".dispatch-items").append(` -
-
${value.message}
-
- `); - } else { - if (DispatchNum == 1) { - $(".dispatch-items") - .append(`
- -
-
${value.name - } ${timeAgo( - Number(value.time) - )}
-
${value.message}
-
-
`); - } else { - $(".dispatch-items") - .append(`
- -
-
${value.name - } ${timeAgo( - Number(value.time) - )}
-
${value.message}
-
-
`); - } - } - LastName = value.name; - $(".dispatch-items").scrollTop( - $(".dispatch-items")[0].scrollHeight - ); - }); - $(".dispatch-items").scrollTop( - $(".dispatch-items")[0].scrollHeight - ); - } else if (eventData.type == "dispatchmessage") { - const value = eventData.data; - DispatchNum = DispatchNum + 1; - const BodyDisplay = $("body").css("display"); - if (BodyDisplay == "block") { - if (LastName == value.name) { - $(".dispatch-items").append(` -
-
${value.message}
-
- `); - } else { - if (DispatchNum == 1) { - $(".dispatch-items") - .append(`
- -
-
${value.name - } ${timeAgo( - Number(value.time) - )}
-
${value.message}
-
-
`); - } else { - $(".dispatch-items") - .append(`
- -
-
${value.name - } ${timeAgo( - Number(value.time) - )}
-
${value.message}
-
-
`); - } - } - LastName = value.name; - } else if (BodyDisplay == "none") { - $.post( - `https://${GetParentResourceName()}/dispatchNotif`, - JSON.stringify({ - data: value, - }) - ); - } - $(".dispatch-items").scrollTop( - $(".dispatch-items")[0].scrollHeight - ); - } else if (eventData.type == "call") { - const value = eventData.data; - if (value && value.job.includes(playerJob)) { - const prio = value["priority"]; - let DispatchItem = `
#${value.callId}
${value.dispatchCode}
${value.dispatchMessage}
${value.units.length}
`; - - if ( - value.dispatchCode == "911" || - value.dispatchCode == "311" - ) { - DispatchItem = `
#${value.callId}
${value.dispatchCode}
${value.dispatchMessage}
${value.units.length}
`; - } - - if (value["time"]) { - DispatchItem += `
${timeAgo( - value.time - )}
`; - } - - if (value["firstStreet"]) { - DispatchItem += `
${value.firstStreet}
`; - } - - if (value["callsign"]) { - DispatchItem += `
${value.callsign}
`; - } - - if (value["doorCount"]) { - DispatchItem += `
${value.doorCount}
`; - } - - if (value["speed"]) { - DispatchItem += `
${value.speed}
`; - } - - if (value["weapon"]) { - DispatchItem += `
${value.weapon}
`; - } - - if (value["heading"]) { - DispatchItem += `
${value.heading}
`; - } - - if (value["gender"]) { - let gender = "Male"; - if (value["gender"] == 0 || value["gender"] == 2) { - gender = "Female"; - } - DispatchItem += `
${gender}
`; - } - - if (value["model"] && value["plate"]) { - DispatchItem += `
${value["model"]}${value["plate"]}
`; - } else if (value["plate"]) { - DispatchItem += `
${value["plate"]}
`; - } else if (value["model"]) { - DispatchItem += `
${value["model"]}
`; - } - - if (value["firstColor"]) { - DispatchItem += `
${value["firstColor"]}
`; - } - - if (value["automaticGunfire"] == true) { - DispatchItem += `
Automatic Gunfire
`; - } - - if (value["name"] && value["number"]) { - DispatchItem += `
${value["name"]}${value["number"]}
`; - } else if (value["number"]) { - DispatchItem += `
${value["number"]}
`; - } else if (value["name"]) { - DispatchItem += `
${value["name"]}
`; - } - - if (value["information"]) { - DispatchItem += `
${value["information"]}
`; - } - - DispatchItem += `
`; - $(".active-calls-list").prepend( - $(DispatchItem).hide().fadeIn("slow") - ); - } - } else if (eventData.type == "attachedUnits") { - const table = eventData.data; - if (table) { - $(".dispatch-attached-units").fadeIn(0); - $(".dispatch-attached-units-container").fadeIn(250); - $(".close-all").css("filter", "brightness(15%)"); - $(".dispatch-attached-units-holder").empty(); - $.each(table, function (index, value) { - $( - ".dispatch-attached-units-holder" - ).prepend(`
-
${value.job}
-
(${value.callsign}) ${value.fullname}
-
1
-
`); - }); - setTimeout(() => { - $(".dispatch-attached-units-container").attr( - "id", - eventData.callid - ); - }, 1000); - } - } else if (eventData.type == "sendCallResponse") { - if ($(".respond-calls-container").data("id") == eventData.callid) { - $(".respond-calls-responses").prepend( - `
${eventData["name"] - } responded "${eventData["message"]}" - ${timeAgo( - Number(eventData.time) - )}.
` - ); - } - } else if (eventData.type == "getCallResponses") { - const table = eventData.data; - $(".respond-calls").fadeIn(0); - $(".respond-calls-container").fadeIn(250); - $(".close-all").css("filter", "brightness(15%)"); - $("#respondcalls").val(""); - $(".respond-calls-responses").empty(); - setTimeout(() => { - $(".respond-calls-container").data("id", eventData.callid); - }, 1000); - $.each(table, function (index, value) { - $(".respond-calls-responses").prepend( - `
${value["name"] - } responded "${value["message"]}" - ${timeAgo( - Number(value.time) - )}.
` - ); - }); - } else if (eventData.type == "calls") { - const table = eventData.data; - $(".active-calls-list").empty(); - $.each(table, function (index, value) { - if (value && value.job.includes(playerJob)) { - const prio = value["priority"]; - let DispatchItem = `
#${value.callId}
${value.dispatchCode}
${value.dispatchMessage}
${value.units.length}
`; - - if ( - value.dispatchCode == "911" || - value.dispatchCode == "311" - ) { - DispatchItem = `
#${value.callId}
${value.dispatchCode}
${value.dispatchMessage}
${value.units.length}
`; - } - - if (value["time"]) { - DispatchItem += `
${timeAgo( - value.time - )}
`; - } - - if (value["firstStreet"]) { - DispatchItem += `
${value.firstStreet}
`; - } - - if (value["heading"]) { - DispatchItem += `
${value.heading}
`; - } - - if (value["weapon"]) { - DispatchItem += `
${value.weapon}
`; - } - - if (value["gender"]) { - let gender = "Male"; - if (value["gender"] == 0 || value["gender"] == 2) { - gender = "Female"; - } - DispatchItem += `
${gender}
`; - } - - if (value["model"] && value["plate"]) { - DispatchItem += `
${value["model"]}${value["plate"]}
`; - } else if (value["plate"]) { - DispatchItem += `
${value["plate"]}
`; - } else if (value["model"]) { - DispatchItem += `
${value["model"]}
`; - } - - if (value["firstColor"]) { - DispatchItem += `
${value["firstColor"]}
`; - } - - if (value["automaticGunfire"] == true) { - DispatchItem += `
Automatic Gunfire
`; - } - - if (value["name"] && value["number"]) { - DispatchItem += `
${value["name"]}${value["number"]}
`; - } else if (value["number"]) { - DispatchItem += `
${value["number"]}
`; - } else if (value["name"]) { - DispatchItem += `
${value["name"]}
`; - } - - if (value["information"]) { - DispatchItem += `
${value["information"]}
`; - } - - DispatchItem += `
`; - $(".active-calls-list").prepend( - $(DispatchItem).hide().fadeIn("slow") - ); - } - }); - } else if (eventData.type == "incidents") { - let table = eventData.data; - canSearchForProfiles = true; - $(".incidents-items").empty(); - $.each(table, function (index, value) { - $(".incidents-items").append( - `
-
-
${value.title}
-
Incident Report
-
-
-
ID: ${value.id}
-
${value.author - } - ${timeAgo(Number(value.time))}
-
-
` - ); - }); - } else if (eventData.type == "getPenalCode") { - const titles = eventData.titles; - const penalcode = eventData.penalcode; - $(".offenses-main-container").empty(); - $.each(titles, function (index, value) { - $(".offenses-main-container").append( - `
-
${value}
-
-
-
- ` - ); - }); - $.each(penalcode, function (index, value) { - $.each(value, function (i, v) { - $(`#penal-${index}`).append(` -
-
-
${v.title}
-
${v.class}
-
-
-
${v.id}
-
${v.months} Months - $${v.fine}
-
- `); - }); - }); - } else if (eventData.type == "incidentData") { - let table = eventData.data; - - $(".incidents-ghost-holder").html(""); - $(".associated-incidents-tags-holder").html(""); - - $(".manage-incidents-editing-title").html( - "You are currently editing incident " + table["id"] - ); - $(".manage-incidents-editing-title").data( - "id", - Number(table["id"]) - ); - - $(".manage-incidents-tags-add-btn").css("pointer-events", "auto"); - $(".manage-incidents-reports-content").css( - "pointer-events", - "auto" - ); - $(".manage-incidents-officers-add-btn").css( - "pointer-events", - "auto" - ); - $(".manage-incidents-civilians-add-btn").css( - "pointer-events", - "auto" - ); - $(".manage-incidents-evidence-add-btn").css( - "pointer-events", - "auto" - ); - $(".associated-incidents-tags-add-btn").css( - "pointer-events", - "auto" - ); - - $("#manage-incidents-title-input").val(table["title"]); - $(".manage-incidents-reports-content").val(table["details"]); - - $(".manage-incidents-tags-holder").empty(); - $.each(table["tags"], function (index, value) { - $(".manage-incidents-tags-holder").append( - `
${value}
` - ); - }); - - $(".manage-incidents-officers-holder").empty(); - $.each(table["officersinvolved"], function (index, value) { - $(".manage-incidents-officers-holder").append( - `
${value}
` - ); - }); - - $(".manage-incidents-civilians-holder").empty(); - $.each(table["civsinvolved"], function (index, value) { - $(".manage-incidents-civilians-holder").append( - `
${value}
` - ); - }); - - $(".manage-incidents-evidence-holder").empty(); - $.each(table["evidence"], function (index, value) { - $(".manage-incidents-evidence-holder").append( - `` - ); - }); - - $(".manage-incidents-title-holder").empty(); - if (PoliceJobs[playerJob] !== undefined || AmbulanceJobs[playerJob] !== undefined) { - $(".manage-incidents-title-holder").prepend( - ` -
Manage Incident
-
-
- ` - ); - $(".manage-incidents-title").css("width", "66%"); - $(".manage-incidents-create").css("margin-right", "0px"); - } else if (DojJobs[playerJob] !== undefined) { - $(".manage-incidents-title-holder").prepend( - ` -
Manage Incident
- ` - ); - $(".manage-incidents-title").css("width", "95%"); - } - - let associateddata = eventData.convictions; - $.each(associateddata, function (index, value) { - $(".associated-incidents-tags-holder").prepend( - `
${value.name}
` - ); - - var warrantTag = "red-tag"; - var guiltyTag = "red-tag"; - var processedTag = "red-tag"; - var associatedTag = "red-tag"; - - if (value.warrant == 1) { - warrantTag = "green-tag"; - } - if (value.guilty == 1) { - guiltyTag = "green-tag"; - } - if (value.processed == 1) { - processedTag = "green-tag"; - } - if (value.associated == 1) { - associatedTag = "green-tag"; - } - - const cid = value.cid; - - if (value.associated == 1) { - $(".incidents-ghost-holder").prepend( - `
-
${value.name} (#${value.cid})
-
-
Warrant
-
Guilty
-
Processed
-
Associated
-
- - - - - - - - - -
` - ); - } else { - $(".incidents-ghost-holder").prepend( - `
-
${value.name} (#${value.cid})
-
-
Warrant
-
Guilty
-
Processed
-
Associated
-
-
-
-
Recommended Fine
-
-
Recommended Sentence
-
-
Fine
-
-
Sentence
-
-
` - ); - } - - $(".fine-amount") - .filter("[data-id='" + value.cid + "']") - .val(value.fine); - - $(".sentence-amount") - .filter("[data-id='" + value.cid + "']") - .val(value.sentence); - - $(".fine-recommended-amount") - .filter("[data-id='" + value.cid + "']") - .val(value.recfine); - - $(".sentence-recommended-amount") - .filter("[data-id='" + value.cid + "']") - .val(value.recsentence); - - const charges = value["charges"]; - for (var i = 0; i < charges.length; i++) { - const randomNum = Math.ceil( - Math.random() * 1000 - ).toString(); - $(`[data-name="${cid}"]`).prepend( - `
${charges[i]}
` - ); - } - }); - } else if (eventData.type == "incidentSearchPerson") { - let table = eventData.data; - $(".icidents-person-search-holder").empty(); - $.each(table, function (index, value) { - let name = value.firstname + " " + value.lastname; - $(".icidents-person-search-holder").prepend( - ` -
- -
-
Citizen ID
-
${value.id}
-
Name
-
${name}
-
-
- ` - ); - }); - } else if (eventData.type == "boloData") { - let table = eventData.data; - $(".manage-bolos-editing-title").html( - "You are currently editing BOLO " + table["id"] - ); - - if ($(".badge-logo").attr("src") == "img/ems_badge.png") { - $(".manage-bolos-editing-title").html( - "You are editing ICU Check-in " + table["id"] - ); - } - - $(".manage-bolos-editing-title").data("id", Number(table["id"])); - - $(".manage-bolos-input-title").val(table["title"]); - $(".manage-bolos-input-plate").val(table["plate"]); - $(".manage-bolos-input-owner").val(table["owner"]); - $(".manage-bolos-input-individual").val(table["individual"]); - - $(".manage-bolos-reports-content").val(table["detail"]); - - $(".manage-bolos-tags-holder").empty(); - $.each(table["tags"], function (index, value) { - $(".manage-bolos-tags-holder").prepend( - `
${value}
` - ); - }); - - $(".bolo-gallery-inner-container").empty(); - $.each(table["gallery"], function (index, value) { - let randomNum = Math.ceil(Math.random() * 10).toString(); - $(".bolo-gallery-inner-container").prepend( - `` - ); - }); - - $(".manage-officers-tags-holder").empty(); - $.each(table["officersinvolved"], function (index, value) { - $(".manage-officers-tags-holder").prepend( - `
${value}
` - ); - }); - } else if (eventData.type == "bolos") { - let table = eventData.data; - var reportName = "General BOLO"; - canSearchForProfiles = true; - $(".bolos-items").empty(); - if ($(".badge-logo").attr("src") == "img/ems_badge.png") { - reportName = "ICU Check-in"; - } - $.each(table, function (index, value) { - $(".bolos-items").prepend( - `
-
-
${value.title}
-
${reportName}
-
-
-
ID: ${value.id}
-
${value.author - } - ${timeAgo(Number(value.time))}
-
-
` - ); - }); - } else if (eventData.type == "boloComplete") { - let id = eventData.data; - if (canRefreshBolo == true) { - canRefreshBolo = false; - $(".bolos-search-refresh").empty(); - $(".bolos-search-refresh").prepend( - `` - ); - setTimeout(() => { - $(".bolos-search-refresh").empty(); - $(".bolos-search-refresh").html("Refresh"); - canRefreshBolo = true; - $.post(`https://${GetParentResourceName()}/getAllBolos`, JSON.stringify({})); - }, 1500); - } - $(".manage-bolos-editing-title").html( - "You are currently editing BOLO " + id - ); - $(".manage-bolos-editing-title").data("id", Number(id)); - } else if (eventData.type == "reportComplete") { - let id = eventData.data; - if (canRefreshReports == true) { - canRefreshReports = false; - $(".reports-search-refresh").empty(); - $(".reports-search-refresh").prepend( - `` - ); - setTimeout(() => { - $(".reports-search-refresh").empty(); - $(".reports-search-refresh").html("Refresh"); - canRefreshReports = true; - $.post(`https://${GetParentResourceName()}/getAllReports`, JSON.stringify({})); - }, 1500); - } - $(".manage-reports-editing-title").html( - "You are currently editing report " + id - ); - $(".manage-reports-editing-title").data("id", Number(id)); - } else if (eventData.type == "reports") { - let table = eventData.data; - canSearchForReports = true; - $(".reports-items").empty(); - $.each(table, function (index, value) { - $(".reports-items").append( - `
-
-
${value.title}
-
${value.type - } Report
-
-
-
ID: ${value.id}
-
${value.author - } - ${timeAgo(Number(value.time))}
-
-
` - ); - }); - } else if (eventData.type == "reportData") { - let table = eventData.data; - - $(".manage-reports-editing-title").html( - "You are currently editing report " + table["id"] - ); - - $(".manage-reports-editing-title").data("id", Number(table["id"])); - - $(".manage-reports-input-title").val(table["title"]); - $(".manage-reports-input-type").val(table["type"]); - $(".manage-reports-reports-content").val(table["details"]); - - $(".manage-reports-tags-holder").empty(); - $.each(table["tags"], function (index, value) { - $(".manage-reports-tags-holder").append( - `
${value}
` - ); - }); - - $(".reports-gallery-inner-container").empty(); - $.each(table["gallery"], function (index, value) { - let randomNum = Math.ceil(Math.random() * 10).toString(); - $(".reports-gallery-inner-container").append( - `` - ); - }); - - $(".reports-officers-tags-holder").empty(); - $.each(table["officersinvolved"], function (index, value) { - $(".reports-officers-tags-holder").append( - `
${value}
` - ); - }); - } else if (eventData.type == "searchedVehicles") { - - } else if (eventData.type == "getVehicleData") { - impoundChanged = false; - let table = eventData.data; - - $(".vehicle-information-title-holder").data( - "dbid", - Number(table["dbid"]) - ); - - $(".vehicle-info-plate-input").val(table["plate"]); - $(".vehicle-info-owner-input").val(table["name"]); - $(".vehicle-info-class-input").val(table["class"]); - $(".vehicle-info-model-input").val(table["model"]); - $(".vehicle-info-imageurl-input").val(table["image"]); - - $(".vehicle-info-content").val(table["information"]); - - $(".vehicle-tags").empty(); - $(".vehicle-info-image").attr("src", table["image"]); - $(".vehicle-tags").prepend( - `
${table.colorName}
` - ); - - let impound = "red-tag"; - let bolo = "red-tag"; - let codefive = "red-tag"; - let stolen = "red-tag"; - - if (table.impound) { - impound = "green-tag"; - } - - if (table.bolo) { - bolo = "green-tag"; - } - - if (table.code) { - codefive = "green-tag"; - } - - if (table.stolen) { - stolen = "green-tag"; - } - - $(".vehicle-tags").append( - `
Impound
` - ); - $(".vehicle-tags").append( - `
BOLO
` - ); - $(".vehicle-tags").append( - `
Code 5
` - ); - $(".vehicle-tags").append( - `
Stolen
` - ); - $(".vehicle-info-imageurl-input").val(table["image"]); - } else if (eventData.type == "updateVehicleDbId") { - $(".vehicle-information-title-holder").data("dbid", Number(eventData.data)); - } else if (eventData.type == "updateIncidentDbId") { - $(".manage-incidents-editing-title").data("id", Number(eventData.data)); - - $(".manage-incidents-tags-add-btn").css("pointer-events", "auto"); - $(".manage-incidents-reports-content").css( - "pointer-events", - "auto" - ); - $(".manage-incidents-officers-add-btn").css( - "pointer-events", - "auto" - ); - $(".manage-incidents-civilians-add-btn").css( - "pointer-events", - "auto" - ); - $(".manage-incidents-evidence-add-btn").css( - "pointer-events", - "auto" - ); - $(".associated-incidents-tags-add-btn").css( - "pointer-events", - "auto" - ); - } else if (eventData.type == "callDetach") { - $(".active-calls-item") - .filter("[data-id='" + eventData.callid + "']") - .children() - .children() - .find(".call-radio") - .html(eventData.data); - } else if (eventData.type == "callAttach") { - $(".active-calls-item") - .filter("[data-id='" + eventData.callid + "']") - .children() - .children() - .find(".call-radio") - .html(eventData.data); - } else if (eventData.type == "getAllLogs") { - let table = eventData.data; - $(".stafflogs-container").empty(); - $.each(table, function (index, value) { - $(".stafflogs-container").append( - `

• ${value.text - } (${timeAgo( - Number(value.time) - )})

` - ); - }); - } else if (eventData.type == "statusImpound") { - const table = eventData.data; - const plate = eventData.plate; - const linkedreport = table["linkedreport"]; - const fee = table["fee"]; - const time = table["time"] * 1000; - - let localDate = new Date(time); - const impoundDate = localDate.toLocaleDateString("en-US", { - timeZone: "UTC", - }); - const impoundTime = localDate.toLocaleTimeString("en-US", { - timeZone: "UTC", - }); - - $(".impound-plate").val(plate).attr("disabled", "disabled"); - $(".impound-linkedreport") - .val(linkedreport) - .attr("disabled", "disabled"); - $(".impound-fee") - .val("$" + fee) - .attr("disabled", "disabled"); - - if (table.paid === 1) { - $(".impound-fee").css("color", "green"); - } else { - $(".impound-fee").css("color", "red"); - } - - $(".impound-time") - .val(impoundDate + " - " + impoundTime) - .attr("disabled", "disabled"); - $(".impound-cancel").html("Close"); - $(".impound-submit").fadeOut(250); - $(".impound-form").slideDown(250); - $(".impound-form").fadeIn(250); - } else if (eventData.type == "greenImpound") { - $(".vehicle-tags") - .find(".impound-tag") - .addClass("green-tag") - .removeClass("red-tag"); - } else if (eventData.type == "redImpound") { - $(".vehicle-tags") - .find(".impound-tag") - .removeClass("green-tag") - .addClass("red-tag"); - } - }); -}); - -function fidgetSpinner(page) { - $(".close-all").fadeOut(0); - $(".container-load").fadeIn(0); - if (page == ".dashboard-page-container"){ - $.post(`https://${GetParentResourceName()}/getAllDashboardData`, JSON.stringify({})); - } - if (page == ".bolos-page-container") { - $.post(`https://${GetParentResourceName()}/getAllBolos`, JSON.stringify({})); - } - if (page == ".reports-page-container") { - $.post(`https://${GetParentResourceName()}/getAllReports`, JSON.stringify({})); - } - if (page == ".stafflogs-page-container") { - $.post(`https://${GetParentResourceName()}/getAllLogs`, JSON.stringify({})); - } - if (page == ".incidents-page-container") { - $.post(`https://${GetParentResourceName()}/getAllIncidents`, JSON.stringify({})); - } - setTimeout(() => { - $(".container-load").fadeOut(0); - $(page).fadeIn(0); - }, 1250); -} - -function timeShit() { - let localDate = new Date(); - const myTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone - date = localDate.toLocaleDateString("en-US", { - timeZone: myTimeZone, - }); - time = localDate.toLocaleTimeString("en-US", { - timeZone: myTimeZone, - }); - $(".date").html(date); - $(".time").html(time); -} - -setInterval(timeShit, 1000); - -function addTag(tagInput) { - $(".tags-holder").prepend(`
${tagInput}
`); - - $.post( - `https://${GetParentResourceName()}/newTag`, - JSON.stringify({ - id: $(".manage-profile-citizenid-input").val(), - tag: tagInput, - }) - ); -} - -// Context menu - -var menu = document.querySelector(".contextmenu"); - -function showMenu(x, y) { - $(".contextmenu").css("left", x + "px"); - $(".contextmenu").css("top", y + "px"); - $(".contextmenu").addClass("contextmenu-show"); -} - -function hideMenu() { - $(".contextmenu").removeClass("contextmenu-show"); -} - -function onMouseDown(e) { - hideMenu(); - document.removeEventListener("mouseup", onMouseDown); -} - -function openContextMenu(e, args) { - e.preventDefault(); - showMenu(e.pageX, e.pageY); - $(".contextmenu").empty(); - $.each(args, function (index, value) { - if (value.status !== "blur(5px)") { - $(".contextmenu").prepend( - ` -
  • - - - ${value.text} - -
  • - ` - ); - } - }); - document.addEventListener("mouseup", onMouseDown); -} - -function expandImage(url) { - $(".close-all").css("filter", "brightness(35%)"); - $(".gallery-image-enlarged").fadeIn(150); - $(".gallery-image-enlarged").css("display", "block"); - $(".gallery-image-enlarged").attr("src", url); -} - -function removeImage(url) { - let cid = $(".manage-profile-citizenid-input").val(); - $(".gallery-inner-container img") - .filter("[src='" + url + "']") - .remove(); -} - -function hideIcidentsMenu() { - if ( - $(".icidents-person-search-container").css("display") != "none" && - !mouse_is_inside - ) { - $(".icidents-person-search-container").fadeOut(250); - $(".close-all").css("filter", "none"); - } -} - -function onMouseDownIcidents(e) { - hideIcidentsMenu(); - document.removeEventListener("mouseup", onMouseDownIcidents); -} - -function titleCase(str) { - return str - .split(' ') - .map((word) => word[0].toUpperCase() + word.slice(1).toLowerCase()) - .join(' '); -} - -function searchProfilesResults(result) { - canSearchForProfiles = true; - $(".profile-items").empty(); - - if (result.length < 1) { - $(".profile-items").html( - ` -
    - -
    -
    -
    No Users Matching that search
    -
    -
    -
    -
    -
    - ` - ); - return true; - } - - let profileHTML = ""; - - result.forEach((value) => { - let charinfo = value.charinfo; - let metadata = value.licences; - - if (typeof value.charinfo == "string") { - charinfo = JSON.parse(charinfo); - } - - if (typeof value.metadata == "string") { - metadata = JSON.parse(metadata); - } - - let name = charinfo.firstname + " " + charinfo.lastname; - let warrant = "red-tag"; - let convictions = "red-tag"; - - let licences = ""; - let licArr = Object.entries(value.licences); - - if (licArr.length == 0 || licArr.length == undefined) { - var licenseTypes = ['business', 'pilot', 'weapon', 'driver']; - licArr = Object.entries(licenseTypes.reduce((licenseType, licenseValue) => (licenseType[licenseValue] = false, licenseType), {})); - } - - if (licArr.length > 0 && (PoliceJobs[playerJob] !== undefined || DojJobs[playerJob] !== undefined)) { - for (const [lic, hasLic] of licArr) { - let tagColour = - hasLic == true ? "green-tag" : "red-tag"; - licences += `${titleCase(lic)}`; - } - } - - if (value.warrant == true) { - warrant = "green-tag"; - } - - if (value.convictions < 5) { - convictions = "green-tag"; - } else if ( - value.convictions > 4 && - value.convictions < 15 - ) { - convictions = "orange-tag"; - } - - if (value.pp == '') { - value.pp = 'img/not-found.webp' - } - - profileHTML += ` -
    - -
    -
    -
    ${name}
    -
    - ${licences} -
    -
    -
    -
    ID: ${value.citizenid}
      -
    -
    -
    - `; - }); - - $(".profile-items").html(profileHTML); -} - -window.addEventListener("load", function () { - document - .getElementById("offenses-search") - .addEventListener("keyup", function () { - var search = this.value.toLowerCase(); - if (search.length > 1) { - $.each($(".offense-item"), function (i, d) { - const Name = $(this) - .find(".offense-item-offense") - .html() - .toLowerCase(); - const Number = $(this) - .find(".offense-item-id") - .html() - .toLowerCase(); - if (Name.includes(search)) { - $(this).show(); - } else if (Number.includes(search)) { - $(this).show(); - } else { - $(this).hide(); - } - }); - } else { - $.each($(".offense-item"), function (i, d) { - $(this).show(); - }); - } - }); -}); +let canSearchForProfiles = true; +let canSaveProfile = true; +let canRefreshBolo = true; +let canRefreshReports = true; +let canRefreshIncidents = true; +let canSearchForWeapons = true; +let canInputTag = true; +let canInputBoloTag = true; +let canInputBoloOfficerTag = true; +let canSearchReports = true; +let canCreateBulletin = 0; +let mouse_is_inside = false; +let currentTab = ".dashboard-page-container"; +let MyName = ""; +let canInputReportTag = true; +let canInputReportOfficerTag = true; +let canInputReportCivilianTag = true; +let canSearchForVehicles = true; +let canSearchForReports = true; +let canSaveVehicle = true; +let canSaveWeapon = true; +var LastName = ""; +var DispatchNum = 0; +var playerJob = ""; +let rosterLink = ""; +let sopLink = ""; + +//Set this to false if you don't want to show the send to community service button on the incidents page +const canSendToCommunityService = false + +let impoundChanged = false; + +// TEMP CONFIG OF JOBS +const PoliceJobs = { + ['police']: true, + ['lspd']: true, + ['bcso']: true, + ['sast']: true, + ['sasp']: true, + ['sapr']: true, + ['doc']: true, + ['lssd']: true, +} + +const AmbulanceJobs = { + ['ambulance']: true, +} + +const DojJobs = { + ['lawyer']: true, + ['judge']: true +} + +const MONTH_NAMES = [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December", +]; + +function getFormattedDate(date, prefomattedDate = false, hideYear = false) { + const day = date.getDate(); + const month = MONTH_NAMES[date.getMonth()]; + const year = date.getFullYear(); + const hours = date.getHours(); + let minutes = date.getMinutes(); + + if (minutes < 10) { + minutes = `0${minutes}`; + } + + if (prefomattedDate) { + return `${prefomattedDate} at ${hours}:${minutes}`; + } + + if (hideYear) { + return `${day}. ${month} at ${hours}:${minutes}`; + } + + return `${day}. ${month} ${year}. at ${hours}:${minutes}`; +} + +var quotes = [ + 'Project Sloth On Top!', + 'A Discord rewrite fixes everything...', + 'Does anyone even read these?', + 'The best way to predict your future is to create it.', + 'Believe you can and you\'re halfway there.', + 'In three words I can sum up everything I\'ve learned about life: it goes on.', + 'The only way to do great work is to love what you do.', + 'Success is not final, failure is not fatal: it is the courage to continue that counts.', + 'Life is 10% what happens to us and 90% how we react to it.', + 'The only true wisdom is in knowing you know nothing.', + 'If you want to live a happy life, tie it to a goal, not to people or things.', + 'Happiness is not something ready-made. It comes from your own actions.', + 'The greatest glory in living lies not in never falling, but in rising every time we fall.', + 'The only thing necessary for the triumph of evil is for good men to do nothing.', + 'It does not matter how slowly you go as long as you do not stop.', + 'The best time to plant a tree was 20 years ago. The second best time is now.', + 'Believe in yourself and all that you are. Know that there is something inside you that is greater than any obstacle.', + 'Don\'t watch the clock; do what it does. Keep going.', + 'You miss 100% of the shots you don\'t take.', + 'You can\'t go back and change the beginning, but you can start where you are and change the ending.', + 'It\'s not the years in your life that count. It\'s the life in your years.', + 'The greatest glory in living lies not in never falling, but in rising every time we fall.', + 'The two most important days in your life are the day you are born and the day you find out why.', + 'Success is not how high you have climbed, but how you make a positive difference to the world.', +] + +function randomizeQuote() { + return randomQuote = quotes[Math.floor(Math.random() * quotes.length)]; +} + +function timeAgo(dateParam) { + if (!dateParam) { + return null; + } + + const date = + typeof dateParam === "object" ? dateParam : new Date(dateParam); + const DAY_IN_MS = 86400000; + const today = new Date(); + const yesterday = new Date(today - DAY_IN_MS); + const seconds = Math.round((today - date) / 1000); + const minutes = Math.round(seconds / 60); + const isToday = today.toDateString() === date.toDateString(); + const isYesterday = yesterday.toDateString() === date.toDateString(); + const isThisYear = today.getFullYear() === date.getFullYear(); + + if (seconds < 5) { + return "Just Now"; + } else if (seconds < 60) { + return `${seconds} Seconds ago`; + } else if (seconds < 90) { + return "About a minute ago"; + } else if (minutes < 60) { + return `${minutes} Minutes ago`; + } else if (isToday) { + return getFormattedDate(date, "Today"); + } else if (isYesterday) { + return getFormattedDate(date, "Yesterday"); + } else if (isThisYear) { + return getFormattedDate(date, false, true); + } + + return getFormattedDate(date); +} + +function closeContainer(selector) { + if ( + $(selector).css("display") != "none" + ) { + shouldClose = false; + $(selector).fadeOut(50); + $(".close-all").css("filter", "none"); + } +} + +$(document).ready(() => { + $(".header").hover( + function () { + $(".close-all").css("opacity", "0.5"); + }, + function () { + $(".close-all").css("opacity", "1"); + } + ); + $(".incidents-charges-title-container").hover( + function () { + $(".incidents-charges-table-container").css("opacity", "0.1"); + $(".close-all").css("filter", "none"); + }, + function () { + $(".close-all").css("filter", "brightness(30%)"); + $(".incidents-charges-table-container").css("opacity", "1"); + } + ); + $(".nav-item").click(function () { + if ($(this).hasClass("active-nav") == false) { + fidgetSpinner($(this).data("page")); + currentTab = $(this).data("page"); + } + }); + + $(".profile-items").on("click", ".profile-item", async function () { + let id = $(this).data("id"); + let profileFingerprint = $(this).data("fingerprint"); + + if (profileFingerprint && profileFingerprint !== "") { + $(".manage-profile-fingerprint-input").val(profileFingerprint); + } else { + $(".manage-profile-fingerprint-input").val(""); + } + + let result = await $.post( + `https://${GetParentResourceName()}/getProfileData`, + JSON.stringify({ + id: id, + }) + ); + + if (!canInputTag) { + if ($(".tags-add-btn").hasClass("fa-minus")) { + $(".tags-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + $(".tag-input").remove(); + canInputTag = true; + } + + if ($(".gallery-upload-input").css("display") == "block") { + $(".gallery-upload-input").slideUp(250); + setTimeout(() => { + $(".gallery-upload-input").css("display", "none"); + }, 250); + } + + if ($(".gallery-add-btn").hasClass("fa-minus")) { + $(".gallery-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + + const { vehicles, tags, gallery, convictions, incidents, properties, fingerprint } = result; + + $(".manage-profile-editing-title").html(`You are currently editing ${result["firstname"]} ${result["lastname"]}`); + $(".manage-profile-citizenid-input").val(result['cid']); + $(".manage-profile-name-input-1").val(result["firstname"]); + $(".manage-profile-name-input-2").val(result["lastname"]); + $(".manage-profile-dob-input").val(result["dob"]); + $(".manage-profile-phonenumber-input").val(result["phone"]); + $(".manage-profile-job-input").val(`${result.job}, ${result.grade}`); + $(".manage-profile-apartment-input").val(`${result.apartment}`); + $(".manage-profile-url-input").val(result["profilepic"] ?? ""); + $(".manage-profile-info").val(result["mdtinfo"]); + $(".manage-profile-info").removeAttr("disabled"); + $(".manage-profile-pic").attr("src", result["profilepic"] ?? "img/male.png"); + $(".manage-profile-active-warrant").css("display", "none") + if (result["warrant"]) { + $(".manage-profile-active-warrant").css("display", "block"); + } + + $(".licenses-holder").empty(); + $(".tags-holder").empty(); + $(".vehs-holder").empty(); + $(".gallery-inner-container").empty(); + $(".convictions-holder").empty(); + $(".profile-incidents-holder").empty(); + + let licencesHTML = '
    No Licenses
    '; + let tagsHTML = '
    No Tags
    '; + let convHTML = '
    Clean Record
    '; + let incidentsHTML = '
    No Incidents
    '; + let vehHTML = '
    No Vehicles
    '; + let galleryHTML = '
    No Photos
    '; + let propertyHTML = '
    No Properties
    '; + + // convert key value pair object of licenses to array + let licenses = Object.entries(result.licences); + + if (licenses.length == 0 || licenses.length == undefined) { + var licenseTypes = licenseTypesGlobal; + licenses = Object.entries(licenseTypes.reduce((licenseType, licenseValue) => (licenseType[licenseValue] = false, licenseType), {})); + } + + if (licenses.length > 0 && (PoliceJobs[playerJob] !== undefined || DojJobs[playerJob] !== undefined)) { + licencesHTML = ''; + for (const [lic, hasLic] of licenses) { + let tagColour = hasLic == true ? "green-tag" : "red-tag"; + licencesHTML += `${titleCase(lic)}`; + } + + if (vehicles && vehicles.length > 0) { + vehHTML = ''; + vehicles.forEach(value => { + vehHTML += `
    ${value.plate} - ${value.model}
    ` + }) + } + + if (convictions && convictions.length > 0) { + convHTML = ''; + convictions.forEach(value => { + convHTML += `
    ${value}
    `; + }) + } + + if (incidents && incidents.length > 0) { + incidentsHTML=''; + // Sort incidents so most recent appear first + const sortedIncidents = incidents.sort((a,b) => b.time - a.time); + sortedIncidents.forEach(value => { + incidentsHTML += `
    +
    +
    ${value.id}
    +
    + ${value.title} +
    ${getFormattedDate(new Date(Number(value.time)))}
    +
    +
    +
    ` + }) + } + + if (properties && properties.length > 0) { + propertyHTML = ''; + properties.forEach(value => { + propertyHTML += `
    ${value.label}
    `; + }) + } + } + + if (tags && tags.length > 0) { + tagsHTML = ''; + tags.forEach((tag) => { + tagsHTML += `
    ${tag}
    `; + }) + } + + if (gallery && gallery.length > 0) { + galleryHTML = ''; + gallery.forEach(value => { + galleryHTML += ``; + }) + } + + if (result.isLimited) { + $(".manage-profile-vehs-container").fadeOut(250); + $(".manage-profile-houses-container").fadeOut(250); + $(".manage-profile-houses-container").fadeOut(250); + } else { + $(".manage-profile-vehs-container").fadeIn(250); + $(".manage-profile-houses-container").fadeIn(250); + $(".manage-profile-houses-container").fadeIn(250); + } + + $(".licenses-holder").html(licencesHTML); + $(".tags-holder").html(tagsHTML); + $(".convictions-holder").html(convHTML); + $(".profile-incidents-holder").html(incidentsHTML); + $(".vehs-holder").html(vehHTML); + $(".gallery-inner-container").html(galleryHTML); + $(".houses-holder").html(propertyHTML); + }); + + $(".bulletin-add-btn").click(function () { + if (canCreateBulletin == 0) { + $(this).removeClass("fa-plus").addClass("fa-minus"); + let BulletinId = Number($(".bulletin-item").first().data("id")) + 1; + if (Number.isNaN(BulletinId)) { + BulletinId = 1; + } + canCreateBulletin = BulletinId; + $(".bulletin-items-continer") + .prepend(`
    + + +
    +
    ${MyName} - Just Now
    +
    +
    `); + } else { + $(this).removeClass("fa-minus").addClass("fa-plus"); + $(".bulletin-items-continer") + .find("[data-id='" + canCreateBulletin + "']") + .remove(); + canCreateBulletin = 0; + } + }); + //
    ID: ${canCreateBulletin}
    + $(".bulletin-items-continer").on("keydown", ".bulletin-item", function (e) { + if (e.keyCode === 13) { + $(".bulletin-add-btn").removeClass("fa-minus").addClass("fa-plus"); + let id = $(this).find(".bulletin-id").text(); + let date = $(this).find(".bulletin-date").text(); + let title = $(this).find(".bulletin-item-title").text(); + let info = $(this).find(".bulletin-item-info").text(); + let time = new Date(); + $.post( + `https://${GetParentResourceName()}/newBulletin`, + JSON.stringify({ + title: title, + info: info, + time: time.getTime(), + }) + ); + $(".bulletin-items-continer") + .find("[data-id='" + canCreateBulletin + "']") + .remove(); + $(".bulletin-items-continer") + .prepend(`
    +
    ${title}
    +
    ${info}
    +
    + +
    ${MyName} - ${timeAgo( + Number(time.getTime()) + )}
    +
    +
    `); + canCreateBulletin = 0; + } + }); + $(".bulletin-items-continer").on( + "contextmenu", + ".bulletin-item", + function (e) { + let args = [ + { + className: "remove-bulletin", + icon: "fas fa-times", + text: "Remove Item", + info: $(this).data("id"), + status: $(this).data("title"), + }, + ]; + openContextMenu(e, args); + } + ); + $(".contextmenu").on("click", ".remove-bulletin", function () { + let id = $(this).data("info"); + let title = $(this).data("status") + $(".bulletin-items-continer") + .find("[data-id='" + id + "']") + .remove(); + $.post( + `https://${GetParentResourceName()}/deleteBulletin`, + JSON.stringify({ + id: id, + title: title + }) + ); + if (canCreateBulletin == id) { + canCreateBulletin = 0; + } + if ($(".bulletin-add-btn").hasClass("fa-minus")) { + $(".bulletin-add-btn").removeClass("fa-minus").addClass("fa-plus"); + } + }); + + $(".associated-incidents-tags-add-btn").on("click", "", function () { + document.addEventListener("mouseup", onMouseDownIncidents); + const source = "associated-incidents-tags"; + $(".incidents-person-search-holder").attr("data-source", source); + $(".incidents-person-search-container").fadeIn(250); // makes the container visible + $(".close-all").css("filter", "brightness(15%)"); + }); + + $(".convictions-title").on("click", "", function () { + if ($(".manage-profile-citizenid-input").val()) { + document.addEventListener("mouseup", onMouseDownIncidents); + const source = "convictions-title"; + $(".convictions-holder").attr("data-source", source); + $(".convictions-known-container").fadeIn(250); // makes the container visible + $(".close-all").css("filter", "brightness(15%)"); + } else { + $(this).effect("shake", { times: 2, distance: 2 }, 500); + } + }); + + $(".profile-incidents-title").on("click", "", function () { + if ($(".manage-profile-citizenid-input").val()) { + document.addEventListener("mouseup", onMouseDownIncidents); + const source = "profile-incidents-title"; + $(".profile-incidents-holder").attr("data-source", source); + $(".incidents-known-container").fadeIn(250); // makes the container visible + $(".close-all").css("filter", "brightness(15%)"); + } else { + $(this).effect("shake", { times: 2, distance: 2 }, 500); + } + }); + + $(".gallery-add-btn").click(function () { + if ($(".manage-profile-citizenid-input").val()) { + if ($(".gallery-upload-input").css("display") == "none") { + $(".gallery-upload-input").slideDown(250); + $(".gallery-upload-input").css("display", "block"); + $(this).removeClass("fa-plus").addClass("fa-minus"); + } else { + $(".gallery-upload-input").slideUp(250); + setTimeout(() => { + $(".gallery-upload-input").css("display", "none"); + }, 250); + $(this).removeClass("fa-minus").addClass("fa-plus"); + } + } else { + $(this).effect("shake", { times: 2, distance: 2 }, 500); + } + }); + $("#gallery-upload-input").keydown(function (e) { + if (e.keyCode === 13) { + let URL = $("#gallery-upload-input").val(); + let cid = $(".manage-profile-citizenid-input").val(); + if (URL !== "") { + let randomNum = Math.ceil(Math.random() * 10).toString(); + $(".gallery-inner-container").prepend( + `` + ); + $("#gallery-upload-input").val(""); + $(".gallery-upload-input").slideUp(250); + setTimeout(() => { + $(".gallery-upload-input").css("display", "none"); + }, 250); + $(".gallery-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + } + }); + $(".manage-profile-save").click(function () { + if (canSaveProfile == true) { + canSaveProfile = false; + $(".manage-profile-save").empty(); + $(".manage-profile-save").prepend( + `` + ); + setTimeout(() => { + $(".manage-profile-save").empty(); + $(".manage-profile-save").html("Save"); + canSaveProfile = true; + }, 750); + + setTimeout(() => { + let tags = new Array(); + let gallery = new Array(); + let licenses = {}; + + $(".tags-holder") + .find("span.tag-input, div.tag") + .each(function () { + if ($(this).text() != "" && $(this).text() != "No Tags") { + tags.push($(this).text()); + } + }); + + $(".gallery-inner-container") + .find("img") + .each(function () { + if ($(this).attr("src") != "") { + gallery.push($(this).attr("src")); + } + }); + + let pfp = $(".manage-profile-pic").attr("src"); + let newpfp = $(".manage-profile-url-input").val(); + if (newpfp.includes("base64")) { + newpfp = "img/not-found.webp"; + } else { + pfp = newpfp; + } + let description = $(".manage-profile-info").val(); + let id = $(".manage-profile-citizenid-input").val(); + + $(".licenses-holder") + .find("span") + .each(function(){ + let type = $(this).data("type") + if ($(this).attr('class').includes('green-tag')){ + licenses[type] = true; + } + else{ + licenses[type] = false; + } + }) + + const fName = $(".manage-profile-name-input-1").val(); + const sName = $(".manage-profile-name-input-2").val(); + + $.post( + `https://${GetParentResourceName()}/saveProfile`, + JSON.stringify({ + pfp: pfp, + description: description, + id: id, + fName: fName, + sName: sName, + tags: tags, + gallery: gallery, + licenses: licenses, + fingerprint: $(".manage-profile-fingerprint-input").val() + }) + ); + $(".manage-profile-pic").attr("src", newpfp); + }, 250); + } + }); + $(".manage-incidents-title-holder").on( + "click", + ".manage-incidents-save", + function () { + if (canSaveProfile == true) { + canSaveProfile = false; + $(".manage-incidents-save").empty(); + $(".manage-incidents-save").prepend( + `` + ); + setTimeout(() => { + $(".manage-incidents-save").empty(); + $(".manage-incidents-save").prepend( + `` + ); + canSaveProfile = true; + }, 750); + + // Title, information, tags, officers involved, civs involved, evidence + const title = $("#manage-incidents-title-input").val(); + const information = $(".manage-incidents-reports-content").val(); + const dbid = $(".manage-incidents-editing-title").data("id"); + + let tags = new Array(); + let officers = new Array(); + let civilians = new Array(); + let evidence = new Array(); + + $(".manage-incidents-tags-holder") + .find("div") + .each(function () { + if ($(this).text() != "") { + tags.push($(this).text()); + } + }); + + $(".manage-incidents-officers-holder") + .find("div") + .each(function () { + if ($(this).text() != "") { + officers.push($(this).text()); + } + }); + + $(".manage-incidents-civilians-holder") + .find("div") + .each(function () { + if ($(this).text() != "") { + civilians.push($(this).text()); + } + }); + + $(".manage-incidents-evidence-holder") + .find("img") + .each(function () { + if ($(this).attr("src") != "") { + evidence.push($(this).attr("src")); + } + }); + + let time = new Date(); + + let associated = new Array(); + + $(".associated-incidents-user-container").each(function ( + index + ) { + var cid = $(this).data("id"); + var guilty = false; + var warrant = false; + var processed = false; + var isassociated = false; + var charges = new Array(); + + $(".associated-incidents-user-tags-holder") + .children("div") + .each(function (index) { + if ($(this).data("id") == cid) { + if ($(this).hasClass("green-tag")) { + if ($(this).text() == "Guilty") { + guilty = true; + } + if ($(this).text() == "Warrant") { + warrant = true; + } + if ($(this).text() == "Processed") { + processed = true; + } + if ($(this).text() == "Associated") { + isassociated = true; + } + } + } + }); + + $(".associated-incidents-user-holder") + .children("div") + .each(function (index) { + if ( + ( $(".associated-incidents-user-holder") + .children() + .eq(index) + .data("id") == cid ) + ) { + charges.push( + $(".associated-incidents-user-holder") + .children() + .eq(index) + .html() + ); + } + }); + + associated.push({ + Cid: $(this).data("id"), + Warrant: warrant, + Guilty: guilty, + Processed: processed, + Isassociated: isassociated, + Charges: charges, + Fine: $(".fine-amount") + .filter("[data-id='" + $(this).data("id") + "']") + .val(), + Sentence: $(".sentence-amount") + .filter("[data-id='" + $(this).data("id") + "']") + .val(), + recfine: $(".fine-recommended-amount") + .filter("[data-id='" + $(this).data("id") + "']") + .val(), + recsentence: $(".sentence-recommended-amount") + .filter("[data-id='" + $(this).data("id") + "']") + .val(), + }); + }); + + $.post( + `https://${GetParentResourceName()}/saveIncident`, + JSON.stringify({ + ID: dbid, + title: title, + information: information, + tags: tags, + officers: officers, + civilians: civilians, + evidence: evidence, + associated: associated, + time: time.getTime(), + }) + ); + + setTimeout(() => { + if (canRefreshIncidents == true) { + canRefreshIncidents = false; + $(".incidents-search-refresh").empty(); + $(".incidents-search-refresh").prepend( + `` + ); + setTimeout(() => { + $(".incidents-search-refresh").empty(); + $(".incidents-search-refresh").html("Refresh"); + canRefreshIncidents = true; + $.post( + `https://${GetParentResourceName()}/getAllIncidents`, + JSON.stringify({}) + ); + }, 1500); + } + }, 1000); + } + } + ); + $(".manage-incidents-title-holder").on( + "click", + ".manage-incidents-create", + function () { + let template = ` +
    +

    📝 Summary:

    +

    [Insert Report Summary Here]

    +

     

    +

    🧍 Hostage: [Name Here]

    +

     

    +

    🗄️ Evidence Location: Stash # | Drawer #

    +

     

    +

    🔪 Weapons/Items Confiscated:

    +

    · [Insert List Here]

    +

     

    +

    -----

    +

    💸 Fine:

    +

     

    +

    ⌚ Sentence:

    +

    -----

    +
    + `; + $("#manage-incidents-title-input").val( + "Name - Charge - " + $(".date").html() + ); + $(".manage-incidents-reports-content").trumbowyg({ + changeActiveDropdownIcon: true, + imageWidthModalEdit: true, + btns: [ + ['foreColor', 'backColor','fontfamily','fontsize','indent', 'outdent'], + ['strong', 'em',], ['insertImage'], + ['viewHTML'], + ['undo', 'redo'], + ['formatting'], + ['superscript', 'subscript'], + ['link'], + ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'], + ['horizontalRule'] + ], + }); + $(".manage-incidents-reports-content").trumbowyg('html', template); + + $(".manage-incidents-tags-holder").empty(); + $(".manage-incidents-officers-holder").empty(); + $(".manage-incidents-civilians-holder").empty(); + $(".manage-incidents-evidence-holder").empty(); + $(".manage-incidents-title-holder").empty(); + $(".manage-incidents-title-holder").prepend( + ` +
    Manage Incident
    +
    +
    + ` + ); + $(".manage-incidents-title").css("width", "66%"); + $(".manage-incidents-create").css("margin-right", "0px"); + + $(".incidents-ghost-holder").html(""); + $(".associated-incidents-tags-holder").html(""); + + $(".manage-incidents-editing-title").html( + "You are currently creating a new Incident" + ); + $(".manage-incidents-editing-title").data("id", 0); + + $(".manage-incidents-tags-add-btn").css("pointer-events", "auto"); + $(".manage-incidents-reports-content").css( + "pointer-events", + "auto" + ); + $(".manage-incidents-officers-add-btn").css( + "pointer-events", + "auto" + ); + $(".manage-incidents-civilians-add-btn").css( + "pointer-events", + "auto" + ); + $(".manage-incidents-evidence-add-btn").css( + "pointer-events", + "auto" + ); + $(".associated-incidents-tags-add-btn").css( + "pointer-events", + "auto" + ); + + } + ); + $(".tags-add-btn").click(function () { + if ($(".manage-profile-citizenid-input").val()) { + if (canInputTag) { + $(this).removeClass("fa-plus").addClass("fa-minus"); + $(".tags-holder").prepend( + `` + ); + canInputTag = false; + } else if (!canInputTag) { + $(this).removeClass("fa-minus").addClass("fa-plus"); + $(".tag-input").remove(); + canInputTag = true; + } + } else { + $(this).effect("shake", { times: 2, distance: 2 }, 500); + } + }); + + $(".tags-holder").on("keydown", ".tag-input", function (e) { + if (e.keyCode === 13) { + addTag($(".tag-input").text()); + if ($(".tags-add-btn").hasClass("fa-minus")) { + $(".tags-add-btn").removeClass("fa-minus").addClass("fa-plus"); + } + $(".tag-input").remove(); + } + }); + $(".contextmenu").on("click", ".search-vehicle", function () { + let plate = $(this).data("info"); + fidgetSpinner(".dmv-page-container"); + currentTab = ".dmv-page-container"; + setTimeout(() => { + $(".dmv-search-input").slideDown(250); + $(".dmv-search-input").css("display", "block"); + setTimeout(() => { + $("#dmv-search-input:text").val(plate.toString()); + setTimeout(() => { + var e = jQuery.Event("keydown"); + e.which = 13; // # Some key code value + e.keyCode = 13 + $("#dmv-search-input").trigger(e); + }, 250); + }, 250); + }, 250); + }); + $(".vehs-holder").on("contextmenu", ".veh-tag", function (e) { + let args = [ + { + className: "search-vehicle", + icon: "fas fa-car", + text: "Search Vehicle", + info: $(this).data("plate"), + status: "", + }, + ]; + openContextMenu(e, args); + }); + + $(".contextmenu").on("click", ".make-waypoint", function () { + let coord = $(this).data("info").split("===") + setTimeout(() => { + $.post( + `https://${GetParentResourceName()}/SetHouseLocation`, + JSON.stringify({ + coord: coord, + }) + ); + }, 250); + }); + $(".houses-holder").on("contextmenu", ".white-tag", function (e) { + let args = [ + { + className: "make-waypoint", + icon: "fas fa-map-pin", + text: "Make Waypoint", + info: $(this).data("location"), + status: "", + }, + ]; + openContextMenu(e, args); + }); + $(".gallery-inner-container").on("click", ".gallery-img", function () { + if ($(this).css("filter") == "none") { + $(this).css("filter", "blur(5px)"); + } else { + $(this).css("filter", "none"); + } + }); + $(".contextmenu").on("click", ".expand-image", function () { + expandImage($(this).data("info")); + }); + $(".contextmenu").on("click", ".remove-image", function () { + removeImage($(this).data("info")); + }); + $(".contextmenu").on("click", ".copy-image-link", function () { + copyImageSource($(this).data("info")); + }); + $(".contextmenu").on("click", ".remove-image-incident", function () { + $(".manage-incidents-evidence-holder img") + .filter("[src='" + $(this).data("info") + "']") + .remove(); + }); + $(".gallery-inner-container").on( + "contextmenu", + ".gallery-img", + function (e) { + let args = [ + { + className: "remove-image", + icon: "fas fa-times", + text: "Remove Image", + info: $(this).attr("src"), + status: "", + }, + { + className: "expand-image", + icon: "fas fa-expand", + text: "Expand Image", + info: $(this).attr("src"), + status: $(this).css("filter"), + }, + { + className: "copy-image-link", + icon: "fa-regular fa-copy", + text: "Copy Image Link", + info: $(this).attr("src"), + status: $(this).css("filter"), + }, + ]; + openContextMenu(e, args); + } + ); + + $(".licenses-holder").on("contextmenu", ".license-tag", function (e) { + const status = $(this).data("type"); + let type = $(this).html(); + + if (type == "Theory") { + info = "theory"; + } else if (type == "Car") { + info = "drive"; + } else if (type == "Bike") { + info = "drive_bike"; + } else if (type == "Truck") { + info = "drive_truck"; + } else if (type == "Hunting") { + info = "hunting"; + } else if (type == "Pilot") { + info = "pilot"; + } else if (type == "Weapon") { + info = "weapon"; + } else { + info = type.toLowerCase(); + } + + if ($(this).hasClass("green-tag")) { + openContextMenu(e, [ + { + className: "revoke-licence", + icon: "fas fa-times", + text: "Revoke License", + info: info, + status: status, + }, + ]); + } else if ($(this).hasClass("red-tag")) { + openContextMenu(e, [ + { + className: "give-licence", + icon: "fas fa-check", + text: "Give License", + info: info, + status: status, + }, + ]); + } + }); + + $(".contextmenu").on("click", ".revoke-licence", function () { + // $.post( + // `https://${GetParentResourceName()}/updateLicence`, + // JSON.stringify({ + // cid: $(".manage-profile-citizenid-input").val(), + // type: $(this).data("status"), + // status: "revoke", + // }) + // ); + + const Elem = $(this).data("status"); + $(".license-tag") + .filter(`[data-type="${Elem}"]`) + .removeClass("green-tag") + .addClass("red-tag"); + + onMouseDown(); + }); + + $(".contextmenu").on("click", ".give-licence", function () { + // $.post( + // `https://${GetParentResourceName()}/updateLicence`, + // JSON.stringify({ + // cid: $(".manage-profile-citizenid-input").val(), + // type: $(this).data("status"), + // status: "give", + // }) + // ); + + const Elem = $(this).data("status"); + $(".license-tag") + .filter(`[data-type="${Elem}"]`) + .removeClass("red-tag") + .addClass("green-tag"); + + onMouseDown(); + }); + + $(".profile-title").click(function () { + if (canSearchForProfiles == true) { + if ($(".profile-search-input").css("display") == "none") { + $(".profile-search-input").slideDown(250); + $(".profile-search-input").css("display", "block"); + } else { + $(".profile-search-input").slideUp(250); + setTimeout(() => { + $(".profile-search-input").css("display", "none"); + }, 250); + } + } + }); + + $("#profile-search-input").keydown(async function (e) { + if (e.keyCode === 13 && canSearchForProfiles == true) { + let name = $("#profile-search-input").val(); + if (name != "") { + canSearchForProfiles = false; + $(".profile-items").empty(); + $(".profile-items").prepend( + `
    ` + ); + + let result = await $.post( + `https://${GetParentResourceName()}/searchProfiles`, + JSON.stringify({ + name: name, + }) + ); + + searchProfilesResults(result); + } + } + }); + + $(".incidents-title").click(function () { + if (canSearchForProfiles == true) { + if ($(".incidents-search-input").css("display") == "none") { + $(".incidents-search-input").slideDown(250); + $(".incidents-search-input").css("display", "block"); + } else { + $(".incidents-search-input").slideUp(250); + setTimeout(() => { + $(".incidents-search-input").css("display", "none"); + }, 250); + } + } + }); + + $("#incidents-search-input").keydown(function (e) { + if (e.keyCode === 13 && canSearchForProfiles == true) { + let incident = $("#incidents-search-input").val(); + if (incident !== "") { + canSearchForProfiles = false; + $.post( + `https://${GetParentResourceName()}/searchIncidents`, + JSON.stringify({ + incident: incident, + }) + ); + $(".incidents-items").empty(); + $(".incidents-items").prepend( + `
    ` + ); + } + } + }); + + function sanitizeInput(input) { + const map = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '/': '/', + }; + const reg = /[&<>"'/]/ig; + return input.replace(reg, (match) => (map[match])); + } + + $("#dispatchmsg").keydown(function (e) { + const keyCode = e.which || e.keyCode; + if (keyCode === 13 && !e.shiftKey) { + e.preventDefault(); + const time = new Date(); + + const message = sanitizeInput($(this).val()); + $.post( + `https://${GetParentResourceName()}/dispatchMessage`, + JSON.stringify({ + message: message, + time: time.getTime(), + }) + ); + $(this).val(""); + } + }); + + $(".incidents-items").on("click", ".incidents-item", function () { + const id = $(this).data("id"); + $.post( + `https://${GetParentResourceName()}/getIncidentData`, + JSON.stringify({ + id: id, + }) + ); + }); + $(".manage-incidents-civilians-holder").on("click", ".tag", async function () { + const name = $(this).text(); + fidgetSpinner(".profile-page-container"); + currentTab = ".profile-page-container"; + $(".profile-search-input").slideDown(250); + $(".profile-search-input").css("display", "block"); + $("#profile-search-input:text").val(name); + canSearchForProfiles = false; + let result = await $.post( + `https://${GetParentResourceName()}/searchProfiles`, + JSON.stringify({ + name: name, + }) + ); + + searchProfilesResults(result); + } + ); + document.onkeyup = function (data) { + if (data.which == 27) { + let shouldClose = true; + + if ($(".respond-calls-container").css("display") == "block") { + shouldClose = false; + $(".respond-calls-container").fadeOut(500); + setTimeout(() => { + $(".close-all").css("filter", "none"); + }, 250); + } + + if ($(".gallery-image-enlarged").css("display") == "block") { + shouldClose = false; + $(".gallery-image-enlarged").fadeOut(150); + $(".gallery-image-enlarged").css("display", "none"); + $(".close-all").css("filter", "none"); + } + + if ($(".incidents-image-enlarged").css("display") == "block") { + shouldClose = false; + $(".incidents-image-enlarged").fadeOut(150); + $(".incidents-image-enlarged").css("display", "none"); + } + + closeContainer(".incidents-person-search-container"); + closeContainer(".convictions-known-container"); + closeContainer(".incidents-known-container"); + + if ($(".incidents-charges-table").css("display") != "none") { + shouldClose = false; + $(".incidents-charges-table").slideUp(500); + $(".incidents-charges-table").fadeOut(500); + setTimeout(() => { + $(".close-all").css("filter", "none"); + }, 550); + } + + if ($(".dispatch-attached-units").css("display") != "none") { + shouldClose = false; + $(".dispatch-attached-units").slideUp(500); + $(".dispatch-attached-units").fadeOut(500); + setTimeout(() => { + $(".close-all").css("filter", "none"); + }, 550); + } + + if ($(".impound-form").css("display") != "none") { + shouldClose = false; + $(".impound-form").slideUp(250); + $(".impound-form").fadeOut(250); + setTimeout(() => { + $(".close-all").css("filter", "none"); + }, 550); + } + + if (shouldClose == true) { + $.post(`https://${GetParentResourceName()}/escape`, JSON.stringify({})); + } + } + }; + $(".manage-incidents-tags-add-btn").click(function () { + // if ($(".tag-incident-input")[0]) { + // $(this).removeClass("fa-minus").addClass("fa-plus"); + // $(".tag-incident-input").remove(); + // } else { + // $(this).removeClass("fa-plus").addClass("fa-minus"); + // $(".manage-incidents-tags-holder").prepend( + // `` + // ); + // } + $(".close-all").css("filter", "none"); + let id = $(".manage-incidents-editing-title").data("id"); + OpenEvidenceLocker(id) + }); + + function OpenEvidenceLocker(id) { + $.post(`https://${GetParentResourceName()}/OpenEvidenceLocker`, JSON.stringify({ + id, + })); + } + + $(".incidents-person-search-name-input").on("keydown", "", function (e) { + if (e.keyCode === 13) { + let name = $(".incidents-person-search-name-input").val(); + $.post( + `https://${GetParentResourceName()}/incidentSearchPerson`, + JSON.stringify({ + name: name, + }) + ); + } + }); + $(".manage-incidents-tags-holder").on( + "keydown", + ".tag-incident-input", + function (e) { + if (e.keyCode === 13) { + $(".manage-incidents-tags-holder").prepend( + `
    ${$( + ".tag-incident-input" + ).text()}
    ` + ); + // Have it save instantly if it's an existing report. + if ($(".manage-incidents-tags-add-btn").hasClass("fa-minus")) { + $(".manage-incidents-tags-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + $(".tag-incident-input").remove(); + } + } + ); + + $(".manage-incidents-officers-add-btn").click(function () { + const source = "incidents-officers"; + document.addEventListener("mouseup", onMouseDownIncidents); + $(".incidents-person-search-holder").attr("data-source", source); + $(".incidents-person-search-container").fadeIn(250); // makes the container visible + $(".close-all").css("filter", "brightness(15%)"); + }); + + $(".manage-incidents-civilians-add-btn").click(function () { + const source = "incidents-civilians"; + document.addEventListener("mouseup", onMouseDownIncidents); + $(".incidents-person-search-holder").attr("data-source", source); + $(".incidents-person-search-container").fadeIn(250); // makes the container visible + $(".close-all").css("filter", "brightness(15%)"); + }); + + $(".manage-incidents-evidence-add-btn").click(function () { + if ($(".incidents-upload-input").css("display") == "none") { + $(".incidents-upload-input").slideDown(250); + $(".incidents-upload-input").css("display", "block"); + $(this).removeClass("fa-plus").addClass("fa-minus"); + } else { + $(".incidents-upload-input").slideUp(250); + setTimeout(() => { + $(".incidents-upload-input").css("display", "none"); + }, 250); + $(this).removeClass("fa-minus").addClass("fa-plus"); + } + }); + + $("#incidents-upload-input").keydown(function (e) { + if (e.keyCode === 13) { + let URL = $("#incidents-upload-input").val(); + let cid = $(".manage-profile-citizenid-input").val(); + if (URL !== "") { + let randomNum = Math.ceil(Math.random() * 10).toString(); + $(".manage-incidents-evidence-holder").prepend( + `` + ); + $("#incidents-upload-input").val(""); + $(".incidents-upload-input").slideUp(250); + setTimeout(() => { + $(".incidents-upload-input").css("display", "none"); + }, 250); + $(".manage-incidents-evidence-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + } + }); + + $(".manage-incidents-evidence-holder").on( + "click", + ".incidents-img", + function () { + if ($(this).css("filter") == "none") { + $(this).css("filter", "blur(5px)"); + } else { + $(this).css("filter", "none"); + } + } + ); + + $(".manage-bolos-title-holder").on( + "click", + ".manage-bolos-new", + function () { + var template = ""; + if ($(".badge-logo").attr("src") == "img/ems_badge.webp") { + template = ` +
    +

    📝 ICU Room #: [ # ]

    +

    Report ID: [ Report ID ]

    +


    +

    🧍Time Admitted: [ Date and Time Here ] 

    +

    Surgery: [Yes/No]

    +

    Injuries/Ailments:

    +

    · [Enter List Of Injuries Here]

    +

     

    +

    -----

    +

    Additional Attending:

    +

    · [ List Any Other Staff Here ]

    +

    🧑‍🤝‍🧑 Additional Emergency Contacts:

    +

    · [ Name And Number ]

    +

    Notes:

    +

    · [Additional Notes Here]

    +

    -----

    +
    + `; + } + $(".manage-bolos-editing-title").html( + "You are currently creating a new BOLO" + ); + $(".manage-bolos-input-title").val(""); + $(".manage-bolos-input-plate").val(""); + $(".manage-bolos-input-owner").val(""); + $(".manage-bolos-input-individual").val(""); + $(".manage-bolos-reports-content").trumbowyg({ + changeActiveDropdownIcon: true, + imageWidthModalEdit: true, + btns: [ + ['foreColor', 'backColor','fontfamily','fontsize','indent', 'outdent'], + ['strong', 'em',], ['insertImage'], + ['viewHTML'], + ['undo', 'redo'], + ['formatting'], + ['superscript', 'subscript'], + ['link'], + ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'], + ['horizontalRule'] + ], + }); + $(".manage-bolos-reports-content").trumbowyg('html', template); + $(".manage-bolos-tags-holder").empty(); + $(".bolo-gallery-inner-container").empty(); + $(".manage-officers-tags-holder").empty(); + + if ($(".manage-bolos-tags-add-btn").hasClass("fa-minus")) { + $(".manage-bolos-tags-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + if ($(".bolo-gallery-add-btn").hasClass("fa-minus")) { + $(".bolo-gallery-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + + if ($(".bolo-gallery-upload-input").css("display") == "block") { + $(".bolo-gallery-upload-input").slideUp(250); + setTimeout(() => { + $(".bolo-gallery-upload-input").css("display", "none"); + }, 250); + } + + canInputTag = true; + canInputBoloTag = true; + canInputBoloOfficerTag = true; + + $(".tag-bolo-input").remove(); + canInputBoloTag = true; + + //} + } + ); + + $(".manage-bolos-title-holder").on( + "click", + ".manage-bolos-save", + function () { + let existing = !( + $(".manage-bolos-editing-title").html() == + "You are currently creating a new BOLO" + ); + let id = $(".manage-bolos-editing-title").data("id"); + let title = $("#bolotitle").val(); + let plate = $("#boloplate").val(); + let owner = $("#boloowner").val(); + let individual = $("#boloindividual").val(); + let detail = $("#bolodetail").val(); + + let tags = new Array(); + let gallery = new Array(); + let officers = new Array(); + + $(".manage-bolos-tags-holder").each(function (index) { + if ($(this).text() != "") { + tags.push($(this).text()); + } + }); + + $(".bolo-gallery-inner-container") + .find("img") + .each(function () { + if ($(this).attr("src") != "") { + gallery.push($(this).attr("src")); + } + }); + + $(".manage-officers-tags-holder") + .find("div") + .each(function () { + if ($(this).text() != "") { + officers.push($(this).text()); + } + }); + + let time = new Date(); + + $.post( + `https://${GetParentResourceName()}/newBolo`, + JSON.stringify({ + existing: existing, + id: id, + title: title, + plate: plate, + owner: owner, + individual: individual, + detail: detail, + tags: tags, + gallery: gallery, + officers: officers, + time: time.getTime(), + }) + ); + } + ); + + $(".manage-incidents-evidence-holder").on( + "contextmenu", + ".incidents-img", + function (e) { + let args = [ + { + className: "remove-image-incident", + icon: "fas fa-times", + text: "Remove Image", + info: $(this).attr("src"), + status: "", + }, + { + className: "expand-image", + icon: "fas fa-expand", + text: "Expand Image", + info: $(this).attr("src"), + status: $(this).css("filter"), + }, + { + className: "copy-image-link", + icon: "fa-regular fa-copy", + text: "Copy Image Link", + info: $(this).attr("src"), + status: $(this).css("filter"), + }, + ]; + openContextMenu(e, args); + } + ); + + $(".bolos-search-title").click(function () { + if (canSearchForProfiles == true) { + if ($(".bolos-search-input").css("display") == "none") { + $(".bolos-search-input").slideDown(250); + $(".bolos-search-input").css("display", "block"); + } else { + $(".bolos-search-input").slideUp(250); + setTimeout(() => { + $(".bolos-search-input").css("display", "none"); + }, 250); + } + } + }); + + $("#bolos-search-input").keydown(function (e) { + if (e.keyCode === 13 && canSearchForProfiles == true) { + let searchVal = $("#bolos-search-input").val(); + if (searchVal !== "") { + canSearchForProfiles = false; + $.post( + `https://${GetParentResourceName()}/searchBolos`, + JSON.stringify({ + searchVal: searchVal, + }) + ); + $(".bolos-items").empty(); + $(".bolos-items").prepend(`
    `); + } + } + }); + + $(".bolos-search-refresh").click(function () { + if (canRefreshBolo == true) { + canRefreshBolo = false; + $(".bolos-search-refresh").empty(); + $(".bolos-search-refresh").prepend( + `` + ); + setTimeout(() => { + $(".bolos-search-refresh").empty(); + $(".bolos-search-refresh").html("Refresh"); + canRefreshBolo = true; + $.post(`https://${GetParentResourceName()}/getAllBolos`, JSON.stringify({})); + }, 1500); + } + }); + + $(".manage-bolos-tags-add-btn").click(function () { + if (canInputBoloTag) { + $(this).removeClass("fa-plus").addClass("fa-minus"); + $(".manage-bolos-tags-holder").prepend( + `` + ); + canInputBoloTag = false; + } else if (!canInputBoloTag) { + $(this).removeClass("fa-minus").addClass("fa-plus"); + $(".tag-bolo-input").remove(); + canInputBoloTag = true; + } + }); + + $(".manage-bolos-tags-holder").on( + "keydown", + ".tag-bolo-input", + function (e) { + if (e.keyCode === 13) { + $(".manage-bolos-tags-holder").prepend( + `
    ${$(".tag-bolo-input").text()}
    ` + ); + // Have it save instantly if it's an existing report. + if ($(".manage-bolos-tags-add-btn").hasClass("fa-minus")) { + $(".manage-bolos-tags-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + $(".tag-bolo-input").remove(); + canInputBoloTag = true; + } + } + ); + + $(".bolo-gallery-add-btn").click(function () { + //if ($(".manage-profile-citizenid-input").val()) { + if ($(".bolo-gallery-upload-input").css("display") == "none") { + $(".bolo-gallery-upload-input").slideDown(250); + $(".bolo-gallery-upload-input").css("display", "block"); + $(this).removeClass("fa-plus").addClass("fa-minus"); + } else { + $(".bolo-gallery-upload-input").slideUp(250); + setTimeout(() => { + $(".bolo-gallery-upload-input").css("display", "none"); + }, 250); + $(this).removeClass("fa-minus").addClass("fa-plus"); + } + //} else { + // $(this).effect("shake", { times: 2, distance: 2 }, 500) + // } + }); + + $("#bolo-gallery-upload-input").keydown(function (e) { + if (e.keyCode === 13) { + let URL = $("#bolo-gallery-upload-input").val(); + let cid = $(".manage-profile-citizenid-input").val(); + if (URL !== "") { + let randomNum = Math.ceil(Math.random() * 10).toString(); + $(".bolo-gallery-inner-container").prepend( + `` + ); + $("#bolo-gallery-upload-input").val(""); + $(".bolo-gallery-upload-input").slideUp(250); + setTimeout(() => { + $(".bolo-gallery-upload-input").css("display", "none"); + }, 250); + $(".bolo-gallery-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + } + }); + + $(".bolos-items").on("click", ".bolo-item", function () { + if ($(".manage-bolos-tags-add-btn").hasClass("fa-minus")) { + $(".manage-bolos-tags-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + if ($(".bolo-gallery-add-btn").hasClass("fa-minus")) { + $(".bolo-gallery-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + + if ($(".bolo-gallery-upload-input").css("display") == "block") { + $(".bolo-gallery-upload-input").slideUp(250); + setTimeout(() => { + $(".bolo-gallery-upload-input").css("display", "none"); + }, 250); + } + + canInputTag = true; + canInputBoloTag = true; + canInputBoloOfficerTag = true; + let id = $(this).data("id"); + $.post( + `https://${GetParentResourceName()}/getBoloData`, + JSON.stringify({ + id: id, + }) + ); + }); + + $(".contextmenu").on("click", ".bolo-delete", function () { + if ($(this).data("info") != 0) { + if ($(".badge-logo").attr("src") == "img/ems_badge.webp") { + $(".bolos-items") + .find("[data-id='" + $(this).data("info") + "']") + .remove(); + $.post( + `https://${GetParentResourceName()}/deleteICU`, + JSON.stringify({ + id: $(this).data("info"), + }) + ); + } + $(".bolos-items") + .find("[data-id='" + $(this).data("info") + "']") + .remove(); + $.post( + `https://${GetParentResourceName()}/deleteBolo`, + JSON.stringify({ + id: $(this).data("info"), + }) + ); + } + }); + + $(".bolos-items").on("contextmenu", ".bolo-item", function (e) { + var args = ""; + args = [ + { + className: "bolo-delete", + icon: "fas fa-times", + text: "Delete Bolo", + info: $(this).data("id"), + status: "", + }, + ]; + if ($(".badge-logo").attr("src") == "img/ems_badge.webp") { + args = [ + { + className: "bolo-delete", + icon: "fas fa-times", + text: "Delete Check-In", + info: $(this).data("id"), + status: "", + }, + ]; + } + openContextMenu(e, args); + }); + $(".incidents-ghost-holder").on( + "contextmenu", + ".associated-incidents-user-holder", + function (e) { + let args = [ + { + className: "add-charge", + icon: "fas fa-check", + text: "Modify Charges", + info: $(this).data("name"), + status: "", + }, + ]; + openContextMenu(e, args); + } + ); + $(".contextmenu").on("click", ".add-charge", function () { + let stupidasscid = $(this).data("info"); + $(".incidents-charges-table").slideDown(500); + $(".incidents-charges-table").fadeIn(500); + $("#current-charges-holder").data("cid", $(this).data("info")); + $("#current-charges-holder").html(""); + $(".associated-incidents-user-holder") + .children("div") + .each(function (index) { + if ( + $(".associated-incidents-user-holder") + .children() + .eq(index) + .data("id") == stupidasscid + ) { + const randomNum = Math.ceil( + Math.random() * 1000 + ).toString(); + $("#current-charges-holder").prepend( + `
    ${$( + ".associated-incidents-user-holder" + ) + .children() + .eq(index) + .html()}
    ` + ); + } + }); + setTimeout(() => { + $(".close-all").css("filter", "brightness(30%)"); + }, 250); + $.post(`https://${GetParentResourceName()}/getPenalCode`, JSON.stringify({})); + }); + + var shiftPressed = false; + $(document).keydown(function (event) { + shiftPressed = event.keyCode == 16; + }); + $(document).keyup(function (event) { + if (event.keyCode == 16) { + shiftPressed = false; + } + }); + + $(".offenses-main-container").on("mousedown",".offense-item",function (e) { + const cid = $("#current-charges-holder").data("cid"); + const newItem = $(this).find(".offense-item-offense").html(); + const Fine = +$(this).data("fine"); + const Sentence = +$(this).data("sentence"); + if (e.which == 1) { + let randomNum = Math.ceil(Math.random() * 1000).toString(); + $(`[data-name="${cid}"]`).prepend(`
    ${$(this).find(".offense-item-offense").html()}
    `); + $("#current-charges-holder").prepend(`
    ${$(this).find(".offense-item-offense").html()}
    `); + + const CurrRfine = $(".fine-recommended-amount").filter(`[data-id="${cid}"]`).val(); + const NewFine = +CurrRfine + +Fine; + $(".fine-recommended-amount").filter(`[data-id="${cid}"]`).val(NewFine); + + const CurrRsentence = $(".sentence-recommended-amount").filter(`[data-id="${cid}"]`).val(); + const NewSentence = +CurrRsentence + +Sentence; + $(".sentence-recommended-amount").filter(`[data-id="${cid}"]`).val(NewSentence); + + } else if (e.which == 3) { + $(".associated-incidents-user-holder").children("div").each(function (index) { + if ($(".associated-incidents-user-holder").children().eq(index).data("id") == cid) { + if ($(".associated-incidents-user-holder").children().eq(index).html() == newItem) { + const linkedId = $(".associated-incidents-user-holder").children().eq(index).data("link"); + //$(".current-charges-tag").filter(`[data-link="${linkedId}"]`).remove() + $(".white-tag").filter(`[data-link="${linkedId}"]`).remove(); + + var stop = false; + + $("#current-charges-holder").children("div").each(function (index) { + if (stop == false) { + if ($("#current-charges-holder").children().eq(index).html() == newItem) { + const linkedId = $("#current-charges-holder").children().eq(index).data("link"); + $(".current-charges-tag").filter(`[data-link="${linkedId}"]`).remove(); + stop = true; + } + } + }); + + const CurrRfine = $(".fine-recommended-amount").filter(`[data-id="${cid}"]`).val(); + const NewFine = +CurrRfine - Fine; + $(".fine-recommended-amount").filter(`[data-id="${cid}"]`).val(NewFine); + + const CurrRsentence = $(".sentence-recommended-amount").filter(`[data-id="${cid}"]`).val(); + const NewSentence = +CurrRsentence - +Sentence; + $(".sentence-recommended-amount").filter(`[data-id="${cid}"]`).val(NewSentence); + return false; + } + } + }); + } + } + ); + + var timeout; + $(".offenses-main-container").on("mouseenter",".offense-item",function (e) { + var descr = $(this).data("descr") + timeout = setTimeout(function() { + let args = [ + { + className: "incidents-remove-tag", + text: "Remove Tag", + info: descr, + status: "", + }, + ]; + openChargesContextMenu(e, args); + }, 500); + }); + + $(".offenses-main-container").on("mouseleave",".offense-item",function (e) { + clearTimeout(timeout) + hideChargesMenu(); + }); + + $(".bolo-gallery-inner-container").on("click", ".bolo-img", function () { + if ($(this).css("filter") == "none") { + $(this).css("filter", "blur(5px)"); + } else { + $(this).css("filter", "none"); + } + }); + $(".contextmenu").on("click", ".bolo-remove-image", function () { + $(".bolo-gallery-inner-container img") + .filter("[src='" + $(this).data("info") + "']") + .remove(); + }); + $(".bolo-gallery-inner-container").on( + "contextmenu", + ".bolo-img", + function (e) { + let args = [ + { + className: "bolo-remove-image", + icon: "fas fa-times", + text: "Remove Image", + info: $(this).attr("src"), + status: "", + }, + { + className: "expand-image", + icon: "fas fa-expand", + text: "Expand Image", + info: $(this).attr("src"), + status: $(this).css("filter"), + }, + { + className: "copy-image-link", + icon: "fa-regular fa-copy", + text: "Copy Image Link", + info: $(this).attr("src"), + status: $(this).css("filter"), + }, + ]; + openContextMenu(e, args); + } + ); + + $(".officers-add-btn").click(function () { + document.addEventListener("mouseup", onMouseDownIncidents); + const source = "bolos-officers"; + $(".incidents-person-search-holder").attr("data-source", source); + $(".incidents-person-search-container").fadeIn(250); // makes the container visible + $(".close-all").css("filter", "brightness(15%)"); + }); + + $(".incidents-ghost-holder").on( + "click", + ".associated-incidents-user-tag", + function () { + if ($(this).hasClass("red-tag")) { + $(this).removeClass("red-tag"); + $(this).addClass("green-tag"); + if ($(this).text() == "Associated") { + $(".associated-incidents-user-holder") + .filter(`[data-name="${$(this).data("id")}"]`) + .css("display", "none"); + $(".associated-incidents-fine-input") + .filter(`[data-id="${$(this).data("id")}"]`) + .css("display", "none"); + $(".manage-incidents-title-tag") + .filter(`[data-id="${$(this).data("id")}"]`) + .css("display", "none"); + $(".associated-incidents-sentence-input") + .filter(`[data-id="${$(this).data("id")}"]`) + .css("display", "none"); + $(".associated-incidents-controls") + .filter(`[data-id="${$(this).data("id")}"]`) + .css("display", "none"); + } + } else { + $(this).removeClass("green-tag"); + $(this).addClass("red-tag"); + if ($(this).text() == "Associated") { + $(".associated-incidents-user-holder") + .filter(`[data-name="${$(this).data("id")}"]`) + .fadeIn(100); + $(".associated-incidents-fine-input") + .filter(`[data-id="${$(this).data("id")}"]`) + .fadeIn(100); + $(".manage-incidents-title-tag") + .filter(`[data-id="${$(this).data("id")}"]`) + .fadeIn(100); + $(".associated-incidents-sentence-input") + .filter(`[data-id="${$(this).data("id")}"]`) + .fadeIn(100); + $(".associated-incidents-controls") + .filter(`[data-id="${$(this).data("id")}"]`) + .fadeIn(100); + } + } + } + ); + + $('.incidents-ghost-holder').on('click', '#jail-button', function() { + // Get the current sentence and recommended sentence values + const citizenId = $(this).data("id"); + const sentence = $(".sentence-amount").filter(`[data-id=${citizenId}]`).val(); + const recommendSentence = $(".sentence-recommended-amount").filter(`[data-id=${citizenId}]`).val(); + sendToJail(citizenId, sentence, recommendSentence); + }); + + $('.incidents-ghost-holder').on('click', '#fine-button', function() { + // Get the current fine and recommended fine values + const citizenId = $(this).data("id"); + const fine = $(".fine-amount").filter(`[data-id=${citizenId}]`).val(); + const recommendFine = $(".fine-recommended-amount").filter(`[data-id=${citizenId}]`).val(); + const incidentId = $(".manage-incidents-editing-title").data("id"); + sendFine(citizenId, fine, recommendFine, incidentId); + }); + + $('.incidents-ghost-holder').on('click', '#community-service-button', function() { + // Get the current sentence and recommended sentence values + const citizenId = $(this).data("id"); + const sentence = $(".sentence-amount").filter(`[data-id=${citizenId}]`).val(); + const recommendSentence = $(".sentence-recommended-amount").filter(`[data-id=${citizenId}]`).val(); + sendToCommunityService(citizenId, sentence, recommendSentence); + }); + + $(".contextmenu").on( + "click", + ".associated-incidents-remove-tag", + function () { + $( + `.associated-incidents-tag:contains(${$(this).data("info")})` + ).remove(); + $( + `.associated-incidents-user-title:contains(${$(this).data( + "info" + )})` + ) + .parent() + .remove(); + const incidentId = $(".manage-incidents-editing-title").data("id"); + if (incidentId != 0) { + $.post( + `https://${GetParentResourceName()}/removeIncidentCriminal`, + JSON.stringify({ + cid: $(this).data("status"), + incidentId: incidentId, + }) + ); + } + } + ); + $(".associated-incidents-tags-holder").on( + "contextmenu", + ".associated-incidents-tag", + function (e) { + let args = [ + { + className: "associated-incidents-remove-tag", + icon: "fas fa-times", + text: "Remove Tag", + info: $(this).html(), + status: $(this).data("id"), + }, + ]; + openContextMenu(e, args); + } + ); + + // On click of the search item, it populates the results in the correct area that the search component was triggered from + $(".incidents-person-search-holder").on( + "click", + ".incidents-person-search-item", + function () { + $(".incidents-person-search-container").fadeOut(250); + $(".close-all").css("filter", "none"); + + // This is the source element where we triggered the search component to open from + // It is the area where we want the results to populate when we click on a search result + const sourceElement = $(".incidents-person-search-holder").data("source"); + + // Populate the tags for the given section that corresponds to the sourceElement + if (sourceElement === "incidents-civilians") { + $(".manage-incidents-civilians-holder").append( + `
    ${$(this).data("name")}
    ` + ); + } else if (sourceElement === "incidents-officers") { + $(".manage-incidents-officers-holder").append( + `
    (${$(this).data("callsign")}) ${$(this).data("name")}
    ` + ); + } else if (sourceElement === "reports-civilians") { + $(".reports-civilians-tags-holder").append( + `
    ${$(this).data("name")}
    ` + ); + } else if (sourceElement === "reports-officers") { + $(".reports-officers-tags-holder").append( + `
    (${$(this).data("callsign")}) ${$(this).data("name")}
    ` + ); + } else if (sourceElement === "bolos-officers") { + $(".manage-officers-tags-holder").append( + `
    (${$(this).data("callsign")}) ${$(this).data("name")}
    ` + ); + } else if(sourceElement === "associated-incidents-tags") { + $(".associated-incidents-tags-holder").prepend( + `
    ${$(this).data("name")}
    ` + ); + + // This section handles populating the fields when you add a new associated user to the incident + $(".incidents-ghost-holder").prepend( + ` +
    +
    ${$(this).data("info")}
    +
    +
    Warrant
    +
    Guilty
    +
    Processed
    +
    Associated
    +
    +
    Right click below to add and/or modify charges.
    +
    +
    Recommended Fine
    +
    +
    Recommended Sentence
    +
    +
    Fine
    +
    +
    Sentence
    +
    +
    +
    Jail
    +
    Fine
    + ${canSendToCommunityService ? `
    Community Service
    ` : ''} +
    +
    + ` + ); + } + + // Clear the search results and source + $(".incidents-person-search-holder").removeData("source"); // Without using this line, we end up reading stale data from the data-source attribute rather than the data-source from the field we clicked on + $(".incidents-person-search-holder").empty(); // Clear the search results + $('.incidents-person-search-name-input').val(''); // Reset the search input field + } + ); + + $(".contextmenu").on("click", ".incidents-remove-tag", function () { + $(`.tag:contains(${$(this).data("info")})`).remove(); + }); + + $(".manage-incidents-tags-holder").on("contextmenu", ".tag", function (e) { + let args = [ + { + className: "incidents-remove-tag", + icon: "fas fa-times", + text: "Remove Tag", + info: $(this).html(), + status: "", + }, + ]; + openContextMenu(e, args); + }); + + $(".contextmenu").on("click", ".remove-tag", function () { + $( + `.tag:contains(${$(this).data("info")})` + ).remove(); + }); + + // Setup the remove tag context menu for each holder section + const holdersSelectors = [".manage-incidents-civilians-holder", ".manage-incidents-officers-holder", ".reports-civilians-tags-holder", ".reports-officers-tags-holder", ".manage-officers-tags-holder"]; + holdersSelectors.forEach(holder => { + $(holder).on( + "contextmenu", + ".tag", + function (e) { + let args = [ + { + className: "remove-tag", + icon: "fas fa-times", + text: "Remove Tag", + info: $(this).html(), + status: "", + }, + ]; + openContextMenu(e, args); + }); + }); + + $(".incidents-search-refresh").click(function () { + if (canRefreshIncidents == true) { + canRefreshIncidents = false; + $(".incidents-search-refresh").empty(); + $(".incidents-search-refresh").prepend( + `` + ); + setTimeout(() => { + $(".incidents-search-refresh").empty(); + $(".incidents-search-refresh").html("Refresh"); + canRefreshIncidents = true; + $.post(`https://${GetParentResourceName()}/getAllIncidents`, JSON.stringify({})); + }, 1500); + } + }); + + $(".contextmenu").on("click", ".incidents-remove-normal-tag", function () { + $(`.tag:contains(${$(this).data("info")})`).remove(); + let cid = $(".manage-profile-citizenid-input").val(); + if (cid) { + $.post( + `https://${GetParentResourceName()}/removeProfileTag`, + JSON.stringify({ + cid: cid, + text: $(this).data("info"), + }) + ); + } + }); + $(".tags-holder").on("contextmenu", ".tag", function (e) { + let args = [ + { + className: "incidents-remove-normal-tag", + icon: "fas fa-times", + text: "Remove Tag", + info: $(this).html(), + status: "", + }, + ]; + openContextMenu(e, args); + }); + + $(".reports-search-title").click(function () { + if (canSearchReports == true) { + if ($(".reports-search-input").css("display") == "none") { + $(".reports-search-input").slideDown(250); + $(".reports-search-input").css("display", "block"); + } else { + $(".reports-search-input").slideUp(250); + setTimeout(() => { + $(".reports-search-input").css("display", "none"); + }, 250); + } + } + }); + $(".incidents-person-search-container").hover( + function () { + mouse_is_inside = true; + }, + function () { + mouse_is_inside = false; + } + ); + + $(".convictions-known-container").hover( + function () { + mouse_is_inside = true; + }, + function () { + mouse_is_inside = false; + } + ); + + $(".incidents-known-container").hover( + function () { + mouse_is_inside = true; + }, + function () { + mouse_is_inside = false; + } + ); + + $(".reports-search-refresh").click(function () { + if (canRefreshReports == true) { + canRefreshReports = false; + $(".reports-search-refresh").empty(); + $(".reports-search-refresh").prepend( + `` + ); + setTimeout(() => { + $(".reports-search-refresh").empty(); + $(".reports-search-refresh").html("Refresh"); + canRefreshReports = true; + $.post(`https://${GetParentResourceName()}/getAllReports`, JSON.stringify({})); + }, 1500); + } + }); + + $(".dispatch-comms-refresh").click(function () { + $(".dispatch-comms-refresh").empty(); + $(".dispatch-comms-refresh").prepend( + `` + ); + setTimeout(() => { + $(".dispatch-comms-refresh").empty(); + $(".dispatch-comms-refresh").html("Refresh"); + canRefreshReports = true; + $.post(`https://${GetParentResourceName()}/refreshDispatchMsgs`, JSON.stringify({})); + }, 1500); + }); + + $(".reports-items").on("click", ".reports-item", function () { + if (currentTab != ".reports-page-container") { + fidgetSpinner(".reports-page-container"); + currentTab = ".reports-page-container"; + } + + if ($(".manage-reports-tags-add-btn").hasClass("fa-minus")) { + $(".manage-reports-tags-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + if ($(".reports-gallery-add-btn").hasClass("fa-minus")) { + $(".reports-gallery-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + + if ($(".reports-gallery-upload-input").css("display") == "block") { + $(".reports-gallery-upload-input").slideUp(250); + setTimeout(() => { + $(".reports-gallery-upload-input").css("display", "none"); + }, 250); + } + + canInputTag = true; + canInputReportTag = true; + canInputReportOfficerTag = true; + let id = $(this).data("id"); + $.post( + `https://${GetParentResourceName()}/getReportData`, + JSON.stringify({ + id: id, + }) + ); + }); + + $(".manage-reports-tags-add-btn").click(function () { + if (canInputReportTag) { + $(this).removeClass("fa-plus").addClass("fa-minus"); + $(".manage-reports-tags-holder").prepend( + `` + ); + canInputReportTag = false; + } else if (!canInputReportTag) { + $(this).removeClass("fa-minus").addClass("fa-plus"); + $(".tag-reports-input").remove(); + canInputReportTag = true; + } + }); + + $(".manage-reports-tags-holder").on( + "keydown", + ".tag-reports-input", + function (e) { + if (e.keyCode === 13) { + $(".manage-reports-tags-holder").prepend( + `
    ${$(".tag-reports-input").text()}
    ` + ); + // Have it save instantly if it's an existing report. + if ($(".manage-reports-tags-add-btn").hasClass("fa-minus")) { + $(".manage-reports-tags-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + $(".tag-reports-input").remove(); + canInputReportTag = true; + } + } + ); + + $(".reports-gallery-add-btn").click(function () { + //if ($(".manage-profile-citizenid-input").val()) { + if ($(".reports-gallery-upload-input").css("display") == "none") { + $(".reports-gallery-upload-input").slideDown(250); + $(".reports-gallery-upload-input").css("display", "block"); + $(this).removeClass("fa-plus").addClass("fa-minus"); + } else { + $(".reports-gallery-upload-input").slideUp(250); + setTimeout(() => { + $(".reports-gallery-upload-input").css("display", "none"); + }, 250); + $(this).removeClass("fa-minus").addClass("fa-plus"); + } + //} else { + // $(this).effect("shake", { times: 2, distance: 2 }, 500) + // } + }); + + $("#reports-gallery-upload-input").keydown(function (e) { + if (e.keyCode === 13) { + let URL = $("#reports-gallery-upload-input").val(); + let cid = $(".manage-profile-citizenid-input").val(); + if (URL !== "") { + let randomNum = Math.ceil(Math.random() * 10).toString(); + $(".reports-gallery-inner-container").prepend( + `` + ); + $("#reports-gallery-upload-input").val(""); + $(".reports-gallery-upload-input").slideUp(250); + setTimeout(() => { + $(".reports-gallery-upload-input").css("display", "none"); + }, 250); + $(".reports-gallery-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + } + }); + + $(".reports-gallery-inner-container").on( + "click", + ".reports-img", + function () { + if ($(this).css("filter") == "none") { + $(this).css("filter", "blur(5px)"); + } else { + $(this).css("filter", "none"); + } + } + ); + $(".contextmenu").on("click", ".reports-remove-image", function () { + $(".reports-gallery-inner-container img") + .filter("[src='" + $(this).data("info") + "']") + .remove(); + }); + + $(".reports-gallery-inner-container").on( + "contextmenu", + ".reports-img", + function (e) { + let args = [ + { + className: "reports-remove-image", + icon: "fas fa-times", + text: "Remove Image", + info: $(this).attr("src"), + status: "", + }, + { + className: "expand-image", + icon: "fas fa-expand", + text: "Expand Image", + info: $(this).attr("src"), + status: $(this).css("filter"), + }, + { + className: "copy-image-link", + icon: "fa-regular fa-copy", + text: "Copy Image Link", + info: $(this).attr("src"), + status: $(this).css("filter"), + }, + ]; + openContextMenu(e, args); + } + ); + + $(".reports-officers-add-btn").click(function () { + const source = "reports-officers"; + document.addEventListener("mouseup", onMouseDownIncidents); + $(".incidents-person-search-holder").attr("data-source", source); + $(".incidents-person-search-container").fadeIn(250); // makes the container visible + $(".close-all").css("filter", "brightness(15%)"); + }); + + $(".reports-civilians-add-btn").click(function () { + document.addEventListener("mouseup", onMouseDownIncidents); + const source = "reports-civilians"; + $(".incidents-person-search-holder").attr("data-source", source); + $(".incidents-person-search-container").fadeIn(250); // makes the container visible + $(".close-all").css("filter", "brightness(15%)"); + }); + + $(".manage-reports-title-holder").on( + "click", + ".manage-reports-new", + function () { + let template = ""; + if ($(".badge-logo").attr("src") == "img/ems_badge.webp") { + template = ` +
    +

    Submitted to ICU?: [Yes/No]

    +

    Incident Report:

    +

    · [ Brief summary of what happened and who did what while on scene. Note anything that stood out about the scene as well as what was done to treat the patient ]

    +

    List of Injuries:

    +

    · [ State what injury or injuries occurred ]

    +

    Surgical Report:

    +

    · [ Full report on what was done in surgery, list any complications or anything that was found while in operation. Note who was attending and what they did during the surgery. At the end of the report be sure to note the state of the patient after ]

    +

    -----

    +

    Attending:

    +

    · [ List Any Attending Here ]

    +

    Medications Applied:

    +

    · [ List Any Attending Here ]

    +

    -----

    +
    +

    Notes:

    +

    [ Additional Notes Here ]

    +
    +`;} + $(".manage-reports-editing-title").html( + "You are currently creating a new report" + ); + $(".manage-reports-input-title").val(""); + $(".manage-reports-input-type").val(""); + $(".manage-reports-reports-content").trumbowyg({ + changeActiveDropdownIcon: true, + imageWidthModalEdit: true, + btns: [ + ['foreColor', 'backColor','fontfamily','fontsize','indent', 'outdent'], + ['strong', 'em',], ['insertImage'], + ['viewHTML'], + ['undo', 'redo'], + ['formatting'], + ['superscript', 'subscript'], + ['link'], + ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'], + ['horizontalRule'] + ], + }); + $(".manage-reports-reports-content").trumbowyg('html', template); + $(".manage-reports-tags-holder").empty(); + $(".reports-gallery-inner-container").empty(); + $(".reports-officers-tags-holder").empty(); + $(".reports-civilians-tags-holder").empty(); + + if ($(".manage-reports-tags-add-btn").hasClass("fa-minus")) { + $(".manage-reports-tags-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + if ($(".reports-gallery-add-btn").hasClass("fa-minus")) { + $(".reports-gallery-add-btn") + .removeClass("fa-minus") + .addClass("fa-plus"); + } + + if ($(".reports-gallery-upload-input").css("display") == "block") { + $(".reports-gallery-upload-input").slideUp(250); + setTimeout(() => { + $(".reports-gallery-upload-input").css("display", "none"); + }, 250); + } + + canInputTag = true; + canInputReportTag = true; + canInputReportOfficerTag = true; + + $(".tag-reports-input").remove(); + canInputReportTag = true; + + //} + } + ); + + $("#reports-search-input").keydown(function (e) { + if (e.keyCode === 13 && canSearchForReports == true) { + let name = $(this).val(); + if (name !== "") { + canSearchForReports = false; + $.post( + `https://${GetParentResourceName()}/searchReports`, + JSON.stringify({ + name: name, + }) + ); + $(".reports-items").empty(); + $(".reports-items").prepend( + `
    ` + ); + } + } + }); + + $(".manage-reports-title-holder").on( + "click", + ".manage-reports-save", + function () { + let existing = !( + $(".manage-reports-editing-title").html() == + "You are currently creating a new report" + ); + let id = $(".manage-reports-editing-title").data("id"); + let title = $("#reporttitle").val(); + let type = $("#reporttype").val(); + let details = $("#reportdetail").val(); + let tags = new Array(); + let gallery = new Array(); + let officers = new Array(); + let civilians = new Array(); + + $(".manage-reports-tags-holder") + .find("div") + .each(function () { + if ($(this).text() != "") { + tags.push($(this).text()); + } + }); + + $(".reports-gallery-inner-container") + .find("img") + .each(function () { + if ($(this).attr("src") != "") { + gallery.push($(this).attr("src")); + } + }); + + $(".reports-officers-tags-holder") + .find("div") + .each(function () { + if ($(this).text() != "") { + officers.push($(this).text()); + } + }); + + $(".reports-civilians-tags-holder") + .find("div") + .each(function () { + if ($(this).text() != "") { + civilians.push($(this).text()); + } + }); + + let time = new Date(); + + $.post( + `https://${GetParentResourceName()}/newReport`, + JSON.stringify({ + existing: existing, + id: id, + title: title, + type: type, + details: details, + tags: tags, + gallery: gallery, + officers: officers, + civilians: civilians, + time: time.getTime(), + }) + ); + } + ); + + $(".dmv-search-title").click(function () { + if (canSearchForVehicles == true) { + if ($(".dmv-search-input").css("display") == "none") { + $(".dmv-search-input").slideDown(250); + $(".dmv-search-input").css("display", "block"); + } else { + $(".dmv-search-input").slideUp(250); + setTimeout(() => { + $(".dmv-search-input").css("display", "none"); + }, 250); + } + } + }); + + $("#dmv-search-input").keydown(async function (e) { + if (e.keyCode === 13 && canSearchForVehicles == true) { + let name = $("#dmv-search-input").val(); + if (name !== "") { + canSearchForVehicles = false; + $(".dmv-items").empty(); + $(".dmv-items").prepend(`
    `); + + let result = await $.post( + `https://${GetParentResourceName()}/searchVehicles`, + JSON.stringify({ + name: name, + }) + ); + if (result.length === 0) { + $(".dmv-items").html( + ` +
    + +
    +
    +
    No Vehicles Matching that search
    +
    +
    +
    +
    +
    + ` + ); + canSearchForVehicles = true; + return true; + } + $(".dmv-items").empty(); + + let vehicleHTML = ""; + + result.forEach((value) => { + let paint = value.color; + let impound = "red-tag"; + let bolo = "red-tag"; + let codefive = "red-tag"; + let stolen = "red-tag"; + + if (value.state == 'Impounded') { + impound = "green-tag"; + } + + if (value.bolo) { + bolo = "green-tag"; + } + + if (value.code) { + codefive = "green-tag"; + } + + if (value.stolen) { + stolen = "green-tag"; + } + + vehicleHTML += ` +
    + +
    +
    +
    ${value.model}
    +
    +
    ${value.colorName}
    +
    Impound
    +
    BOLO
    +
    Stolen
    +
    Code 5
    +
    +
    +
    +
    Plate: ${value.plate} · Owner: ${value.owner}
    +
    +
    +
    + `; + }); + + $(".dmv-items").html(vehicleHTML); + + canSearchForVehicles = true; + + } + } + }); + + $(".dmv-items").on("click", ".dmv-item", function () { + $.post( + `https://${GetParentResourceName()}/getVehicleData`, + JSON.stringify({ + plate: $(this).data("plate"), + }) + ); + }); + + $(".vehicle-information-title-holder").on( + "click", + ".vehicle-information-save", + function () { + if (canSaveVehicle) { + canSaveVehicle = false; + $(".vehicle-information-save").empty(); + $(".vehicle-information-save").prepend( + `` + ); + setTimeout(() => { + $(".vehicle-information-save").empty(); + $(".vehicle-information-save").html("Save"); + canSaveVehicle = true; + }, 750); + setTimeout(() => { + let dbid = $(".vehicle-information-title-holder").data("dbid"); + let plate = $(".vehicle-info-plate-input").val(); + let notes = $(".vehicle-info-content").val(); + let points = $("#vehiclePointsSlider").val(); + + let imageurl = $(".vehicle-info-image").attr("src"); + let newImageurl = $(".vehicle-info-imageurl-input").val(); + if (newImageurl.includes("base64")) { + imageurl = "img/not-found.webp"; + } else { + imageurl = newImageurl; + } + + let code5 = false; + let code5tag = $(".vehicle-tags").find(".code5-tag"); + if (code5tag.hasClass("green-tag")) { + code5 = true + } + + let stolen = false; + let stolentag = $(".vehicle-tags").find(".stolen-tag"); + if (stolentag.hasClass("green-tag")) { + stolen = true + } + + let impoundInfo = {} + impoundInfo.impoundActive = $(".vehicle-tags").find(".impound-tag").hasClass("green-tag") + impoundInfo.impoundChanged = impoundChanged + if (impoundChanged === true) { + if (impoundInfo.impoundActive === true) { + impoundInfo.plate = $(".impound-plate").val(); + impoundInfo.linkedreport = $(".impound-linkedreport").val(); + impoundInfo.fee = $(".impound-fee").val(); + impoundInfo.time = $(".impound-time").val(); + } + } + + $.post( + `https://${GetParentResourceName()}/saveVehicleInfo`, + JSON.stringify({ + dbid: dbid, + plate: plate, + imageurl: imageurl, + notes: notes, + stolen: stolen, + code5: code5, + impound: impoundInfo, + points: points, + }) + ); + + impoundChanged = false; + $(".vehicle-info-image").attr("src", newImageurl); + }, 250); + } + } + ); + + $(".contextmenu").on("click", ".mark-code-5", function () { + let tag = $(".vehicle-tags").find(".code5-tag"); + if (tag.hasClass("red-tag")) { + tag.removeClass("red-tag").addClass("green-tag"); + } + }); + + $(".contextmenu").on("click", ".remove-code-5", function () { + let tag = $(".vehicle-tags").find(".code5-tag"); + if (tag.hasClass("green-tag")) { + tag.removeClass("green-tag").addClass("red-tag"); + } + }); + + $(".vehicle-tags").on("contextmenu", ".code5-tag", function (e) { + let plate = $(".vehicle-info-plate-input").val(); + if (plate) { + let args = []; + if ($(this).hasClass("red-tag")) { + args = [ + { + className: "mark-code-5", + icon: "fas fa-check", + text: "Mark as Code 5", + info: plate, + status: "", + }, + ]; + } else { + args = [ + { + className: "remove-code-5", + icon: "fas fa-times", + text: "Remove Code 5 Status", + info: plate, + status: "", + }, + ]; + } + + openContextMenu(e, args); + } + }); + + $(".contextmenu").on("click", ".mark-stolen", function () { + let tag = $(".vehicle-tags").find(".stolen-tag"); + if (tag.hasClass("red-tag")) { + tag.removeClass("red-tag").addClass("green-tag"); + } + }); + + $(".contextmenu").on("click", ".remove-stolen", function () { + let tag = $(".vehicle-tags").find(".stolen-tag"); + if (tag.hasClass("green-tag")) { + tag.removeClass("green-tag").addClass("red-tag"); + } + }); + + $(".vehicle-tags").on("contextmenu", ".stolen-tag", function (e) { + let plate = $(".vehicle-info-plate-input").val(); + if (plate) { + let args = []; + if ($(this).hasClass("red-tag")) { + args = [ + { + className: "mark-stolen", + icon: "fas fa-check", + text: "Mark as Stolen", + info: plate, + status: "", + }, + ]; + } else { + args = [ + { + className: "remove-stolen", + icon: "fas fa-times", + text: "Remove Code 5 Status", + info: plate, + status: "", + }, + ]; + } + + openContextMenu(e, args); + } + }); + + $(".contextmenu").on("click", ".impound-vehicle", function () { + const plate = $(this).data("info"); + $(".impound-linkedreport").val("").removeAttr("disabled"); + $(".impound-fee").val("").removeAttr("disabled"); + $(".impound-time").val("").removeAttr("disabled"); + $(".impound-fee").css("color", "white"); + $(".impound-cancel").html("Cancel"); + $(".impound-submit").fadeIn(250); + $(".impound-form").slideDown(250); + $(".impound-form").fadeIn(250); + $(".impound-form").data("plate", plate); + $(".impound-plate").val(plate); + }); + + $(".impound-submit").click(function () { + const plate = $(".impound-plate").val(); + const linkedreport = $(".impound-linkedreport").val(); + const fee = $(".impound-fee").val(); + const time = $(".impound-time").val(); + + if (!plate || plate === "") { + $(".impound-form").css("border", "1px solid rgb(184, 3, 3)"); + setTimeout(() => { + $(".impound-form").css( + "border", + "1px solid rgb(168, 168, 168)" + ); + }, 500); + return; + } + + if (!linkedreport || linkedreport === "") { + $(".impound-form").css("border", "1px solid rgb(184, 3, 3)"); + setTimeout(() => { + $(".impound-form").css( + "border", + "1px solid rgb(168, 168, 168)" + ); + }, 500); + return; + } + + if (!fee || fee === "") { + $(".impound-form").css("border", "1px solid rgb(184, 3, 3)"); + setTimeout(() => { + $(".impound-form").css( + "border", + "1px solid rgb(168, 168, 168)" + ); + }, 500); + return; + } + + if (!time || time === "") { + $(".impound-form").css("border", "1px solid rgb(184, 3, 3)"); + setTimeout(() => { + $(".impound-form").css( + "border", + "1px solid rgb(168, 168, 168)" + ); + }, 500); + return; + } + + /* $.post( + `https://${GetParentResourceName()}/impoundVehicle`, + JSON.stringify({ + plate: plate, + linkedreport: linkedreport, + fee: fee, + time: time, + }) + ); */ + + //$(".impound-plate").val(""); + //$(".impound-linkedreport").val(""); + //$(".impound-fee").val(""); + //$(".impound-time").val(""); + //$(".impound-fee").css("color", "white"); + + $(".vehicle-tags").find(".impound-tag").addClass("green-tag").removeClass("red-tag"); + + $(".impound-form").slideUp(250); + $(".impound-form").fadeOut(250); + impoundChanged = true; + }); + + $(".impound-cancel").click(function () { + $(".impound-form").slideUp(250); + $(".impound-form").fadeOut(250); + + $(".impound-plate").val(""); + $(".impound-linkedreport").val(""); + $(".impound-fee").val(""); + $(".impound-time").val(""); + $(".impound-fee").css("color", "white"); + }); + + $(".contextmenu").on("click", ".remove-impound", function () { + const plate = $(this).data("info"); + /* $.post( + `https://${GetParentResourceName()}/removeImpound`, + JSON.stringify({ + plate: plate, + }) + ); */ + $(".impound-plate").val(""); + $(".impound-linkedreport").val(""); + $(".impound-fee").val(""); + $(".impound-time").val(""); + impoundChanged = true; + + $(".vehicle-tags") + .find(".impound-tag") + .addClass("red-tag") + .removeClass("green-tag"); + }); + + $(".contextmenu").on("click", ".status-impound", function () { + const plate = $(this).data("info"); + $.post( + `https://${GetParentResourceName()}/statusImpound`, + JSON.stringify({ + plate: plate, + }) + ); + }); + + $(".vehicle-tags").on("contextmenu", ".impound-tag", function (e) { + let plate = $(".vehicle-info-plate-input").val(); + if (plate) { + let args = []; + if ($(this).hasClass("red-tag")) { + args = [ + { + className: "impound-vehicle", + icon: "fas fa-check", + text: "State Impound", + info: plate, + status: "", + }, + ]; + } else { + args = [ + { + className: "remove-impound", + icon: "fas fa-times", + text: "Unimpound Vehicle", + info: plate, + status: "", + }, + { + className: "status-impound", + icon: "fas fa-info-circle", + text: "View Impound Status", + info: plate, + status: "", + }, + ]; + } + openContextMenu(e, args); + } + }); + + + $(".calls-search-title").click(function () { + if (canSearchForProfiles == true) { + if ($(".calls-search-input").css("display") == "none") { + $(".calls-search-input").slideDown(250); + $(".calls-search-input").css("display", "block"); + } else { + $(".calls-search-input").slideUp(250); + setTimeout(() => { + $(".calls-search-input").css("display", "none"); + }, 250); + } + } + }); + + $("#calls-search-input").keydown(function (e) { + if (e.keyCode === 13) { + let searchCall = $("#calls-search-input").val(); + if (searchCall !== "") { + $.post( + `https://${GetParentResourceName()}/searchCalls`, + JSON.stringify({ + searchCall: searchCall, + }) + ); + $(".calls-items").empty(); + $(".calls-items").prepend(`
    `); + } + } + }); + + $(".weapons-search-title").click(function () { + if (canSearchForWeapons == true) { + if ($(".weapons-search-input").css("display") == "none") { + $(".weapons-search-input").slideDown(250); + $(".weapons-search-input").css("display", "block"); + } else { + $(".weapons-search-input").slideUp(250); + setTimeout(() => { + $(".weapons-search-input").css("display", "none"); + }, 250); + } + } + }); + + $("#weapons-search-input").keydown(async function (e) { + if (e.keyCode === 13 && canSearchForWeapons == true) { + let name = $("#weapons-search-input").val(); + if (name !== "") { + canSearchForWeapons = false; + $(".weapons-items").empty(); + $(".weapons-items").prepend(`
    `); + + let result = await $.post( + `https://${GetParentResourceName()}/searchWeapons`, + JSON.stringify({ + name: name, + }) + ); + if (result.length === 0) { + $(".weapons-items").html( + ` +
    + +
    +
    +
    No Weapons Matching that search
    +
    +
    +
    +
    +
    + ` + ); + canSearchForWeapons = true; + return true; + } + $(".weapons-items").empty(); + + let weaponHTML = ""; + + result.forEach((value) => { + weaponHTML += ` +
    + +
    +
    +
    ${value.weapModel} - Class ${value.weapClass}
    + +
    +
    +
    Serial Number: ${value.serial} · Owner: ${value.owner} · ID: ${value.id}
    +
    +
    +
    + `; + }); + + $(".weapons-items").html(weaponHTML); + + canSearchForWeapons = true; + } + } + }); + + $(".weapon-information-title-holder").on("click", ".weapon-information-new", function () { + $(".weapon-information-title-holder").data("dbid", 0); + $(".weapon-info-serial-input").val(""); + $(".weapon-info-owner-input").val(""); + $(".weapon-info-class-input").val(""); + $(".weapon-info-model-input").val(""); + $(".weapon-info-imageurl-input").val("img/not-found.webp"); + + canSaveWeapon = true; + } +); + + $(".weapon-information-title-holder").on("click", ".weapon-information-save", function () { + if (canSaveProfile == true) { + canSaveProfile = false; + $(".manage-profile-save").empty(); + $(".manage-profile-save").prepend( + `` + ); + setTimeout(() => { + $(".manage-profile-save").empty(); + $(".manage-profile-save").html("Save"); + canSaveProfile = true; + }, 750); + + setTimeout(() => { + let serial = $(".weapon-info-serial-input").val(); + let notes = $(".weapon-info-content").val(); + let owner = $(".weapon-info-owner-input").val(); + let weapClass = $(".weapon-info-class-input").val(); + let weapModel = $(".weapon-info-model-input").val(); + + let imageurl = $(".weapon-info-image").attr("src"); + let newImageurl = $(".weapon-info-imageurl-input").val(); + if (newImageurl.includes("base64")) { + imageurl = "img/not-found.webp"; + } else { + imageurl = newImageurl; + } + + $.post( + `https://${GetParentResourceName()}/saveWeaponInfo`, + JSON.stringify({ + serial: serial, + imageurl: imageurl, + notes: notes, + owner: owner, + weapClass: weapClass, + weapModel: weapModel, + }) + ); + + $(".weapon-info-image").attr("src", newImageurl); + }, 250); + } + } +); + + $(".weapons-items").on("click", ".weapons-item", function () { + $.post( + `https://${GetParentResourceName()}/getWeaponData`, + JSON.stringify({ + serial: $(this).data("serial"), + }) + ); + }); + + $(".contextmenu").on("click", ".view-profile", async function () { + const cid = $(this).data("info"); + fidgetSpinner(".profile-page-container"); + currentTab = ".profile-page-container"; + $(".profile-search-input").slideDown(250); + $(".profile-search-input").css("display", "block"); + $("#profile-search-input:text").val(cid.toString()); + canSearchForProfiles = false; + let result = await $.post( + `https://${GetParentResourceName()}/searchProfiles`, + JSON.stringify({ + name: cid, + }) + ); + + searchProfilesResults(result); + }); + + $(".contextmenu").on("click", ".view-incident2", function () { + const incidentId = $(this).data("info"); + fidgetSpinner(".incidents-page-container"); + currentTab = ".incidents-page-container"; + $(".close-all").css("filter", "none"); + $(".incidents-known-container").fadeOut(250); + setTimeout(() => { + $(".incidents-search-input").slideDown(250); + $(".incidents-search-input").css("display", "block"); + setTimeout(() => { + $("#incidents-search-input:text").val(incidentId.toString()); + canSearchForProfiles = false; + $.post( + `https://${GetParentResourceName()}/searchIncidents`, + JSON.stringify({ + incident: incidentId.toString(), + }) + ); + $(".incidents-items").empty(); + $(".incidents-items").prepend( + `
    ` + ); + setTimeout(() => { + $.post( + `https://${GetParentResourceName()}/getIncidentData`, + JSON.stringify({ + id: incidentId.toString(), + }) + ); + }, 250); + }, 250); + }, 250); + }); + $(".profile-incidents-holder").on("contextmenu", ".white-tag", function (e) { + const args = [ + { + className: "view-incident2", + icon: "fas fa-search", + text: `View Incident #${$(this).data("id")}`, + info: $(this).data("id"), + status: "", + }, + ]; + openContextMenu(e, args); + }); + + $(".contextmenu").on("click", ".view-incident", function () { + const incidentId = $(this).data("info"); + fidgetSpinner(".incidents-page-container"); + currentTab = ".incidents-page-container"; + setTimeout(() => { + $(".incidents-search-input").slideDown(250); + $(".incidents-search-input").css("display", "block"); + setTimeout(() => { + $(".close-all").css("filter", "none"); + $("#incidents-search-input:text").val(incidentId.toString()); + canSearchForProfiles = false; + $.post( + `https://${GetParentResourceName()}/searchIncidents`, + JSON.stringify({ + incident: incidentId.toString(), + }) + ); + $(".incidents-items").empty(); + $(".incidents-items").prepend( + `
    ` + ); + setTimeout(() => { + $.post( + `https://${GetParentResourceName()}/getIncidentData`, + JSON.stringify({ + id: incidentId.toString(), + }) + ); + }, 250); + }, 250); + }, 250); + }); + $(".warrants-items").on("contextmenu", ".warrants-item", function (e) { + //let information = $(this).html() + //if (information) { + args = [ + { + className: "view-profile", + icon: "far fa-eye", + text: "View Profile", + info: $(this).data("cid"), + status: "", + }, + { + className: "view-incident", + icon: "fas fa-search", + text: `View Incident #${$(this).data("id")}`, + info: $(this).data("id"), + status: "", + }, + ]; + openContextMenu(e, args); + //} + }); + + $(".contextmenu").on("click", ".toggle-duty", function () { + let info = $(this).data("info"); + let currentStatus = $(`[data-id="${info}"]`) + .find(".unit-status") + .html(); + if (currentStatus == "10-8") { + $(`[data-id="${info}"]`).find(".unit-status").html("10-7"); + $(`[data-id="${info}"]`) + .find(".unit-status") + .removeClass("green-status") + .addClass("yellow-status"); + $.post( + `https://${GetParentResourceName()}/toggleDuty`, + JSON.stringify({ + cid: info, + status: 0, + }) + ); + } else if (currentStatus == "10-7") { + $(`[data-id="${info}"]`).find(".unit-status").html("10-8"); + $(`[data-id="${info}"]`) + .find(".unit-status") + .removeClass("yellow-status") + .addClass("green-status"); + $.post( + `https://${GetParentResourceName()}/toggleDuty`, + JSON.stringify({ + cid: info, + status: 1, + }) + ); + } + }); + + $(".contextmenu").on("click", ".set-callsign", function () { + let info = $(this).data("info"); + $(".callsign-container").fadeIn(0); + $(".callsign-inner-container").slideDown(500); + $(".callsign-inner-container").fadeIn(500); + $(".callsign-container").data("id", info); + }); + + $(".contextmenu").on("click", ".set-radio", function () { + let info = $(this).data("info"); + $(".radio-container").fadeIn(0); + $(".radio-inner-container").slideDown(500); + $(".radio-inner-container").fadeIn(500); + $(".radio-container").data("id", info); + }); + + $(".contextmenu").on("click", ".set-waypoint", function () { + let info = $(this).data("info"); + $.post( + `https://${GetParentResourceName()}/setWaypointU`, + JSON.stringify({ + cid: info, + }) + ); + }); + + $(".active-unit-list").on("contextmenu", ".active-unit-item", function (e) { + let cid = $(this).data("id"); + if (cid) { + args = [ + { + className: "toggle-duty", + icon: "fas fa-thumbtack", + text: "Toggle Duty", + info: cid, + status: "", + }, + { + className: "set-callsign", + icon: "far fa-id-badge", + text: "Set Callsign", + info: cid, + status: "", + }, + { + className: "set-radio", + icon: "fas fa-broadcast-tower", + text: "Set Radio", + info: cid, + status: "", + }, + { + className: "set-waypoint", + icon: "fas fa-map-marker-alt", + text: "Set Waypoint", + info: cid, + status: "", + }, + ]; + openContextMenu(e, args); + } + }); + + $(".contextmenu").on("click", ".Set-Waypoint", function () { + const callId = $(this).data("info"); + $.post( + `https://${GetParentResourceName()}/setWaypoint`, + JSON.stringify({ + callid: callId, + }) + ); + }); + + $(".contextmenu").on("click", ".remove-blip", function () { + const callId = $(this).data("info"); + $.post( + `https://${GetParentResourceName()}/removeCallBlip`, + JSON.stringify({ + callid: callId, + }) + ); + }); + + $(".contextmenu").on("click", ".attached-units", function () { + const callId = $(this).data("info"); + $.post( + `https://${GetParentResourceName()}/attachedUnits`, + JSON.stringify({ + callid: callId, + }) + ); + }); + + $("#respondcalls").keydown(function (e) { + const keyCode = e.which || e.keyCode; + if (keyCode === 13 && !e.shiftKey) { + const callid = $(".respond-calls-container").data("id"); + e.preventDefault(); + const time = new Date(); + $.post( + `https://${GetParentResourceName()}/sendCallResponse`, + JSON.stringify({ + message: $(this).val(), + time: time.getTime(), + callid: callid, + }) + ); + $(this).val(""); + } + }); + + $(".contextmenu").on("click", ".respond-call", function () { + const callId = $(this).data("info"); + $.post( + `https://${GetParentResourceName()}/getCallResponses`, + JSON.stringify({ + callid: callId, + }) + ); + /**$(".respond-calls").fadeIn(0) + $(".respond-calls-container").fadeIn(250) + $(".close-all").css("filter", "brightness(15%)"); + $("#respondcalls").val("")*/ + }); + + $('#vehiclePointsSlider').change(function(){ + var currentValue = $('#vehiclePointsSliderValue'); + currentValue.html(this.value); + }); + + + $(".active-calls-list").on( + "contextmenu", + ".active-calls-item", + function (e) { + const callId = $(this).data("id"); + const canRespond = $(this).data("canrespond"); + + if (callId) { + if (canRespond == true) { + args = [ + { + className: "attached-units", + icon: "fas fa-link", + text: "Attached Units", + info: callId, + status: "", + }, + { + className: "Set-Waypoint", + icon: "fas fa-map-marker-alt", + text: "Set Waypoint", + info: callId, + status: "", + }, + { + className: "remove-blip", + icon: "fa-solid fa-circle-minus", + text: "Remove Blip", + info: callId, + status: "", + }, + ]; + } else if (canRespond == false) { + args = [ + { + className: "attached-units", + icon: "fas fa-link", + text: "Attached Units", + info: callId, + status: "", + }, + { + className: "Set-Waypoint", + icon: "fas fa-map-marker-alt", + text: "Set Waypoint", + info: callId, + status: "", + }, + { + className: "remove-blip", + icon: "fa-solid fa-circle-minus", + text: "Remove Blip", + info: callId, + status: "", + }, + ]; + } + openContextMenu(e, args); + } + } + ); + + $(".contextmenu").on("click", ".call-dispatch-detach", function () { + const cid = $(this).data("info"); + $.post( + `https://${GetParentResourceName()}/callDispatchDetach`, + JSON.stringify({ + callid: $(".dispatch-attached-units-container").attr("id"), + cid: cid, + }) + ); + $(".dispatch-attached-unit-item").filter(`[data-id="${cid}"]`).remove(); + }); + + $(".contextmenu").on("click", ".Set-Dispatch-Waypoint", function () { + const cid = $(this).data("info"); + $.post( + `https://${GetParentResourceName()}/setDispatchWaypoint`, + JSON.stringify({ + callid: $(".dispatch-attached-units-container").attr("id"), + cid: cid, + }) + ); + }); + + $(".dispatch-attached-units-holder").on( + "contextmenu", + ".dispatch-attached-unit-item", + function (e) { + const cid = $(this).data("id"); + if (cid) { + args = [ + { + className: "set-waypoint", + icon: "fas fa-map-marker-alt", + text: "Set Waypoint", + info: cid, + status: "", + }, + ]; + openContextMenu(e, args); + } + } + ); + + $(".contextmenu").on("click", ".dispatch-reply", function () { + const callsign = $(this).data("info"); + const currVal = $(".dispatch-input").val(); + if (currVal === "") { + $(".dispatch-input").val(callsign + " "); + } else { + $(".dispatch-input").val(currVal + " " + callsign + " "); + } + $(".dispatch-input").focus(); + }); + + $(".dispatch-items").on( + "contextmenu", + ".dispatch-item-message", + function (e) { + const Callsign = $(this).data("author"); + + var mySubString = Callsign.substring( + Callsign.indexOf("(") + 1, + Callsign.lastIndexOf(")") + ); + + args = [ + { + className: "dispatch-reply", + icon: "fas fa-reply", + text: "Reply", + info: mySubString, + status: "", + }, + ]; + openContextMenu(e, args); + } + ); + + $(".callsign-buttons").on("click", ".callsign-cancel", function () { + $(".callsign-inner-container").slideUp(500); + $(".callsign-inner-container").fadeOut(500); + setTimeout(() => { + $(".callsign-container").slideUp(500); + $(".callsign-container").fadeOut(500); + $(".callsign-input").val(""); + }, 500); + }); + + $(".callsign-buttons").on("click", ".callsign-submit", function () { + const callsign = $(".callsign-input").val(); + if (callsign.length > 2) { + let editingcallsign = $(".callsign-container").data("id"); + let name = $(`[data-id="${editingcallsign}"]`) + .find(".unit-name") + .html() + .replace(/\s*(?:\[[^\]]*\]|\([^)]*\))\s*/g, ""); + let newunitname = `(${callsign}) ${name}`; + $(`[data-id="${editingcallsign}"]`) + .find(".unit-name") + .html(newunitname); + $.post( + `https://${GetParentResourceName()}/setCallsign`, + JSON.stringify({ + cid: editingcallsign, + newcallsign: callsign, + }) + ); + + $(".callsign-inner-container").slideUp(500); + $(".callsign-inner-container").fadeOut(500); + setTimeout(() => { + $(".callsign-container").slideUp(500); + $(".callsign-container").fadeOut(500); + $(".callsign-input").val(""); + }, 500); + } + }); + + $(".radio-buttons").on("click", ".radio-cancel", function () { + $(".radio-inner-container").slideUp(500); + $(".radio-inner-container").fadeOut(500); + setTimeout(() => { + $(".radio-container").slideUp(500); + $(".radio-container").fadeOut(500); + $(".radio-input").val(""); + }, 500); + }); + + $(".radio-buttons").on("click", ".radio-submit", function () { + const radio = $(".radio-input").val(); + if (radio.length > 0) { + let editingradio = $(".radio-container").data("id"); + let newunitname = `${radio}`; + $(`[data-id="${editingradio}"]`) + .find(".unit-radio") + .html(newunitname); + $.post( + `https://${GetParentResourceName()}/setRadio`, + JSON.stringify({ + cid: editingradio, + newradio: radio, + }) + ); + + $(".radio-inner-container").slideUp(500); + $(".radio-inner-container").fadeOut(500); + setTimeout(() => { + $(".radio-container").slideUp(500); + $(".radio-container").fadeOut(500); + $(".radio-input").val(""); + }, 500); + } + }); + + $(".cams-items").click(function () { + var camId = this.id; + $.post( + `https://${GetParentResourceName()}/openCamera`, + JSON.stringify({ + cam: camId, + }) + ); + $.post(`https://${GetParentResourceName()}/escape`, JSON.stringify({})); + }) + + var draggedElement = 0; + var dragging = false; + + $(".active-unit-list").on("click", ".active-unit-item", function (e) { + if (dragging) { + $("#draggedItem").css("opacity", 0.0); + document.getElementById("draggedItem").innerHTML = ""; + dragging = false; + } else { + dragging = true; + draggedElement = $(this).data("id"); + let draggedItemHtml = $(this).html(); + document.getElementById("draggedItem").innerHTML = draggedItemHtml; + document.getElementById("draggedItem").style.left = "cursorX-50"; + document.getElementById("draggedItem").style.top = "cursorY-50"; + document.getElementById("draggedItem").style.opacity = "0.5"; + } + }); + + document.onmousemove = handleMouseMove; + + function handleMouseMove(event) { + let dot, eventDoc, doc, body, pageX, pageY; + event = event || window.event; // IE-ism + if (event.pageX == null && event.clientX != null) { + eventDoc = (event.target && event.target.ownerDocument) || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = + event.clientX + + ((doc && doc.scrollLeft) || (body && body.scrollLeft) || 0) - + ((doc && doc.clientLeft) || (body && body.clientLeft) || 0); + event.pageY = + event.clientY + + ((doc && doc.scrollTop) || (body && body.scrollTop) || 0) - + ((doc && doc.clientTop) || (body && body.clientTop) || 0); + } + + if (dragging) { + cursorX = event.pageX; + cursorY = event.pageY; + document.getElementById("draggedItem").style.left = + "" + cursorX - 50 + "px"; + document.getElementById("draggedItem").style.top = + "" + cursorY - 50 + "px"; + } + } + + $(".active-calls-list").on("click", ".active-calls-item", function (e) { + const callId = $(this).data("id"); + $("#draggedItem").css("opacity", 0.0); + document.getElementById("draggedItem").innerHTML = ""; + dragging = false; + if (callId && draggedElement) { + $.post( + `https://${GetParentResourceName()}/callDragAttach`, + JSON.stringify({ + callid: callId, + cid: draggedElement, + }) + ); + draggedElement = 0; + } + }); + const customThemes = { + lspd: { + color1: "#1E3955", + color2: "#213f5f", + color3: "#2C537B", + color4: "#23405E", + color5: "#152638", + color6: "#121f2c", + color7: "rgb(28, 54, 82)", + color8: "#2554cc", + color9: "#6E707C", + color10: "#8F741B", + image: "img/LSPD.webp", + name: "LOS SANTOS POLICE", + }, + bcso: { + color1: "#333333", + color2: "#57471a", + color3: "#614f1d", + color4: "#594b27", + color5: "#4d3f17", + color6: "#433714", + color7: "#57471a", + color8: "#2554cc", + color9: "#6E707C", + color10: "#8F741B", + image: "img/BCSO.webp", + name: "BLAINE COUNTY SHERIFF OFFICE", + }, + sasp: { + color1: "#423f39", + color2: "#8f7c3f", + color3: "#16537e", + color4: "#8f7c3f", + color5: "#0f3a58", + color6: "#121f2c", + color7: "#0f3a58", + color8: "#2554cc", + color9: "#9c9485", + color10: "#8F741B", + image: "img/sasp_badge.webp", + name: "SAN ANDREAS STATE POLICE", + }, + sast: { + color1: "#2c2c2c", + color2: "#232323", + color3: "#16537e", + color4: "#1c1c1c", + color5: "#232323", + color6: "#121f2c", + color7: "#232323", + color8: "#2554cc", + color9: "#bcbcbc", + color10: "#8F741B", + image: "img/sast_badge.webp", + name: "SAN ANDREAS STATE TROOPERS", + }, + sapr: { + color1: "#3b4c3a", + color2: "#57471a", + color3: "#614f1d", + color4: "#594b27", + color5: "#4d3f17", + color6: "#433714", + color7: "#57471a", + olor8: "#2554cc", + color9: "#6E707C", + color10: "#8F741B", + image: "img/sapr.webp", + name: "SAN ANDREAS PARK RANGERS", + }, + lssd: { + color1: "#3b4c3a", + color2: "#8f7c3f", + color3: "#8f7c3f", + color4: "#806f38", + color5: "#4d3f17", + color6: "#f1c232", + color7: "#57471a", + color8: "#2554cc", + color9: "#6E707C", + color10: "#8F741B", + image: "img/LSSD.webp", + name: "LOS SANTOS SHERIFF DEPARTMENT", + }, + doc: { + color1: "#191919", + color2: "#323232", + color3: "#000000", + color4: "#666666", + color5: "#46474f", + color6: "#191919", + color7: "#666666", + color8: "#2554cc", + color9: "#6E707C", + color10: "#8F741B", + image: "img/BBSP.webp", + name: "DEPARTMENT OF CORRECTIONS", + }, + ambulance: { + color1: "#5F2121", + color2: "#7B2C2C", + color3: "#4A1C1C", + color4: "#5E2323", + color5: "#381515", + color6: "#2C1212", + color7: "#521C1C", + color8: "#CC2525", + color9: "#8A8D91", + color10: "#444444", + image: "img/ems_badge.webp", + name: "PILLBOX HILL MEDICAL CENTER", + }, + doj: { + color1: "#553a1e", + color2: "#5f4321", + color3: "#7b552c", + color4: "#5e4123", + color5: "#382815", + color6: "#2c2312", + color7: "rgb(82, 60, 28)", + color8: "#cc9225", + color9: "#6E707C", + color10: "#8F741B", + image: "img/court.webp", + name: "DEPARTMENT OF JUSTICE", + }, + } + function applyCustomTheme(theme) { + document.documentElement.style.setProperty( + "--color-1", /* Panels */ + theme.color1 + ); + document.documentElement.style.setProperty( + "--color-2", /* Clock */ + theme.color2 + ); + document.documentElement.style.setProperty( + "--color-3", /* Outlines and hover */ + theme.color3 + ); + document.documentElement.style.setProperty( + "--color-4", /* Button Base */ + theme.color4 + ); + document.documentElement.style.setProperty( + "--color-5", + theme.color5 + ); + document.documentElement.style.setProperty( + "--color-6", + theme.color6 + ); + document.documentElement.style.setProperty( + "--color-7", + theme.color7 + ); + document.documentElement.style.setProperty( + "--color-8", + theme.color8 + ); + document.documentElement.style.setProperty( + "--color-9", + theme.color9 + ); + document.documentElement.style.setProperty( + "--color-10", + theme.color10 + ); + $(".badge-logo").attr("src", theme.image ); + $(".header-title").html(theme.name); + } + function JobColors(sentJob) { + if (sentJob) { + if (PoliceJobs[sentJob] !== undefined) { + if (sentJob == "police") { + applyCustomTheme(customThemes.lspd) + } else if (sentJob == "bcso"){ + applyCustomTheme(customThemes.bcso) + } else if (sentJob == "sasp") { + applyCustomTheme(customThemes.sasp) + } else if (sentJob == "sast") { + applyCustomTheme(customThemes.sast) + + } else if (sentJob == "sapr") { + applyCustomTheme(customThemes.sapr) + } else if (sentJob == "lssd") { + applyCustomTheme(customThemes.lssd) + } else if (sentJob == "doc") { + applyCustomTheme(customThemes.doc) + } + $(".bolo-nav-item").html("BOLOs"); + $(".bolos-search-title").html("Bolos"); + $("#bolos-search-input").attr("placeholder", "Search Bolo..."); + $(".manage-bolos-title").html("Manage Bolo"); + $(".manage-bolos-editing-title").html( + "You are currently creating a new BOLO" + ); + $(".boloplate-title").html("Plate"); + $(".boloowner-title").html("Owner"); + $(".boloindividual-title").html("Individual"); + $("#boloplate").attr("placeholder", "Place plate here..."); + $("#bolodetail").attr( + "placeholder", + "Bolo detail goes here..." + ); + $("#boloowner").attr( + "placeholder", + "Place vehicle owner here..." + ); + $("#boloindividual").attr( + "placeholder", + "Place invidivual here..." + ); + $("#home-warrants-container").fadeIn(0); + $("#home-reports-container").fadeOut(0); + //$(".quote-span").html("TUCKER MALD, BEST MALD"); + $(".incidents-nav-item").show(); + $(".bolo-nav-item").show(); + $(".dmv-nav-item").show(); + $(".weapons-nav-item").show() + $(".cams-nav-item").show(); + $(".map-nav-item").show(); + $(".dispatch-title-ofsomesort").html("Dispatch"); + $(".dispatch-comms-container").fadeIn(0); + $(".manage-profile-name-input-1").attr("readonly", true); + $(".manage-profile-name-input-2").attr("readonly", true); + $("#reports-officers-involved-tag-title").html( + "Officers Involved" + ); + $("#bolos-officers-involved-tag-title").html( + "Officers Involved" + ); + $(".roster-iframe").attr("src", rosterLink); + $(".sop-iframe").attr("src", sopLink); + + $(".manage-profile-save").css("display", "block"); + $(".manage-profile-editing-title").css("display", "block"); + $(".manage-incidents-create").css("display", "block"); + $(".manage-incidents-save").css("display", "block"); + $(".manage-incidents-editing-title").css("display", "block"); + $(".manage-reports-new").css("display", "block"); + $(".manage-reports-save").css("display", "block"); + $(".manage-reports-editing-title").css("display", "block"); + $(".vehicle-information-save").css("display", "block"); + $(".vehicle-information-title").css("margin-right", "0px").css("width", "81%"); + $(".manage-incidents-title ").css("margin-right", "0px") + $(".manage-reports-title").css("margin-right", "0px").css("width", "66%"); + } else if (AmbulanceJobs[sentJob] !== undefined) { + $(".weapons-nav-item").hide() + $("#home-warrants-container").fadeOut(0); + $("#home-reports-container").fadeIn(0); + if (sentJob == "ambulance") { + applyCustomTheme(customThemes.ambulance) + } + //$(".quote-span").html("The simplest explanation is almost always somebody screwed up."); + $(".bolo-nav-item").html("ICU"); + $(".bolos-search-title").html("ICU Check-ins"); + $("#bolos-search-input").attr( + "placeholder", + "Search Check-ins..." + ); + $(".manage-bolos-title").html("Manage ICU Check-in"); + $(".manage-bolos-editing-title").html( + "You are creating a new ICU Check-in" + ); + $(".boloplate-title").html("Estimated Recovery"); + $(".boloowner-title").html("Emergency Contact"); + $(".boloindividual-title").html("Patient"); + $("#boloplate").attr( + "placeholder", + "Enter recovery time here..." + ); + $("#bolodetail").attr( + "placeholder", + "Enter ICU Check-in details here..." + ); + $("#boloowner").attr( + "placeholder", + "Enter emergency contact here..." + ); + $("#boloindividual").attr( + "placeholder", + "Enter patient name and CID here..." + ); + $(".incidents-nav-item").hide(); + $(".dmv-nav-item").hide(); + $(".cams-nav-item").hide(); + $("#reports-officers-involved-tag-title").html( + "EMS Involved" + ); + $("#bolos-officers-involved-tag-title").html( + "EMS Involved" + ); + $(".dispatch-title-ofsomesort").html("Dispatch"); + $(".dispatch-comms-container").fadeIn(0); + $(".manage-profile-name-input-1").attr("readonly", true); + $(".manage-profile-name-input-2").attr("readonly", true); + $(".roster-iframe").attr("src", rosterLink); + $(".sop-iframe").attr("src", sopLink); + + $(".manage-profile-save").css("display", "block"); + $(".manage-profile-editing-title").css("display", "block"); + $(".manage-incidents-create").css("display", "block"); + $(".manage-incidents-save").css("display", "block"); + $(".manage-incidents-editing-title").css("display", "block"); + $(".manage-reports-new").css("display", "block"); + $(".manage-reports-save").css("display", "block"); + $(".manage-reports-editing-title").css("display", "block"); + $(".vehicle-information-save").css("display", "block"); + $(".vehicle-information-title").css("margin-right", "0px").css("width", "81%"); + $(".manage-incidents-title ").css("margin-right", "0px") + $(".manage-reports-title").css("margin-right", "0px").css("width", "66%"); + } else if (DojJobs[sentJob] !== undefined) { + applyCustomTheme(customThemes.doj) + //$(".quote-span").html("Actually useless."); + //$(".dmv-nav-item").hide(); + $(".weapons-nav-item").show() + $(".bolo-nav-item").hide(); + $(".dispatch-title-ofsomesort").html("Message Board"); + $(".dispatch-comms-container").fadeOut(0); + $(".manage-profile-name-input-1").attr("readonly", false); + $(".manage-profile-name-input-2").attr("readonly", false); + $("#home-warrants-container").css("height", "98%"); + $(".roster-iframe").attr("src", rosterLink); + $(".sop-iframe").attr("src", sopLink); + + $(".manage-profile-save").css("display", "none"); + $(".manage-profile-editing-title").css("display", "none"); + $(".manage-incidents-create").css("display", "none"); + $(".manage-incidents-title").css("margin-right", "auto"); + $(".manage-incidents-title").css("width", "95%"); + $(".manage-incidents-save").css("display", "none"); + $(".manage-incidents-editing-title").css("display", "none"); + $(".manage-reports-new").css("display", "none"); + $(".manage-reports-save").css("display", "none"); + $(".manage-reports-editing-title").css("display", "none"); + $(".vehicle-information-save").css("display", "none"); + $(".vehicle-information-title").css("margin-right", "auto").css("width", "95%"); + $(".manage-incidents-title ").css("margin-right", "auto") + $(".manage-reports-title").css("margin-right", "auto").css("width", "95%"); + } + } + } +{/*
    ID: ${value.id}
    */} +window.addEventListener("message", function (event) { + let eventData = event.data; + $(".dispatch-msg-notif").fadeIn(500); + if (eventData.type == "show") { + if (eventData.enable == true) { + rosterLink = eventData.rosterLink; + sopLink = eventData.sopLink; + playerJob = eventData.job; + PlayerJobType = eventData.jobType; + + JobColors(playerJob); + $(".quote-span").html(randomizeQuote()); + if (PoliceJobs[playerJob] !== undefined || DojJobs[playerJob] !== undefined) { + $(".manage-profile-licenses-container").removeClass("display_hidden"); + $(".manage-profile-vehs-container").removeClass("display_hidden"); + $(".manage-profile-houses-container").removeClass("display_hidden"); + } + + $("body").fadeIn(0); + $(".close-all").css("filter", "none"); + $(".close-all").fadeOut(0); + if (!currentTab) { + currentTab = ".dashboard-page-container"; + } + $(currentTab).slideDown(250); + timeShit(); + } else { + $(".callsign-inner-container").fadeOut(0); + $(".callsign-container").fadeOut(0); + $(".radio-inner-container").fadeOut(0); + $(".radio-container").fadeOut(0); + $(".incidents-person-search-container").fadeOut(0); + $(".dispatch-attached-units").fadeOut(0); + $(".respond-calls").fadeOut(0); + $(".respond-calls-container").fadeOut(0); + $("body").slideUp(250); + $(".close-all").slideUp(250); + } + } else if (eventData.type == "data") { + $(".name-shit").html(eventData.name); + $(".header-location").html(" " + eventData.location); + MyName = eventData.fullname; + + $(".bulletin-items-continer").empty(); + $.each(eventData.bulletin, function (index, value) { + $( + ".bulletin-items-continer" + ).prepend(`
    +
    ${value.title}
    +
    ${value.desc}
    +
    +
    ${value.author + } - ${timeAgo(Number(value.time))}
    +
    +
    `); + }); + + let policeCount = 0; + let saspCount = 0; + let bcsoCount = 0; + let emsCount = 0; + let dojCount = 0; + /* let fireCount = 0; */ + + let activeUnits = eventData.activeUnits; + let cid = eventData.citizenid; + let onDutyOnly = eventData.ondutyonly; + $(".active-unit-list").html(' '); + let unitListHTML = ''; + + activeUnits = Object.values(activeUnits) + activeUnits.forEach((unit) => { + if (onDutyOnly && unit.duty == 0 && unit.cid != cid) { + return + } + let status = unit.duty == 1 ? "10-8" : '10-7'; + let statusColor = unit.duty == 1 ? "green-status" : 'yellow-status'; + let radioBack = unit.sig100 ? "#7b2c2c" : "var(--color-3)"; + let radio = unit.radio ? unit.radio : "0"; + let callSign = unit.callSign ? unit.callSign : "000"; + let activeInfoJob = `
    UNKNOWN
    `; + if (PoliceJobs[unit.unitType] !== undefined) { + if (unit.unitType == "police") { policeCount++; + activeInfoJob = `
    LSPD
    `; + } else if(unit.unitType == "bcso") { bcsoCount++; + activeInfoJob = `
    BCSO
    `; + } else if(unit.unitType == "lssd") { bcsoCount++; + activeInfoJob = `
    LSSD
    `; + } else if(unit.unitType == "sasp") { saspCount++; + activeInfoJob = `
    SASP
    `; + } else if(unit.unitType == "sast") { saspCount++; + activeInfoJob = `
    SAST
    `; + } else if(unit.unitType == "sapr") { saspCount++; + activeInfoJob = `
    SAPR
    `; + } else if(unit.unitType == "judge") { dojCount++; + activeInfoJob = `
    DOJ
    `; + } else if(unit.unitType == "doc") { dojCount++; + activeInfoJob = `
    DOC
    `; + } + } else if (AmbulanceJobs[unit.unitType] !== undefined) { + activeInfoJob = `
    Ambulance
    ` + emsCount++; + } else if (DojJobs[unit.unitType] !== undefined) { + activeInfoJob = `
    DOJ
    ` + dojCount++; + } + + unitListHTML += ` +
    +
    ${status}
    + ${activeInfoJob} +
    (${callSign}) ${unit.firstName} ${unit.lastName}
    +
    ${radio}
    +
    + `; + }); + + $(".active-unit-list").html(unitListHTML) + + + $("#police-count").html(policeCount); + $("#sasp-count").html(saspCount); + $("#bcso-count").html(bcsoCount); + $("#ems-count").html(emsCount); + $("#doj-count").html(dojCount); + + } else if (eventData.type == "newBulletin") { + const value = eventData.data; + $(".bulletin-items-continer") + .prepend(`
    +
    ${value.title}
    +
    ${value.info}
    +
    +
    ID: ${value.id}
    +
    ${value.author} - ${timeAgo( + Number(value.time) + )}
    +
    +
    `); + } else if (eventData.type == "deleteBulletin") { + $(".bulletin-items-continer") + .find("[data-id='" + eventData.data + "']") + .remove(); + } else if (eventData.type == "warrants") { + $(".warrants-items").empty(); + $.each(eventData.data, function (index, value) { + $('.warrants-items').prepend(`
    +
    +
    ${value.name}
    +
    +
    +
    Incident ID: ${value.linkedincident}
    +
    +
    `) + }) + } else if (eventData.type == "dispatchmessages") { + const table = eventData.data; + LastName = ""; + DispatchNum = 0; + $(".dispatch-items").empty(); + $.each(table, function (index, value) { + DispatchNum = DispatchNum + 1; + if (LastName == value.name) { + $(".dispatch-items").append(` +
    +
    ${value.message}
    +
    + `); + } else { + if (DispatchNum == 1) { + $(".dispatch-items") + .append(`
    + +
    +
    ${value.name + } ${timeAgo( + Number(value.time) + )}
    +
    ${value.message}
    +
    +
    `); + } else { + $(".dispatch-items") + .append(`
    + +
    +
    ${value.name + } ${timeAgo( + Number(value.time) + )}
    +
    ${value.message}
    +
    +
    `); + } + } + LastName = value.name; + $(".dispatch-items").scrollTop( + $(".dispatch-items")[0].scrollHeight + ); + }); + $(".dispatch-items").scrollTop( + $(".dispatch-items")[0].scrollHeight + ); + } else if (eventData.type == "dispatchmessage") { + const value = eventData.data; + DispatchNum = DispatchNum + 1; + const BodyDisplay = $("body").css("display"); + if (BodyDisplay == "block") { + if (LastName == value.name) { + $(".dispatch-items").append(` +
    +
    ${value.message}
    +
    + `); + } else { + if (DispatchNum == 1) { + $(".dispatch-items") + .append(`
    + +
    +
    ${value.name + } ${timeAgo( + Number(value.time) + )}
    +
    ${value.message}
    +
    +
    `); + } else { + $(".dispatch-items") + .append(`
    + +
    +
    ${value.name + } ${timeAgo( + Number(value.time) + )}
    +
    ${value.message}
    +
    +
    `); + } + } + LastName = value.name; + } else if (BodyDisplay == "none") { + $.post( + `https://${GetParentResourceName()}/dispatchNotif`, + JSON.stringify({ + data: value, + }) + ); + } + $(".dispatch-items").scrollTop( + $(".dispatch-items")[0].scrollHeight + ); + } else if (eventData.type == "call") { + const value = eventData.data; + DispatchMAP(value); + if (value && value?.job?.includes(playerJob) || value?.jobs.includes(PlayerJobType)) { + const prio = value["priority"]; + let DispatchItem = `
    #${value.callId || value.id}
    ${value.dispatchCode || value.code}
    ${value.dispatchMessage || value.message}
    ${value.units.length}
    `; + + if ( + value.dispatchCode == "911" || + value.dispatchCode == "311" + ) { + DispatchItem = `
    #${value.callId || value.id}
    ${value.dispatchCode || value.code}
    ${value.dispatchMessage || value.message}
    ${value.units.length}
    `; + } + + if (value["time"]) { + DispatchItem += `
    ${timeAgo( + value.time + )}
    `; + } + + if (value["firstStreet"] || value['street']) { + DispatchItem += `
    ${value.firstStreet || value.street}
    `; + } + + if (value['camId']) { + DispatchItem += `
    ${value.camId}
    `; + } + + if (value["callsign"]) { + DispatchItem += `
    ${value.callsign}
    `; + } + + if (value["doorCount"]) { + DispatchItem += `
    ${value.doorCount}
    `; + } + + if (value["speed"]) { + DispatchItem += `
    ${value.speed}
    `; + } + + if (value["weapon"]) { + DispatchItem += `
    ${value.weapon}
    `; + } + + if (value["heading"]) { + DispatchItem += `
    ${value.heading}
    `; + } + + if (value["gender"]) { + let gender = "Male"; + if (value["gender"] == 0 || value["gender"] == 2) { + gender = "Female"; + } + DispatchItem += `
    ${gender}
    `; + } + + if (value["model"] && value["plate"]) { + DispatchItem += `
    ${value["model"]}${value["plate"]}
    `; + } else if (value["plate"]) { + DispatchItem += `
    ${value["plate"]}
    `; + } else if (value["model"]) { + DispatchItem += `
    ${value["model"]}
    `; + } + + if (value["firstColor"] || value['color']) { + DispatchItem += `
    ${value["firstColor"] || value['color']}
    `; + } + + if (value["automaticGunfire"] == true) { + DispatchItem += `
    Automatic Gunfire
    `; + } + + if (value["name"] && value["number"]) { + DispatchItem += `
    ${value["name"]}${value["number"]}
    `; + } else if (value["number"]) { + DispatchItem += `
    ${value["number"]}
    `; + } else if (value["name"]) { + DispatchItem += `
    ${value["name"]}
    `; + } + + if (value["information"]) { + DispatchItem += `
    ${value["information"]}
    `; + } + + DispatchItem += `
    `; + $(".active-calls-list").prepend( + $(DispatchItem).hide().fadeIn("slow") + ); + } + } else if (eventData.type == "attachedUnits") { + const table = eventData.data; + if (table) { + $(".dispatch-attached-units").fadeIn(0); + $(".dispatch-attached-units-container").fadeIn(250); + $(".close-all").css("filter", "brightness(15%)"); + $(".dispatch-attached-units-holder").empty(); + $.each(table, function (index, value) { + const fullname = value.charinfo.firstname + ' ' + value.charinfo.lastname; + const callsign = value.metadata.callsign; + const jobLabel = value.job.label; + + $(".dispatch-attached-units-holder").prepend( + `
    +
    ${jobLabel}
    +
    (${callsign}) ${fullname}
    +
    +
    `); + }); + setTimeout(() => { + $(".dispatch-attached-units-container").attr("id", eventData.callid); + }, 1000); + } + } else if (eventData.type == "sendCallResponse") { + if ($(".respond-calls-container").data("id") == eventData.callid) { + $(".respond-calls-responses").prepend( + `
    ${eventData["name"] + } responded "${eventData["message"]}" - ${timeAgo( + Number(eventData.time) + )}.
    ` + ); + } + } else if (eventData.type == "getCallResponses") { + const table = eventData.data; + $(".respond-calls").fadeIn(0); + $(".respond-calls-container").fadeIn(250); + $(".close-all").css("filter", "brightness(15%)"); + $("#respondcalls").val(""); + $(".respond-calls-responses").empty(); + setTimeout(() => { + $(".respond-calls-container").data("id", eventData.callid); + }, 1000); + $.each(table, function (index, value) { + $(".respond-calls-responses").prepend( + `
    ${value["name"] + } responded "${value["message"]}" - ${timeAgo( + Number(value.time) + )}.
    ` + ); + }); + } else if (eventData.type == "calls") { + const table = eventData.data; + $(".active-calls-list").empty(); + $.each(table, function (index, value) { + if (value && value?.job?.includes(playerJob) || value?.jobs.includes(PlayerJobType)) { + DispatchMAP(value); + const prio = value["priority"]; + let DispatchItem = `
    #${value.callId || value.id}
    ${value.dispatchCode || value.code}
    ${value.dispatchMessage || value.message}
    ${value.units.length}
    `; + + if ( + value.dispatchCode == "911" || + value.dispatchCode == "311" + ) { + DispatchItem = `
    #${value.callId || value.id}
    ${value.dispatchCode || value.code}
    ${value.dispatchMessage || value.message}
    ${value.units.length}
    `; + } + + if (value["time"]) { + DispatchItem += `
    ${timeAgo( + value.time + )}
    `; + } + + if (value["firstStreet"] || value['street']) { + DispatchItem += `
    ${value.firstStreet || value.street}
    `; + } + + if (value['camId']) { + DispatchItem += `
    ${value.camId}
    `; + } + + if (value["heading"]) { + DispatchItem += `
    ${value.heading}
    `; + } + + if (value["weapon"]) { + DispatchItem += `
    ${value.weapon}
    `; + } + + if (value["gender"]) { + let gender = "Male"; + if (value["gender"] == 0 || value["gender"] == 2) { + gender = "Female"; + } + DispatchItem += `
    ${gender}
    `; + } + + if (value["model"] && value["plate"]) { + DispatchItem += `
    ${value["model"]}${value["plate"]}
    `; + } else if (value["plate"]) { + DispatchItem += `
    ${value["plate"]}
    `; + } else if (value["model"]) { + DispatchItem += `
    ${value["model"]}
    `; + } + + if (value["firstColor"] || value["color"]) { + DispatchItem += `
    ${value["firstColor"] || value["color"]}
    `; + } + + if (value["automaticGunfire"] == true) { + DispatchItem += `
    Automatic Gunfire
    `; + } + + if (value["name"] && value["number"]) { + DispatchItem += `
    ${value["name"]}${value["number"]}
    `; + } else if (value["number"]) { + DispatchItem += `
    ${value["number"]}
    `; + } else if (value["name"]) { + DispatchItem += `
    ${value["name"]}
    `; + } + + if (value["information"]) { + DispatchItem += `
    ${value["information"]}
    `; + } + + DispatchItem += `
    `; + $(".active-calls-list").prepend( + $(DispatchItem).hide().fadeIn("slow") + ); + } + }); + } else if (eventData.type == "incidents") { + let table = eventData.data; + canSearchForProfiles = true; + $(".incidents-items").empty(); + $.each(table, function (index, value) { + $(".incidents-items").append( + `
    +
    +
    ${value.title}
    +
    Incident Report
    +
    +
    +
    ID: ${value.id}
    +
    ${value.author + } - ${timeAgo(Number(value.time))}
    +
    +
    ` + ); + }); + $(".contextmenu").on("click", ".incidents-delete", function () { + $(".incidents-items") + .find(`[data-id="${$(this).data("info")}"]`) + .remove(); + $.post( + `https://${GetParentResourceName()}/deleteIncidents`, + JSON.stringify({ + id: $(this).data("info"), + }) + ); + }); + + $(".incidents-items").on("contextmenu", ".incidents-item", function (e) { + var args = ""; + args = [ + { + className: "incidents-delete", + icon: "fas fa-times", + text: "Delete Incidents", + info: $(this).data("id"), + status: "", + }, + ]; + openContextMenu(e, args); + }); + } else if (eventData.type == "getPenalCode") { + const titles = eventData.titles; + const penalcode = eventData.penalcode; + $(".offenses-main-container").empty(); + $.each(titles, function (index, value) { + $(".offenses-main-container").append( + `
    +
    ${value}
    +
    +
    +
    + ` + ); + }); + $.each(penalcode, function (index, value) { + $.each(value, function (i, v) { + $(`#penal-${index}`).append(` +
    +
    +
    ${v.title}
    +
    ${v.class}
    +
    +
    +
    ${v.id}
    +
    ${v.months} Months - $${v.fine}
    +
    + `); + }); + }); + } else if (eventData.type == "incidentData") { + let table = eventData.data; + + $(".incidents-ghost-holder").html(""); + $(".associated-incidents-tags-holder").html(""); + + $(".manage-incidents-editing-title").html( + "You are currently editing incident " + table["id"] + ); + $(".manage-incidents-editing-title").data( + "id", + Number(table["id"]) + ); + + $(".manage-incidents-tags-add-btn").css("pointer-events", "auto"); + $(".manage-incidents-reports-content").css( + "pointer-events", + "auto" + ); + $(".manage-incidents-officers-add-btn").css( + "pointer-events", + "auto" + ); + $(".manage-incidents-civilians-add-btn").css( + "pointer-events", + "auto" + ); + $(".manage-incidents-evidence-add-btn").css( + "pointer-events", + "auto" + ); + $(".associated-incidents-tags-add-btn").css( + "pointer-events", + "auto" + ); + + + $("#manage-incidents-title-input").val(table["title"]); + $(".manage-incidents-reports-content").trumbowyg({ + changeActiveDropdownIcon: true, + imageWidthModalEdit: true, + btns: [ + ['foreColor', 'backColor','fontfamily','fontsize','indent', 'outdent'], + ['strong', 'em',], ['insertImage'], + ['viewHTML'], + ['undo', 'redo'], + ['formatting'], + ['superscript', 'subscript'], + ['link'], + ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'], + ['horizontalRule'] + ], + }); + $(".manage-incidents-reports-content").trumbowyg('html', table["details"]); + + $(".manage-incidents-tags-holder").empty(); + $.each(table["tags"], function (index, value) { + $(".manage-incidents-tags-holder").append( + `
    ${value}
    ` + ); + }); + + $(".manage-incidents-officers-holder").empty(); + $.each(table["officersinvolved"], function (index, value) { + $(".manage-incidents-officers-holder").append( + `
    ${value}
    ` + ); + }); + + $(".manage-incidents-civilians-holder").empty(); + $.each(table["civsinvolved"], function (index, value) { + $(".manage-incidents-civilians-holder").append( + `
    ${value}
    ` + ); + }); + + $(".manage-incidents-evidence-holder").empty(); + $.each(table["evidence"], function (index, value) { + $(".manage-incidents-evidence-holder").append( + `` + ); + }); + + $(".manage-incidents-title-holder").empty(); + if (PoliceJobs[playerJob] !== undefined || AmbulanceJobs[playerJob] !== undefined) { + $(".manage-incidents-title-holder").prepend( + ` +
    Manage Incident
    +
    +
    + ` + ); + $(".manage-incidents-title").css("width", "66%"); + $(".manage-incidents-create").css("margin-right", "0px"); + } else if (DojJobs[playerJob] !== undefined) { + $(".manage-incidents-title-holder").prepend( + ` +
    Manage Incident
    + ` + ); + $(".manage-incidents-title").css("width", "95%"); + } + + let associateddata = eventData.convictions; + $.each(associateddata, function (index, value) { + $(".associated-incidents-tags-holder").prepend( + `
    ${value.name}
    ` + ); + + var warrantTag = "red-tag"; + var guiltyTag = "red-tag"; + var processedTag = "red-tag"; + var associatedTag = "red-tag"; + + if (value.warrant == 1) { + warrantTag = "green-tag"; + } + if (value.guilty == 1) { + guiltyTag = "green-tag"; + } + if (value.processed == 1) { + processedTag = "green-tag"; + } + if (value.associated == 1) { + associatedTag = "green-tag"; + } + + const cid = value.cid; + + // If the associated field is not checked, then populate the recommended fine and sentence fields + const associatedIncidentsContainer = (value.associated != 1) && ` +
    +
    Recommended Fine
    +
    +
    Recommended Sentence
    +
    +
    Fine
    +
    +
    Sentence
    +
    +
    +
    Jail
    +
    Fine
    + ${canSendToCommunityService ? `
    Community Service
    ` : ''} +
    + `; + + $(".incidents-ghost-holder").prepend( + `
    +
    ${value.name} (#${cid})
    +
    +
    Warrant
    +
    Guilty
    +
    Processed
    +
    Associated
    +
    +
    Right click below to add and/or modify charges.
    + ${associatedIncidentsContainer} +
    ` + ); + + $(".fine-amount") + .filter("[data-id='" + value.cid + "']") + .val(value.fine); + + $(".sentence-amount") + .filter("[data-id='" + value.cid + "']") + .val(value.sentence); + + $(".fine-recommended-amount") + .filter("[data-id='" + value.cid + "']") + .val(value.recfine); + + $(".sentence-recommended-amount") + .filter("[data-id='" + value.cid + "']") + .val(value.recsentence); + + const charges = value["charges"]; + for (var i = 0; i < charges.length; i++) { + const randomNum = Math.ceil( + Math.random() * 1000 + ).toString(); + $(`[data-name="${cid}"]`).prepend( + `
    ${charges[i]}
    ` + ); + } + }); + } else if (eventData.type == "incidentSearchPerson") { + let table = eventData.data; + $(".incidents-person-search-holder").empty(); + $.each(table, function (index, value) { + let name = value.firstname + " " + value.lastname; + $(".incidents-person-search-holder").prepend( + ` +
    + +
    +
    Citizen ID
    +
    ${value.id}
    +
    Name
    +
    ${name}
    +
    +
    + ` + ); + }); + } else if (eventData.type == "boloData") { + let table = eventData.data; + $(".manage-bolos-editing-title").html( + "You are currently editing BOLO " + table["id"] + ); + + if ($(".badge-logo").attr("src") == "img/ems_badge.webp") { + $(".manage-bolos-editing-title").html( + "You are editing ICU Check-in " + table["id"] + ); + } + + $(".manage-bolos-editing-title").data("id", Number(table["id"])); + + $(".manage-bolos-input-title").val(table["title"]); + $(".manage-bolos-input-plate").val(table["plate"]); + $(".manage-bolos-input-owner").val(table["owner"]); + $(".manage-bolos-input-individual").val(table["individual"]); + + $(".manage-bolos-reports-content").trumbowyg({ + changeActiveDropdownIcon: true, + imageWidthModalEdit: true, + btns: [ + ['foreColor', 'backColor','fontfamily','fontsize','indent', 'outdent'], + ['strong', 'em',], ['insertImage'], + ['viewHTML'], + ['undo', 'redo'], + ['formatting'], + ['superscript', 'subscript'], + ['link'], + ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'], + ['horizontalRule'] + ], + }); + $(".manage-bolos-reports-content").trumbowyg('html', table["detail"]); + + $(".manage-bolos-tags-holder").empty(); + $.each(table["tags"], function (index, value) { + $(".manage-bolos-tags-holder").prepend( + `
    ${value}
    ` + ); + }); + + $(".bolo-gallery-inner-container").empty(); + $.each(table["gallery"], function (index, value) { + let randomNum = Math.ceil(Math.random() * 10).toString(); + $(".bolo-gallery-inner-container").prepend( + `` + ); + }); + + $(".manage-officers-tags-holder").empty(); + $.each(table["officersinvolved"], function (index, value) { + $(".manage-officers-tags-holder").prepend( + `
    ${value}
    ` + ); + }); + } else if (eventData.type == "bolos") { + let table = eventData.data; + var reportName = "General BOLO"; + canSearchForProfiles = true; + $(".bolos-items").empty(); + if ($(".badge-logo").attr("src") == "img/ems_badge.webp") { + reportName = "ICU Check-in"; + } + $.each(table, function (index, value) { + $(".bolos-items").prepend( + `
    +
    +
    ${value.title}
    +
    ${reportName}
    +
    +
    +
    ID: ${value.id}
    +
    ${value.author + } - ${timeAgo(Number(value.time))}
    +
    +
    ` + ); + }); + } else if (eventData.type == "boloComplete") { + let id = eventData.data; + if (canRefreshBolo == true) { + canRefreshBolo = false; + $(".bolos-search-refresh").empty(); + $(".bolos-search-refresh").prepend( + `` + ); + setTimeout(() => { + $(".bolos-search-refresh").empty(); + $(".bolos-search-refresh").html("Refresh"); + canRefreshBolo = true; + $.post(`https://${GetParentResourceName()}/getAllBolos`, JSON.stringify({})); + }, 1500); + } + $(".manage-bolos-editing-title").html( + "You are currently editing BOLO " + id + ); + $(".manage-bolos-editing-title").data("id", Number(id)); + } else if (eventData.type == "reportComplete") { + let id = eventData.data; + if (canRefreshReports == true) { + canRefreshReports = false; + $(".reports-search-refresh").empty(); + $(".reports-search-refresh").prepend( + `` + ); + setTimeout(() => { + $(".reports-search-refresh").empty(); + $(".reports-search-refresh").html("Refresh"); + canRefreshReports = true; + $.post(`https://${GetParentResourceName()}/getAllReports`, JSON.stringify({})); + }, 1500); + } + $(".manage-reports-editing-title").html( + "You are currently editing report " + id + ); + $(".manage-reports-editing-title").data("id", Number(id)); + } else if (eventData.type == "reports") { + let table = eventData.data; + canSearchForReports = true; + $(".reports-items").empty(); + $.each(table, function (index, value) { + $(".reports-items").append( + `
    +
    +
    ${value.title}
    +
    ${value.type + } Report
    +
    +
    +
    ID: ${value.id}
    +
    ${value.author + } - ${timeAgo(Number(value.time))}
    +
    +
    ` + ); + }); + $(".contextmenu").on("click", ".reports-delete", function () { + $(".reports-items") + .find(`[data-id="${$(this).data("info")}"]`) + .remove(); + $.post( + `https://${GetParentResourceName()}/deleteReports`, + JSON.stringify({ + id: $(this).data("info"), + }) + ); + }); + + $(".reports-items").on("contextmenu", ".reports-item", function (e) { + var args = ""; + args = [ + { + className: "reports-delete", + icon: "fas fa-times", + text: "Delete Report", + info: $(this).data("id"), + status: "", + }, + ]; + openContextMenu(e, args); + }); + } else if (eventData.type == "reportData") { + let table = eventData.data; + + $(".manage-reports-editing-title").html( + "You are currently editing report " + table["id"] + ); + + $(".manage-reports-editing-title").data("id", Number(table["id"])); + + $(".manage-reports-input-title").val(table["title"]); + $(".manage-reports-input-type").val(table["type"]); + $(".manage-reports-reports-content").trumbowyg({ + changeActiveDropdownIcon: true, + imageWidthModalEdit: true, + btns: [ + ['foreColor', 'backColor','fontfamily','fontsize','indent', 'outdent'], + ['strong', 'em',], ['insertImage'], + ['viewHTML'], + ['undo', 'redo'], + ['formatting'], + ['superscript', 'subscript'], + ['link'], + ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'], + ['horizontalRule'] + ], + }); + $(".manage-reports-reports-content").trumbowyg('html', table["details"]); + + $(".manage-reports-tags-holder").empty(); + $.each(table["tags"], function (index, value) { + $(".manage-reports-tags-holder").append( + `
    ${value}
    ` + ); + }); + + $(".reports-gallery-inner-container").empty(); + $.each(table["gallery"], function (index, value) { + let randomNum = Math.ceil(Math.random() * 10).toString(); + $(".reports-gallery-inner-container").append( + `` + ); + }); + + $(".reports-officers-tags-holder").empty(); + $.each(table["officersinvolved"], function (index, value) { + $(".reports-officers-tags-holder").append( + `
    ${value}
    ` + ); + }); + + $(".reports-civilians-tags-holder").empty(); + $.each(table["civsinvolved"], function (index, value) { + $(".reports-civilians-tags-holder").append( + `
    ${value}
    ` + ); + }); + + } else if (eventData.type == "searchedVehicles") { + + } else if (eventData.type == "getVehicleData") { + impoundChanged = false; + let table = eventData.data; + + $(".vehicle-information-title-holder").data( + "dbid", + Number(table["dbid"]) + ); + + $(".vehicle-info-plate-input").val(table["plate"]); + $(".vehicle-info-owner-input").val(table["name"]); + $(".vehicle-info-class-input").val(table["class"]); + $(".vehicle-info-model-input").val(table["model"]); + $(".vehicle-info-imageurl-input").val(table["image"]); + let vehiclePoints = table["points"] != null ? table["points"] : 0; + $("#vehiclePointsSlider").val(vehiclePoints); + $("#vehiclePointsSliderValue").html(vehiclePoints); + + $(".vehicle-info-content").val(table["information"]); + + $(".vehicle-tags").empty(); + $(".vehicle-info-image").attr("src", table["image"]); + $(".vehicle-tags").prepend( + `
    ${table.colorName}
    ` + ); + + let impound = "red-tag"; + let bolo = "red-tag"; + let codefive = "red-tag"; + let stolen = "red-tag"; + + if (table.impound) { + impound = "green-tag"; + } + + if (table.bolo) { + bolo = "green-tag"; + } + + if (table.code) { + codefive = "green-tag"; + } + + if (table.stolen) { + stolen = "green-tag"; + } + + $(".vehicle-tags").append(`
    Impound
    `); + $(".vehicle-tags").append(`
    BOLO
    `); + $(".vehicle-tags").append(`
    Code 5
    `); + $(".vehicle-tags").append(`
    Stolen
    `); + $(".vehicle-info-imageurl-input").val(table["image"]); + } else if (eventData.type == "getWeaponData") { + impoundChanged = false; + let table = eventData.data; + + $(".weapon-information-title-holder").data( "dbid", table["id"] ); + + $(".weapon-info-serial-input").val(table["serial"]); + $(".weapon-info-owner-input").val(table["owner"]); + $(".weapon-info-class-input").val(table["weapClass"]); + $(".weapon-info-model-input").val(table["weapModel"]); + $(".weapon-info-imageurl-input").val(table["image"]); + + $(".weapon-info-content").val(table["information"]); + + $(".weapon-info-image").attr("src", table["image"]); + + $(".weapon-info-imageurl-input").val(table["image"]); + $(".contextmenu").on("click", ".weapons-delete", function () { + $(".weapons-items") + .find(`[data-id="${$(this).data("info")}"]`) + .remove(); + $.post( + `https://${GetParentResourceName()}/deleteWeapons`, + JSON.stringify({ + id: $(this).data("info"), + }) + ); + }); + + $(".weapons-items").on("contextmenu", ".weapons-item", function (e) { + var args = ""; + args = [ + { + className: "weapons-delete", + icon: "fas fa-times", + text: "Delete Weapon Info", + info: $(this).data("id"), + status: "", + }, + ]; + openContextMenu(e, args); + }); + } else if (eventData.type == "updateVehicleDbId") { + $(".vehicle-information-title-holder").data("dbid", Number(eventData.data)); + } else if (eventData.type == "updateIncidentDbId") { + $(".manage-incidents-editing-title").data("id", Number(eventData.data)); + + $(".manage-incidents-tags-add-btn").css("pointer-events", "auto"); + $(".manage-incidents-reports-content").css( + "pointer-events", + "auto" + ); + $(".manage-incidents-officers-add-btn").css( + "pointer-events", + "auto" + ); + $(".manage-incidents-civilians-add-btn").css( + "pointer-events", + "auto" + ); + $(".manage-incidents-evidence-add-btn").css( + "pointer-events", + "auto" + ); + $(".associated-incidents-tags-add-btn").css( + "pointer-events", + "auto" + ); + + } else if (eventData.type == "callDetach") { + $(".active-calls-item") + .filter("[data-id='" + eventData.callid + "']") + .children() + .children() + .find(".call-radio") + .html(eventData.data); + } else if (eventData.type == "callAttach") { + $(".active-calls-item") + .filter("[data-id='" + eventData.callid + "']") + .children() + .children() + .find(".call-radio") + .html(eventData.data); + } else if (eventData.type == "getAllLogs") { + let table = eventData.data; + $(".stafflogs-box").empty(); + $.each(table, function (index, value) { + $(".stafflogs-box").append( + `

    ► ${value.text + } (${timeAgo( + Number(value.time) + )})

    ` + ); + }); + } else if (eventData.type == "statusImpound") { + const table = eventData.data; + const plate = eventData.plate; + const linkedreport = table["linkedreport"]; + const fee = table["fee"]; + const time = table["time"] * 1000; + + let localDate = new Date(time); + const impoundDate = localDate.toLocaleDateString("en-US", { + timeZone: "UTC", + }); + const impoundTime = localDate.toLocaleTimeString("en-US", { + timeZone: "UTC", + }); + + $(".impound-plate").val(plate).attr("disabled", "disabled"); + $(".impound-linkedreport") + .val(linkedreport) + .attr("disabled", "disabled"); + $(".impound-fee") + .val("$" + fee) + .attr("disabled", "disabled"); + + if (table.paid === 1) { + $(".impound-fee").css("color", "green"); + } else { + $(".impound-fee").css("color", "red"); + } + + $(".impound-time") + .val(impoundDate + " - " + impoundTime) + .attr("disabled", "disabled"); + $(".impound-cancel").html("Close"); + $(".impound-submit").fadeOut(250); + $(".impound-form").slideDown(250); + $(".impound-form").fadeIn(250); + } else if (eventData.type == "greenImpound") { + $(".vehicle-tags") + .find(".impound-tag") + .addClass("green-tag") + .removeClass("red-tag"); + } else if (eventData.type == "redImpound") { + $(".vehicle-tags") + .find(".impound-tag") + .removeClass("green-tag") + .addClass("red-tag"); + } + }); +}); + +function fidgetSpinner(page) { + $(".close-all").fadeOut(0); + $(".container-load").fadeIn(0); + if (page == ".dashboard-page-container"){ + $.post(`https://${GetParentResourceName()}/getAllDashboardData`, JSON.stringify({})); + } + if (page == ".bolos-page-container") { + $.post(`https://${GetParentResourceName()}/getAllBolos`, JSON.stringify({})); + } + if (page == ".reports-page-container") { + $.post(`https://${GetParentResourceName()}/getAllReports`, JSON.stringify({})); + } + if (page == ".stafflogs-page-container") { + $.post(`https://${GetParentResourceName()}/getAllLogs`, JSON.stringify({})); + } + if (page == ".incidents-page-container") { + $.post(`https://${GetParentResourceName()}/getAllIncidents`, JSON.stringify({})); + } + setTimeout(() => { + $(".container-load").fadeOut(0); + $(page).fadeIn(0); + }, 1250); +} + +function timeShit() { + let localDate = new Date(); + const myTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone + date = localDate.toLocaleDateString("en-US", { + timeZone: myTimeZone, + }); + time = localDate.toLocaleTimeString("en-US", { + timeZone: myTimeZone, + }); + $(".date").html(date); + $(".time").html(time); +} + +setInterval(timeShit, 1000); + +function addTag(tagInput) { + $(".tags-holder").prepend(`
    ${tagInput}
    `); + + $.post( + `https://${GetParentResourceName()}/newTag`, + JSON.stringify({ + id: $(".manage-profile-citizenid-input").val(), + tag: tagInput, + }) + ); +} + +// Use the customSentence if defined, otherwise use the recommendedSentence +// This uses the assumption that customSentence will be 0 if not defined +function sendToJail(citizenId, customSentence, recommendedSentence) { + const sentence = Number(customSentence) || Number(recommendedSentence); + + $.post(`https://${GetParentResourceName()}/sendToJail`, JSON.stringify({ + citizenId, + sentence, + })); +} + +// Use the customSentence if defined, otherwise use the recommendedSentence +// This uses the assumption that customSentence will be 0 if not defined +function sendToCommunityService(citizenId, customSentence, recommendedSentence) { + const sentence = Number(customSentence) || Number(recommendedSentence); + + $.post(`https://${GetParentResourceName()}/sendToCommunityService`, JSON.stringify({ + citizenId, + sentence, + })); +} + +// Use the customFine if defined, otherwise use the recommendedFine +// This uses the assumption that customFine will be 0 if not defined +function sendFine(citizenId, customFine, recommendedFine, incidentId) { + const fine = Number(customFine) || Number(recommendedFine); + + $.post(`https://${GetParentResourceName()}/sendFine`, JSON.stringify({ + citizenId, + fine, + incidentId, + })); +} +// Context menu + +var menu = document.querySelector(".contextmenu"); + +function showMenu(x, y) { + $(".contextmenu").css("left", x + "px"); + $(".contextmenu").css("top", y + "px"); + $(".contextmenu").addClass("contextmenu-show"); +} + +function showChargesMenu(x, y) { + $(".ccontextmenu").css("left", x + "px"); + $(".ccontextmenu").css("top", y + "px"); + $(".ccontextmenu").addClass("ccontextmenu-show"); +} + +function hideMenu() { + $(".contextmenu").removeClass("contextmenu-show"); +} + +function hideChargesMenu() { + $(".ccontextmenu").removeClass("ccontextmenu-show"); +} + +function onMouseDown(e) { + hideMenu(); + hideChargesMenu(); + document.removeEventListener("mouseup", onMouseDown); +} + +function openContextMenu(e, args) { + e.preventDefault(); + showMenu(e.pageX, e.pageY); + $(".contextmenu").empty(); + $.each(args, function (index, value) { + if (value.status !== "blur(5px)") { + $(".contextmenu").prepend( + ` +
  • + + + ${value.text} + +
  • + ` + ); + } + }); + document.addEventListener("mouseup", onMouseDown); +} + +function openChargesContextMenu(e, args) { + e.preventDefault(); + showChargesMenu(e.pageX, e.pageY); + $(".ccontextmenu").empty(); + $.each(args, function (index, value) { + if (value.status !== "blur(5px)") { + $(".ccontextmenu").prepend( + ` +
  • + ${value.info} +
  • + ` + ); + } + }); + document.addEventListener("mouseup", onMouseDown); +} + +function expandImage(url) { + $(".close-all").css("filter", "brightness(35%)"); + $(".gallery-image-enlarged").fadeIn(150); + $(".gallery-image-enlarged").css("display", "block"); + $(".gallery-image-enlarged").attr("src", url); +} + +function copyImageSource(url) { + const el = document.createElement('textarea'); + el.value = url; + document.body.appendChild(el); + el.select(); + document.execCommand('copy'); + document.body.removeChild(el); +} + +function removeImage(url) { + let cid = $(".manage-profile-citizenid-input").val(); + $(".gallery-inner-container img") + .filter("[src='" + url + "']") + .remove(); +} + +function hideIncidentsMenu() { + if ( + $(".incidents-person-search-container").css("display") != "none" && + !mouse_is_inside + ) { + $(".incidents-person-search-container").fadeOut(250); + $(".close-all").css("filter", "none"); + } + if ( + $(".convictions-known-container").css("display") != "none" && + !mouse_is_inside + ) { + $(".convictions-known-container").fadeOut(0); + $(".close-all").css("filter", "none"); + } + if ( + $(".incidents-known-container").css("display") != "none" && + !mouse_is_inside + ) { + $(".incidents-known-container").fadeOut(0); + $(".close-all").css("filter", "none"); + } +} + +function onMouseDownIncidents(e) { + hideIncidentsMenu(); + document.removeEventListener("mouseup", onMouseDownIncidents); +} + +function titleCase(str) { + return str + .split(' ') + .map((word) => word[0].toUpperCase() + word.slice(1).toLowerCase()) + .join(' '); +} + +function searchProfilesResults(result) { + canSearchForProfiles = true; + $(".profile-items").empty(); + + if (result.length < 1) { + $(".profile-items").html( + ` +
    + +
    +
    +
    No Users Matching that search
    +
    +
    +
    +
    +
    + ` + ); + return true; + } + + let profileHTML = ""; + + result.forEach((value) => { + let charinfo = value.charinfo; + let metadata = value.metadata; + + if (typeof value.charinfo == "string") { + charinfo = JSON.parse(charinfo); + } + + if (typeof value.metadata == "string") { + metadata = JSON.parse(metadata); + } + + if (!metadata) { + metadata = {}; + } + + if (!metadata.licences) { + metadata.licences = {}; + } + + let name = charinfo.firstname + " " + charinfo.lastname; + let warrant = "red-tag"; + let convictions = "red-tag"; + + let licences = ""; + let licArr = Object.entries(value.licences); + + if (licArr.length == 0 || licArr.length == undefined) { + var licenseTypes = licenseTypesGlobal; + licArr = Object.entries(licenseTypes.reduce((licenseType, licenseValue) => (licenseType[licenseValue] = false, licenseType), {})); + } + + if (licArr.length > 0 && (PoliceJobs[playerJob] !== undefined || DojJobs[playerJob] !== undefined)) { + for (const [lic, hasLic] of licArr) { + let tagColour = + hasLic == true ? "green-tag" : "red-tag"; + licences += `${titleCase(lic)}`; + } + } + + if (value.warrant == true) { + warrant = "green-tag"; + } + + if (value.convictions < 5) { + convictions = "green-tag"; + } else if ( + value.convictions > 4 && + value.convictions < 15 + ) { + convictions = "orange-tag"; + } + + if (value.pp == '') { + value.pp = 'img/not-found.webp' + } + + profileHTML += ` +
    + +
    +
    +
    ${name}
    +
    + ${licences} +
    +
    + ${value.warrant ? "Active" : "No"} Warrant + ${value.convictions} Convictions +
    +
    +
    +
    Citizen ID: ${value.citizenid}
      +
    +
    +
    +`; + }); + + $(".profile-items").html(profileHTML); +} + +window.addEventListener("message", (event) => { + if (event.data.action === "updateOfficerData") { + updateOfficerData(event.data.data); + } else if (event.data.action === "updateFingerprintData") { + const { fingerprint } = event.data; + if (fingerprint && fingerprint !== "") { + $(".manage-profile-fingerprint-input").val(fingerprint); + } else { + $(".manage-profile-fingerprint-input").val(""); + } + } +}); + +function updateOfficerData(officerData) { + // Convert totalTime to totalSeconds for sorting + officerData.forEach(officer => { + officer.totalSeconds = timeStringToSeconds(officer.totalTime); + }); + + // Sort based on totalSeconds + officerData.sort((a, b) => b.totalSeconds - a.totalSeconds); + + // Efficiently create officer elements + const officerElements = officerData.map((officer, index) => { + const position = getPosition(index + 1); + const color = index < 3 ? 'white' : 'grey'; + + return `
    + ► ${position}: ${officer.name} (${officer.callsign})${officer.totalTime} +
    `; + }).join(''); + + // Update the DOM once + const leaderboardBox = document.querySelector('.leaderboard-box'); + leaderboardBox.innerHTML = officerElements; +} + +function getPosition(rank) { + const ordinal = rank % 10; + if (rank === 11 || rank === 12 || rank === 13) { + return rank + 'th'; + } + return rank + (ordinal === 1 ? 'st' : ordinal === 2 ? 'nd' : ordinal === 3 ? 'rd' : 'th'); +} + +function timeStringToSeconds(t) { + if (!t) return 0; + + let days = 0, hours = 0, minutes = 0, seconds = 0; + let daysPart = '0'; + let timePart = t; + + // days vs day check + if (t.includes(' days ')) { + [daysPart, timePart] = t.split(' days '); + } + + const timeParts = timePart.split(' '); + + for (let i = 0; i < timeParts.length; i += 2) { + const val = parseInt(timeParts[i]); + switch (timeParts[i + 1]) { + case 'hours': + hours = val; + break; + case 'minutes': + minutes = val; + break; + case 'seconds': + seconds = val; + break; + } + } + + days = parseInt(daysPart); + + return ( + days * 86400 + + hours * 3600 + + minutes * 60 + + seconds + ); +} + + +window.addEventListener("load", function () { + document + .getElementById("offenses-search") + .addEventListener("keyup", function () { + var search = this.value.toLowerCase(); + if (search.length > 1) { + $.each($(".offense-item"), function (i, d) { + const Name = $(this) + .find(".offense-item-offense") + .html() + .toLowerCase(); + const Number = $(this) + .find(".offense-item-id") + .html() + .toLowerCase(); + if (Name.includes(search)) { + $(this).show(); + } else if (Number.includes(search)) { + $(this).show(); + } else { + $(this).hide(); + } + }); + } else { + $.each($(".offense-item"), function (i, d) { + $(this).show(); + }); + } + }); +}); + + + // Dispatch Map // +customcrs = L.extend({}, L.CRS.Simple, { + projection: L.Projection.LonLat, + scale: function(zoom) { + + return Math.pow(2, zoom); + }, + zoom: function(sc) { + + return Math.log(sc) / 0.6931471805599453; + }, + distance: function(pos1, pos2) { + var x_difference = pos2.lng - pos1.lng; + var y_difference = pos2.lat - pos1.lat; + return Math.sqrt(x_difference * x_difference + y_difference * y_difference); + }, + transformation: new L.Transformation(0.02072, 117.3, -0.0205, 172.8), + infinite: false +}); + +var map = L.map("map-item", { +crs: customcrs, +minZoom: 3, +maxZoom: 5, +zoom: 5, + +noWrap: true, +continuousWorld: false, +preferCanvas: true, + +center: [0, -1024], +maxBoundsViscosity: 1.0 +}); + // https://upload.versescripts.net/ +var customImageUrl = 'https://files.fivemerr.com/images/60c68fc9-1a7f-4e5a-800a-f760a74186ca.jpeg'; + +var sw = map.unproject([0, 1024], 3 - 1); +var ne = map.unproject([1024, 0], 3 - 1); +var mapbounds = new L.LatLngBounds(sw, ne); +map.setView([-300, -1500], 4); +map.setMaxBounds(mapbounds); + + +map.attributionControl.setPrefix(false) + +L.imageOverlay(customImageUrl, mapbounds).addTo(map); + +map.on('dragend', function() { + if (!mapbounds.contains(map.getCenter())) { + map.panTo(mapbounds.getCenter(), { animate: false }); + } +}); + +var Dispatches = {}; +var DispatchPing = L.divIcon({ + html: '', + iconSize: [20, 20], + className: 'map-icon map-icon-ping', + offset: [-10, 0] +}); +var mapMarkers = L.layerGroup(); + +function DispatchMAP(DISPATCH) { + var MIN = Math.round(Math.round((new Date() - new Date(DISPATCH.time)) / 1000) / 60); + if (MIN > 10) return; + + var COORDS_X = DISPATCH.coords.x + var COORDS_Y = DISPATCH.coords.y + var CODE = DISPATCH.id + + Dispatches[CODE] = L.marker([COORDS_Y, COORDS_X], { icon: DispatchPing }); + Dispatches[CODE].addTo(map); + + // Automatic deletion after a period of 20 minutes, equivalent to 1200000 milliseconds. + setTimeout(function() { + map.removeLayer(Dispatches[CODE]); + }, 1200000); + + Dispatches[CODE].bindTooltip(`
    ${DISPATCH.message}
    #${DISPATCH.id}
    `, + { + direction: 'top', + permanent: false, + offset: [0, -10], + opacity: 1, + interactive: true, + className: 'map-tooltip' + }); + + Dispatches[CODE].addTo(mapMarkers); + + Dispatches[CODE].on('click', function() { + const callId = CODE + $.post( + `https://${GetParentResourceName()}/setWaypoint`, + JSON.stringify({ + callid: callId, + }) + ); + }); + + Dispatches[CODE].on('contextmenu', function() { + map.removeLayer(Dispatches[CODE]); + }); + +} + +function ClearMap() { +$(".leaflet-popup-pane").empty(); +$(".leaflet-marker-pane").empty(); +} + +$(".map-clear").on('click', function() { + $(".map-clear").empty(); + $(".map-clear").prepend( + `` + ); + setTimeout(() => { + $(".map-clear").empty(); + $(".map-clear").html("Clear"); + ClearMap(); + }, 1500); +}); diff --git a/ui/dashboard.html b/ui/dashboard.html index 4cdf2e1c..df87fbdb 100644 --- a/ui/dashboard.html +++ b/ui/dashboard.html @@ -1,833 +1,1068 @@ - - - - - - - - Project Sloth MDT - - - - - - - - - -
      -
    -
    -
    - - - -
    -
    -
    Attached Units
    -
    -
    -
    -
    - - - - - -
    -
    - -
    -
    SAN ANDREAS STATE POLICE
    -
    Mobile Database Terminal
    -
    -
    -
    Loading...
    -
    00:00
    -
    -
    -
    Welcome, Loading... -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    SAN ANDREAS STATE POLICE
    -
    Mobile Database Terminal
    -
    -
    -
    Loading...
    -
    00:00
    -
    -
    -
    Welcome, Loading... -
    -
    -
    -
    -
    - -
    -
    -
    -
    Dispatch
    -
    Refresh
    -
    -
    - -
    - -
    -
    Warrants
    -
    - -
    -
    -
    - -
    -
    -
    Quote of the Day
    -
    The DOJ is not the enemy, but is clearly not an ally
    -
    -
    -
    -
    Bulletin Board
    -
    -
    -
    -
    -
    -
    -
    Dispatch
    -
    -
    Active Units
    -
    0
    -
    0
    -
    0
    -
    0
    -
    -
    -
    -
    Calls
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    SAN ANDREAS STATE POLICE
    -
    Mobile Database Terminal
    -
    -
    -
    Loading...
    -
    00:00
    -
    -
    -
    Welcome, Loading... -
    -
    -
    -
    -
    - -
    -
    Profiles
    -
    -
    -
    -
    -
    -
    Manage Profile
    -
    -
    You are currently editing ...
    -
    Save
    -
    -
    - -
    -
    Citizen ID
    -
    -
    -
    Forename
    -
    -
    -
    Surname
    -
    -
    -
    DOB
    -
    -
    -
    Profession
    -
    -
    -
    Profile Image URL
    -
    -
    -
    -
    - - -
    -
    -
    -
    Licenses
    -
    -
    -
    -
    Vehicles
    -
    -
    -
    -
    -
    Tags
    -
    -
    -
    -
    -
    -
    Properties
    -
    -
    - - - - -
    -
    Known Convictions
    -
    -
    - -
    -
    -
    -
    -
    - -
    -
    SAN ANDREAS STATE POLICE
    -
    Mobile Database Terminal
    -
    -
    -
    Loading...
    -
    00:00
    -
    -
    -
    Welcome, Loading... -
    -
    -
    -
    -
    - -
    -
    -
    Incidents
    -
    Refresh
    -
    -
    -
    -
    -
    -
    -
    -
    -
    Manage Incident
    -
    -
    - -
    -
    You are currently creating a new Incident
    -
    Title
    -
    - -
    -
    -
    Tags
    -
    -
    -
    -
    -
    -
    -
    -
    Officers Involved
    -
    -
    -
    - -
    -
    -
    -
    -
    Civilians Involved
    -
    -
    -
    - -
    -
    -
    -
    -
    Evidence
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    Associated
    -
    -
    -
    Criminals Involved
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - -
    -
    SAN ANDREAS STATE POLICE
    -
    Mobile Database Terminal
    -
    -
    -
    Loading...
    -
    00:00
    -
    -
    -
    Welcome, Loading... -
    -
    -
    -
    -
    - -
    - -
    -
    Reports
    -
    Refresh
    -
    -
    -
    -
    -
    -
    -
    -
    Manage Report
    -
    New
    -
    Save
    -
    -
    You are currently creating a new report
    -
    Title
    -
    - - -
    - -
    Type
    -
    - - -
    - -
    -
    -
    -
    Tags
    -
    -
    -
    -
    - -
    -
    -
    Officers Involved
    -
    -
    -
    -
    -
    -
    -
    Civilians Involved
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    SAN ANDREAS STATE POLICE
    -
    Mobile Database Terminal
    -
    -
    -
    Loading...
    -
    00:00
    -
    -
    -
    Welcome, Loading... -
    -
    -
    -
    -
    - -
    - -
    -
    Bolos
    -
    Refresh
    -
    -
    -
    -
    -
    -
    -
    -
    Manage Bolo
    -
    New
    -
    Save
    -
    -
    You are currently creating a new BOLO
    -
    Title
    -
    - - -
    - -
    Plate
    -
    - -
    Owner
    -
    - -
    Individual
    -
    - - -
    - -
    -
    -
    -
    Tags
    -
    -
    -
    -
    - -
    -
    -
    Officers Involved
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    SAN ANDREAS STATE POLICE
    -
    Mobile Database Terminal
    -
    -
    -
    Loading...
    -
    00:00
    -
    -
    -
    Welcome, Loading... -
    -
    -
    -
    -
    - -
    - -
    -
    -
    -
    -
    - -
    -
    SAN ANDREAS STATE POLICE
    -
    Mobile Database Terminal
    -
    -
    -
    Loading...
    -
    00:00
    -
    -
    -
    Welcome, Loading... -
    -
    -
    -
    -
    - -
    -
    Vehicles
    -
    -
    - -
    -
    -
    -
    -
    Vehicle Information
    -
    Save
    -
    -
    - -
    -
    Registration Plate
    -
    -
    -
    Owner
    -
    -
    -
    Class
    -
    -
    -
    Make/Model
    -
    -
    -
    Image URL
    -
    -
    -
    -
    -
    -
    Known Information
    -
    -
    -
    Paint
    -
    Impound
    -
    BOLO
    -
    Code 5
    -
    Stolen
    -
    -
    -
    - -
    -
    -
    -
    -
    - -
    -
    SAN ANDREAS STATE POLICE
    -
    Mobile Database Terminal
    -
    -
    -
    Loading...
    -
    00:00
    -
    -
    -
    Welcome, Loading... -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    - -
    -
    SAN ANDREAS STATE POLICE
    -
    Mobile Database Terminal
    -
    -
    -
    Loading...
    -
    00:00
    -
    -
    -
    Welcome, Loading... -
    -
    -
    -
    -
    - -
    -
    - -
    Pacific Bank CAM 1
    -
    Pacific Bank CAM 2
    -
    Pacific Bank CAM 3
    -
    Limited Ltd Grove St.
    -
    Rob's Liqour Prosperity St.
    -
    Rob's Liqour San Andreas Ave.
    -
    Limited Ltd Ginger St.
    -
    24/7 Supermarkt Innocence Blvd.
    -
    Rob's Liqour El Rancho Blvd.
    -
    Limited Ltd West Mirror Drive
    -
    24/7 Supermarkt Clinton Ave
    -
    Limited Ltd Banham Canyon Dr
    -
    Rob's Liqour Great Ocean Hwy
    -
    24/7 Supermarkt Ineseno Road
    -
    24/7 Supermarkt Barbareno Rd.
    -
    24/7 Supermarkt Route 68
    -
    Rob's Liqour Route 68
    -
    24/7 Supermarkt Senora Fwy CAM 1
    -
    24/7 Supermarkt Senora Fwy CAM 2
    -
    24/7 Supermarkt Alhambra Dr.
    -
    Fleeca Bank Hawick Ave CAM 1
    -
    Fleeca Bank Hawick Ave CAM 2
    -
    Fleeca Bank Legion Square
    -
    Fleeca Bank Del Perro Blvd
    -
    Fleeca Bank Great Ocean Hwy
    -
    Paleto Bank
    -
    Del Vecchio
    Liquor Paleto Bay
    -
    Don's Country Store Paleto Bay CAM 1
    -
    Don's Country Store Paleto Bay CAM 2
    -
    Don's Country Store Paleto Bay CAM 3
    -
    Vangelico Jewelery CAM 1
    -
    Vangelico Jewelery CAM 2
    -
    Vangelico Jewelery CAM 3
    -
    Vangelico Jewelery CAM 4
    -
    -
    -
    -
    - - - - \ No newline at end of file + + + + + + + + Project Sloth MDT + + + + + + + + + + + + + + + + + + + + + +
      +
        +
        +
        + + + +
        +
        +
        Attached Units
        +
        +
        +
        +
        + + + + + +
        +
        +
        Convictions
        +
        +
        +
        +
        + +
        +
        +
        Known Incidents
        +
        +
        +
        +
        + +
        +
        + +
        +
        SAN ANDREAS STATE POLICE
        +
        Mobile Database Terminal
        +
        +
        +
        Loading...
        +
        00:00
        +
        +
        +
        Welcome, Loading... +
        +
        +
        +
        +
        +
        + +
        +
        +
        +
        + +
        +
        SAN ANDREAS STATE POLICE
        +
        Mobile Database Terminal
        +
        +
        +
        Loading...
        +
        00:00
        +
        +
        +
        Welcome, Loading... +
        +
        +
        +
        +
        + +
        +
        +
        +
        Dispatch
        +
        Refresh
        +
        +
        + +
        + +
        +
        Warrants
        +
        + +
        +
        +
        + +
        +
        +
        Quote of the Day
        +
        The DOJ is not the enemy, but is clearly not an ally
        +
        +
        +
        +
        Bulletin Board
        +
        +
        +
        +
        +
        +
        +
        Dispatch
        +
        +
        Active Units
        +
        0
        +
        0
        +
        0
        +
        0
        +
        0
        + +
        +
        +
        +
        Recent Calls
        +
        +
        +
        + +
        +
        +
        +
        +
        +
        +
        +
        + +
        +
        SAN ANDREAS STATE POLICE
        +
        Mobile Database Terminal
        +
        +
        +
        Loading...
        +
        00:00
        +
        +
        +
        Welcome, Loading... +
        +
        +
        +
        +
        + +
        +
        Profiles
        +
        +
        +
        +
        +
        +
        Manage Profile
        +
        +
        You are currently editing ...
        +
        Save
        +
        +
        ACTIVE WARRANT
        +
        + +
        +
        Citizen ID
        +
        +
        +
        Forename
        +
        +
        +
        Surname
        +
        +
        +
        DOB
        +
        +
        +
        Fingerprint
        +
        +
        +
        Phone Number
        +
        +
        +
        Profession
        +
        +
        +
        Apartment
        +
        +
        +
        Profile Image URL
        +
        +
        +
        +
        + +
        +
        +
        +
        Licenses
        +
        +
        +
        +
        Vehicles
        +
        +
        +
        +
        +
        Tags
        +
        +
        +
        +
        +
        +
        Properties
        +
        +
        + +
        Show Convictions
        +
        Show Incidents
        +
        +
        +
        +
        +
        + +
        +
        SAN ANDREAS STATE POLICE
        +
        Mobile Database Terminal
        +
        +
        +
        Loading...
        +
        00:00
        +
        +
        +
        Welcome, Loading... +
        +
        +
        +
        +
        + +
        +
        +
        Incidents
        +
        Refresh
        +
        +
        +
        +
        Right click below to delete incident.
        +
        +
        +
        +
        +
        +
        Manage Incident
        +
        +
        + +
        +
        You are currently creating a new Incident
        +
        Title
        +
        + +
        +
        +
        Tags
        +
        +
        +
        +
        +
        +
        +
        +
        Evidence
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        Associated
        +
        +
        +
        Officers Involved
        +
        +
        +
        + +
        +
        +
        +
        +
        Civilians Involved
        +
        +
        +
        + +
        +
        +
        +
        +
        Criminals Involved
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        + +
        +
        SAN ANDREAS STATE POLICE
        +
        Mobile Database Terminal
        +
        +
        +
        Loading...
        +
        00:00
        +
        +
        +
        Welcome, Loading... +
        +
        +
        +
        +
        + +
        + +
        +
        Reports
        +
        Refresh
        +
        +
        +
        Right click below to delete report.
        +
        +
        +
        +
        +
        +
        Manage Report
        +
        New
        +
        Save
        +
        +
        You are currently creating a new report
        +
        Title
        +
        + + +
        + +
        Type
        +
        + + +
        + +
        +
        +
        +
        Tags
        +
        +
        +
        +
        +
        +
        +
        Officers Involved
        +
        +
        +
        +
        +
        +
        +
        Civilians Involved
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        + +
        +
        SAN ANDREAS STATE POLICE
        +
        Mobile Database Terminal
        +
        +
        +
        Loading...
        +
        00:00
        +
        +
        +
        Welcome, Loading... +
        +
        +
        +
        +
        + +
        + +
        +
        Bolos
        +
        Refresh
        +
        +
        +
        +
        +
        +
        +
        +
        Manage Bolo
        +
        New
        +
        Save
        +
        +
        You are currently creating a new BOLO
        +
        Title
        +
        + + +
        + +
        Plate
        +
        + +
        Owner
        +
        + +
        Individual
        +
        + + +
        + +
        +
        +
        +
        Tags
        +
        +
        +
        +
        +
        +
        +
        Officers Involved
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        + +
        +
        SAN ANDREAS STATE POLICE
        +
        Mobile Database Terminal
        +
        +
        +
        Loading...
        +
        00:00
        +
        +
        +
        Welcome, Loading... +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        +
        SAN ANDREAS STATE POLICE
        +
        Mobile Database Terminal
        +
        +
        +
        Loading...
        +
        00:00
        +
        +
        +
        Welcome, Loading... +
        +
        +
        +
        +
        + +
        + +
        +
        +
        +
        +
        + +
        +
        SAN ANDREAS STATE POLICE
        +
        Mobile Database Terminal
        +
        +
        +
        Loading...
        +
        00:00
        +
        +
        +
        Welcome, Loading... +
        +
        +
        +
        +
        + +
        +
        Vehicles
        +
        +
        + +
        +
        +
        +
        +
        Vehicle Information
        +
        Save
        +
        +
        + +
        +
        Registration Plate
        +
        +
        +
        Owner
        +
        +
        +
        Class
        +
        +
        +
        Make/Model
        +
        +
        +
        Image URL
        +
        +
        +
        Vehicle Points: 0
        +
        +
        +
        +
        +
        Known Information
        +
        +
        +
        Paint
        +
        Impound
        +
        BOLO
        +
        Code 5
        +
        Stolen
        +
        +
        +
        + +
        +
        +
        +
        +
        + +
        +
        SAN ANDREAS STATE POLICE
        +
        Mobile Database Terminal
        +
        +
        +
        Loading...
        +
        00:00
        +
        +
        +
        Welcome, Loading... +
        +
        +
        +
        +
        + +
        +
        Weapons
        +
        +
        + +
        +
        +
        +
        +
        Weapon Information
        +
        New
        +
        Save
        +
        +
        + +
        +
        Serial Number
        +
        +
        +
        Registered To
        +
        +
        +
        Model
        +
        +
        +
        Class
        +
        +
        +
        Image URL
        +
        +
        +
        +
        + +
        +
        +
        +
        +
        + +
        +
        SAN ANDREAS STATE POLICE
        +
        Mobile Database Terminal
        +
        +
        +
        Loading...
        +
        00:00
        +
        +
        +
        Welcome, Loading... +
        +
        +
        +
        +
        + +
        +
        Logs
        +
        +
        +
        +
        Officers Activity
        +
        +
        +
        +
        +
        +
        +
        + +
        +
        SAN ANDREAS STATE POLICE
        +
        Mobile Database Terminal
        +
        +
        +
        Loading...
        +
        00:00
        +
        +
        +
        Welcome, Loading... +
        +
        +
        +
        +
        + +
        +
        + +
        Pacific Bank CAM 1
        +
        Pacific Bank CAM 2
        +
        Pacific Bank CAM 3
        +
        Limited Ltd Grove St.
        +
        Rob's Liqour Prosperity St.
        +
        Rob's Liqour San Andreas Ave.
        +
        Limited Ltd Ginger St.
        +
        24/7 Supermarkt Innocence Blvd.
        +
        Rob's Liqour El Rancho Blvd.
        +
        Limited Ltd West Mirror Drive
        +
        24/7 Supermarkt Clinton Ave
        +
        Limited Ltd Banham Canyon Dr
        +
        Rob's Liqour Great Ocean Hwy
        +
        24/7 Supermarkt Ineseno Road
        +
        24/7 Supermarkt Barbareno Rd.
        +
        24/7 Supermarkt Route 68
        +
        Rob's Liqour Route 68
        +
        24/7 Supermarkt Senora Fwy CAM 1
        +
        24/7 Supermarkt Alhambra Dr.
        +
        24/7 Supermarkt Senora Fwy CAM 2
        +
        Fleeca Bank Hawick Ave CAM 1
        +
        Fleeca Bank Hawick Ave CAM 2
        +
        Fleeca Bank Legion Square
        +
        Fleeca Bank Del Perro Blvd
        +
        Fleeca Bank Great Ocean Hwy
        +
        Paleto Bank
        +
        Del Vecchio
        Liquor Paleto Bay
        +
        Don's Country Store Paleto Bay CAM 1
        +
        Don's Country Store Paleto Bay CAM 2
        +
        Don's Country Store Paleto Bay CAM 3
        +
        Vangelico Jewelery CAM 1
        +
        Vangelico Jewelery CAM 2
        +
        Vangelico Jewelery CAM 3
        +
        Vangelico Jewelery CAM 4
        +
        +
        +
        +
        +
        +
        + +
        +
        SAN ANDREAS STATE POLICE
        +
        Mobile Database Terminal
        +
        +
        +
        Loading...
        +
        00:00
        +
        +
        +
        Welcome, Loading... +
        +
        +
        +
        +
        + +
        +
        Dispatch Calls
        +
        +
        +
        +
        + +
        +
        +
        +
        + +
        +
        +
        Dispatch Map
        +
        Clear
        +
        +
        +
        +
        +
        + + + + + diff --git a/ui/img/9Xn6xXK.webp b/ui/img/9Xn6xXK.webp new file mode 100644 index 00000000..98d160fb Binary files /dev/null and b/ui/img/9Xn6xXK.webp differ diff --git a/ui/img/BBSP.webp b/ui/img/BBSP.webp new file mode 100644 index 00000000..c17bcee7 Binary files /dev/null and b/ui/img/BBSP.webp differ diff --git a/ui/img/BCSO.webp b/ui/img/BCSO.webp new file mode 100644 index 00000000..d3cecdf2 Binary files /dev/null and b/ui/img/BCSO.webp differ diff --git a/ui/img/LSPD.webp b/ui/img/LSPD.webp new file mode 100644 index 00000000..84e59b2b Binary files /dev/null and b/ui/img/LSPD.webp differ diff --git a/ui/img/LSSD.webp b/ui/img/LSSD.webp new file mode 100644 index 00000000..bff08684 Binary files /dev/null and b/ui/img/LSSD.webp differ diff --git a/ui/img/citation.png b/ui/img/citation.png new file mode 100644 index 00000000..2e453072 Binary files /dev/null and b/ui/img/citation.png differ diff --git a/ui/img/court.webp b/ui/img/court.webp new file mode 100644 index 00000000..a10ec58b Binary files /dev/null and b/ui/img/court.webp differ diff --git a/ui/img/ems_badge.webp b/ui/img/ems_badge.webp new file mode 100644 index 00000000..4bbff1c5 Binary files /dev/null and b/ui/img/ems_badge.webp differ diff --git a/ui/img/ems_badge_zonah.webp b/ui/img/ems_badge_zonah.webp new file mode 100644 index 00000000..664f3a34 Binary files /dev/null and b/ui/img/ems_badge_zonah.webp differ diff --git a/ui/img/h7S5f9J.webp b/ui/img/h7S5f9J.webp new file mode 100644 index 00000000..0e8f65b2 Binary files /dev/null and b/ui/img/h7S5f9J.webp differ diff --git a/ui/img/sapr.webp b/ui/img/sapr.webp new file mode 100644 index 00000000..b257b5c3 Binary files /dev/null and b/ui/img/sapr.webp differ diff --git a/ui/img/sasp_badge.webp b/ui/img/sasp_badge.webp new file mode 100644 index 00000000..59f74b2a Binary files /dev/null and b/ui/img/sasp_badge.webp differ diff --git a/ui/img/sast_badge.webp b/ui/img/sast_badge.webp new file mode 100644 index 00000000..382b9680 Binary files /dev/null and b/ui/img/sast_badge.webp differ diff --git a/ui/style.css b/ui/style.css index c94822b3..8a8f5603 100644 --- a/ui/style.css +++ b/ui/style.css @@ -1,5918 +1,6750 @@ -@import url('https://fonts.googleapis.com/css?family=Montserrat'); - -:root { - --color-1: #1E3955; - --color-2: #213F5F; - --color-3: #2C537B; - --color-4: #23405E; - --color-5: #152638; - --color-6: #121f2c; - --color-7: rgb(28, 54, 82); - --color-8: #2554cc; - --color-9: #6E707C; - --color-10: #8f741b; -} - -body { - font-family: 'Montserrat', sans-serif; - overflow: hidden; - display: none; -} - -textarea { - font-family: 'Montserrat', sans-serif; -} - -::-webkit-scrollbar { - width: 0px; -} - -input::-webkit-outer-spin-button, -input::-webkit-inner-spin-button { - -webkit-appearance: none; - margin: 0; -} - -.dashboard-page-container { - background-color: var(--color-9); - border-radius: 15px; - position: absolute; - width: 96.5%; - height: 96.5%; - left: 2.0%; - top: 1.5%; - display: none; -} - -.badge-logo { - margin-left: 1vh -} - -.profile-page-container { - background-color: var(--color-9); - border-radius: 15px; - position: absolute; - width: 96.5%; - height: 96.5%; - left: 2.0%; - top: 1.5%; - display: none; -} - -.incidents-page-container { - background-color: var(--color-9); - border-radius: 15px; - position: absolute; - width: 96.5%; - height: 96.5%; - left: 2.0%; - top: 1.5%; - display: none; -} - -.bolos-page-container { - background-color: var(--color-9); - border-radius: 15px; - position: absolute; - width: 96.5%; - height: 96.5%; - left: 2.0%; - top: 1.5%; - display: none; -} - -.reports-page-container { - background-color: var(--color-9); - border-radius: 15px; - position: absolute; - width: 96.5%; - height: 96.5%; - left: 2.0%; - top: 1.5%; - display: none; -} - -.penalcode-page-container { - background-color: var(--color-9); - border-radius: 15px; - position: absolute; - width: 96.5%; - height: 96.5%; - left: 2.0%; - top: 1.5%; - display: none; -} - -.dmv-page-container { - background-color: var(--color-9); - border-radius: 15px; - position: absolute; - width: 96.5%; - height: 96.5%; - left: 2.0%; - top: 1.5%; - display: none; -} - -.stafflogs-page-container { - background-color: var(--color-9); - border-radius: 15px; - position: absolute; - width: 96.5%; - height: 96.5%; - left: 2.0%; - top: 1.5%; - display: none; - overflow: auto -} - -.container-load { - background-color: var(--color-9); - border-radius: 15px; - position: absolute; - width: 96.5%; - height: 96.5%; - left: 2.0%; - top: 1.5%; - display: none; -} - -.header { - height: 7vh; - background-color: var(--color-1); - border: 5px solid #393B39; - border-top-right-radius: 50px; - border-bottom-right-radius: 50px; - width: 96.5%; - position: absolute; - top: 5.5vh; - display: flex; - align-items: center; - user-select: none; -} - -.header-left { - display: flex; - flex-direction: column; - text-align: left; - margin-left: 10px; - margin-right: 0px; -} - -.header-middle { - background-color: var(--color-2); - border-radius: 15px; - width: fit-content; - height: fit-content; - padding: 10px; - padding-left: 20px; - padding-right: 20px; - display: flex; - flex-direction: column; - text-align: center; - color: white; - margin: auto; - font-size: 20px; -} - -.header-right { - display: flex; - flex-direction: column; - text-align: right; - margin: auto; - margin-right: 35px; - margin-left: 0px; -} - -.main-container { - border-top: 5px solid var(--color-3); - width: 100%; - height: 79.5%; - position: absolute; - display: flex; - bottom: 0; -} - -.nav-menu { - background-color: var(--color-1); - border-right: 5px solid var(--color-3); - min-width: 22.5vh; - height: 100%; - display: flex; - flex-direction: column; - user-select: none; - border-bottom-left-radius: 15px; -} - -.nav-item { - background-color: var(--color-4); - margin-top: 10px; - padding: 10px; - color: white; - font-size: 18px; - font-weight: bolder; -} - -.nav-item:hover { - background-color: var(--color-3); -} - -.active-nav { - background-color: var(--color-3); -} - -.warrants-container { - background-color: var(--color-1); - border: 2px solid var(--color-3); - display: flex; - flex-direction: column; - height: 74.7vh; - width: 50vh; - margin-top: 10px; - margin-left: 10px; -} - -.warrants-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.fa-search { - font-size: 15px; - font-weight: normal; -} - -.warrants-items { - display: flex; - flex-direction: column; - overflow: auto; - margin: auto; - margin-top: 10px; - width: 95%; - height: 55vh; -} - -.warrants-item { - background-color: var(--color-5); - width: 100%; - margin: auto; - margin-bottom: 10px; - margin-top: 0px; - display: flex; - user-select: none; -} - -.warrants-item:hover { - background-color: var(--color-3); -} - -.warrant-image { - width: 9vh; - height: 9vh; - margin-left: 5px; - margin-top: auto; - margin-bottom: auto; -} - -.warrant-title { - font-size: 16px; - font-weight: lighter; - color: white; - margin-top: 5px; -} - -.warrant-item-info { - color: #cccccc; - font-size: 12px; -} - -.warrant-bottom-info { - display: flex; - margin-top: 1vh; - margin-bottom: 0.75vh; - width: 100%; -} - -.warrant-id { - color: white; - font-size: 12px; -} - -.warrant-expiry-date { - color: white; - font-size: 12px; - margin: auto; - margin-right: 10px; -} - -.quotes-container { - background-color: var(--color-1); - border: 2px solid var(--color-3); - width: 50vh; - height: 75px; - margin-top: 10px; - margin-left: 10px; - display: flex; - align-items: center; - user-select: none; -} - -.quote-title { - font-size: 14px; - background-color: var(--color-4); - padding: 5px; - margin: 10px 0px 10px 10px; - text-align: center; - color: white; - font-weight: bolder; - width: 85px; - /* height: 30px; */ - text-shadow: black 1px 1px; -} - -.quote { - margin-right: 10px; - margin-left: 10px; - /* margin-bottom: 25px; */ - width: 100%; - background-color: var(--color-5); - height: 30px; - padding: 10px; - text-align: center; - display: flex; - font-style: italic; -} - -.quote-span { - margin: auto; - color: white; - font-size: 16px; -} - -.bulletin-container { - background-color: var(--color-1); - border: 2px solid var(--color-3); - display: flex; - flex-direction: column; - height: 100%; - width: 50vh; - margin-top: 10px; - margin-bottom: 8px; - margin-left: 10px; - user-select: none; - overflow: hidden; -} - -.bulletin-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-right: 0px; - margin-bottom: 0px; - width: 83.5%; - align-items: center; - user-select: none; -} - -.bulletin-items-continer { - margin: auto; - margin-top: 10px; - margin-bottom: 10px; - overflow: auto; - height: 100%; - display: flex; - flex-direction: column; -} - -.bulletin-item { - background-color: var(--color-5); - width: 45vh; - /* min-height: 7.7vh; */ - /* height: 7.7vh; */ - padding: 10px; - display: flex; - flex-direction: column; - margin-bottom: 10px; -} - -.bulletin-item:hover { - background-color: var(--color-3); -} - -.bulletin-item-title { - color: white; - margin-left: 5px; - font-size: 20px; - text-align: left; -} - -span.bulletin-item-title { - outline: none; - border: none; -} - -span.bulletin-item-title[contenteditable]:empty::before { - content: 'Enter Title'; -} - -.bulletin-item-info { - color: #cccccc; - font-size: 15px; - margin-left: 5px; - margin-top: 10px; - text-align: left; - padding-bottom: 0.8vh; - overflow-wrap: break-word; -} - -span.bulletin-item-info { - outline: none; - border: none; -} - -span.bulletin-item-info[contenteditable]:empty::before { - content: 'Enter Bulletin Information'; -} - -.bulletin-bottom-info { - display: flex; - margin-left: 5px; - margin-bottom: 0px; - color: white; - font-size: 12px; - height: 100%; -} - -.bulletin-date { - margin: auto; - margin-right: 5px; - margin-bottom: 0px; -} - -.bulletin-id { - margin: auto; - margin-left: 0px; - margin-bottom: 0px; -} - -.dispatch-container { - background-color: var(--color-1); - border: 2px solid var(--color-3); - display: flex; - flex-direction: column; - height: 74.7vh; - width: 50vh; - margin-top: 10px; - margin-left: 10px; - margin-right: 15px; -} - -.dispatch-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.active-unit-title { - background-color: var(--color-3); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - margin-right: 2px; - margin-left: 10px; - margin-left: 13px; - width: 57.5%; - align-items: center; - user-select: none; -} - -.active-unit-count { - background-color: var(--color-3); - color: white; - font-weight: bolder; - font-size: 14px; - padding-top: 6px; - padding-bottom: 6px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - margin-right: 3px; - margin-left: 3px; - width: 8%; - align-items: center; - user-select: none; - border-radius: 5px; -} - -.calls-title { - background-color: var(--color-3); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - margin-right: 2px; - margin-left: 10px; - margin-left: 13px; - width: 95%; - align-items: center; - user-select: none; -} - -#police-count { - background-color: #093095; -} - -#ems-count { - background-color: #950909; -} - -#doj-count { - background-color: #525252; -} - -#doc-count { - background-color: #7b25cc; -} - -#pa-count { - background-color: #008080; -} - -.active-unit-list { - margin: auto; - margin-top: 10px; - margin-bottom: 10px; - overflow: auto; - height: 35vh; - display: flex; - flex-direction: column; - width: 95%; -} - -.active-unit-item { - padding-top: 7.5px; - padding-bottom: 7.5px; - padding-right: 10px; - padding-left: 10px; - /* height: 3vh; */ - background-color: var(--color-5); - display: flex; - align-items: center; - margin-bottom: 5px; -} - -#draggedItem { - position: absolute; - z-index: 80; - -webkit-transition: opacity 0.2s ease; - -moz-transition: opacity 0.2s ease; - -ms-transition: opacity 0.2s ease; - transition: opacity 0.2s ease; - opacity: 0; - pointer-events: none; - - padding: 10px; - height: 3vh; - background-color: var(--color-5); - display: flex; - align-items: center; - margin-bottom: 5px; - width: 45vh; -} - -.unit-status { - width: fit-content; - padding: 5px; - padding-left: 15px; - padding-right: 15px; - color: white; - font-size: 12px; - font-weight: bolder; - margin: auto; - margin-left: 5px; - margin-right: 0px; - background-color: #0B9509; - border-radius: 10px; -} - -.green-status { - background-color: #099517; -} - -.yellow-status { - background-color: #958F09; -} - -.unit-job { - width: fit-content; - padding: 5px; - padding-left: 15px; - padding-right: 15px; - color: white; - font-size: 12px; - font-weight: bolder; - margin: auto; - margin-left: 5px; - margin-right: 0px; - background-color: #093095; - border-radius: 10px; -} - -.unit-police { - background-color: #093095; -} - -.unit-ems { - background-color: #950909; -} - -.unit-doc { - background-color: #7b25cc; -} - -.unit-pa { - background-color: #008080; -} - -.unit-name { - margin: auto; - margin-left: 10px; - margin-right: 0px; - font-size: 12px; - font-weight: bolder; - color: white; -} - -.unit-radio { - margin: auto; - margin-right: 5px; - font-size: 12px; - font-weight: bolder; - color: white; - background-color: var(--color-3); - padding: 5px; - padding-left: 12.5px; - padding-right: 12.5px; - border-radius: 5px; -} - -.active-calls-list { - margin: auto; - margin-top: 10px; - margin-bottom: 10px; - overflow: auto; - height: 100%; - display: flex; - flex-direction: column; - width: 95%; -} - -.active-calls-item { - height: fit-content; - background-color: var(--color-5); - display: flex; - align-items: center; - margin-bottom: 5px; - border-bottom-left-radius: 1vh; - border-top-left-radius: 1vh; -} - -.active-call-inner-container { - display: flex; - flex-direction: column; - width: 100%; - height: 100%; -} - -.red-call { - background-color: #381515; -} - -.call-item-top { - height: 50%; - width: 100%; - display: flex; - align-items: center; - margin: auto; - margin-top: .5vh; -} - -.call-number { - background-color: #950909; - color: white; - font-size: 15px; - font-weight: bolder; - padding: 2.5px; - padding-left: 10px; - padding-right: 10px; - border-radius: 10px; - width: fit-content; - margin: auto; - margin-left: .75vh; - margin-right: 0; -} - -.call-code { - background-color: #097C95; - color: white; - font-size: 15px; - font-weight: bolder; - padding: 2.5px; - padding-left: 10px; - padding-right: 10px; - border-radius: 10px; - width: fit-content; - margin: auto; - margin-left: 5px; - margin-right: 0; -} - -.call-title { - color: white; - font-size: 20px; - font-weight: bolder; - padding: 2.5px; - padding-left: 0px; - padding-right: 0px; - border-radius: 10px; - width: fit-content; - margin: auto; - margin-left: 5px; - margin-right: 0; -} - -.call-radio { - margin: auto; - margin-left: auto; - margin-right: .5vh; - font-size: 15px; - font-weight: bolder; - color: white; - background-color: var(--color-3); - padding: 5px; - padding-left: 12.5px; - padding-right: 12.5px; - border-radius: 5px; -} - -.call-item-bottom { - height: fit-content; - width: 100%; - display: flex; - flex-direction: column; - align-items: center; - margin: auto; - margin-top: 0vh; - margin-left: .75vh; - padding-bottom: .75vh; -} - -.call-bottom-info { - color: white; - font-size: 15px; - margin: auto; - margin-top: 5px; - margin-bottom: 0px; - margin-left: 0.3vh; - overflow:wrap; - white-space:normal; -} - -.dispatch-line { - background-color: rgba(128, 128, 128, 0.1); - height: 0.05vh; - width: 100%; - margin-top: 0.1vh; - margin-bottom: 0.1vh -} - -.call-bottom-info > .far { - margin-right: .1vh; -} - -.call-bottom-information { - margin-top: 0.5vh; -} - -.call-victim { - color: white; - font-size: 15px; - margin: auto; - margin-top: 5px; - margin-bottom: 0px; - margin-left: 0px; -} - -a { - text-decoration: none; -} - -.profile-container { - background-color: var(--color-1); - border: 2px solid var(--color-3); - display: flex; - flex-direction: column; - height: 74.7vh; - width: 50vh; - margin-top: 10px; - margin-left: 10px; -} - - - -.profile-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.profile-title:hover { - background-color: var(--color-3); -} - -.profile-search-input { - background-color: var(--color-3); - color: white; - padding-top: 10px; - padding-bottom: 10px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; - display: none; -} - -#profile-search-input { - outline: none; - border: none; - width: 95%; - color: white; - font-size: 15px; - background-color: rgba(0, 0, 0, 0); - margin: auto; -} - -#profile-search-input::placeholder { - color: white; -} - -.profile-items { - display: flex; - flex-direction: column; - overflow: auto; - margin: auto; - margin-top: 10px; - width: 95%; - height: 100%; - margin-bottom: 15px; -} - -.profile-item { - background-color: var(--color-5); - width: 100%; - height: 9vh; - margin: auto; - margin-bottom: 10px; - margin-top: 0px; - display: flex; - user-select: none; - -} - -.profile-item:hover { - background-color: var(--color-3); -} - -.profile-image { - width: 7vh; - height: 7vh; - margin-left: 10px; - margin-top: auto; - margin-bottom: auto; - object-fit: cover; -} - -.profile-item-title { - font-size: 16px; - font-weight: lighter; - color: white; - padding-top: 2px; -} - -.profile-tags { - display: flex; - overflow-x: auto; - width: 100%; - margin-top: 10px; - margin-bottom: 5px; -} - -.profile-tag { - margin: auto; - margin-left: 0px; - margin-right: 6px; - padding: 4px; - padding-left: 7px; - padding-right: 7px; - border-radius: 10px; - color: white; - font-size: 12px; - font-weight: bolder; - background-color: #956E09; -} - -.profile-bottom-info { - display: flex; - margin: auto; - width: 100%; -} - -.profile-id { - color: white; - font-size: 13px; -} - -.manage-profile-container { - background-color: var(--color-1); - border: 2px solid var(--color-3); - display: flex; - flex-direction: column; - height: 74.7vh; - width: 50vh; - margin-top: 10px; - margin-left: 10px; -} - -.manage-profile-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.manage-profile-editing-title { - background-color: var(--color-3); - color: white; - font-size: 15px; - font-weight: lighter; - padding-top: 10px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - margin-right: 0px; - width: 80%; - align-items: center; - user-select: none; - display: block; -} - -.manage-profile-save { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 10px; - padding-bottom: 10px; - background-color: #1b8f25; - margin: auto; - margin-left: 5px; - margin-top: 10px; - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; - display: block; -} - -.manage-profile-save:hover { - background-color: #1caa28; -} - -.manage-profile-info-container { - display: flex; - flex-direction: row; - width: 95%; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; -} - -.manage-profile-pic { - width: 45%; - object-fit: cover; -} - -.manage-profile-info-inner-container { - display: flex; - flex-direction: column; - width: 55%; -} - -.manage-profile-citizenid { - color: white; - margin-left: 10px; - font-size: 14px; - user-select: none; -} - -.manage-profile-citizenid-input { - border: none; - outline: none; - margin-left: 2.5px; - font-size: 16px; - margin-top: 2px; - color: white; - background-color: rgba(0, 0, 0, 0); -} - -.manage-cid-pic { - color: white; - font-size: 16px; - margin-left: 10px -} - -.line { - background-color: var(--color-3); - height: 2px; - margin-left: 10px; - margin-bottom: 10px; -} - -.manage-profile-name { - color: white; - margin-left: 10px; - font-size: 15px; - user-select: none; -} - -.manage-profile-name-input { - border: none; - outline: none; - margin-left: 2.5px; - font-size: 16px; - margin-top: 2px; - color: white; - background-color: rgba(0, 0, 0, 0); -} - -.manage-profile-dob { - color: white; - margin-left: 10px; - font-size: 15px; - user-select: none; -} - -.manage-profile-dob-input { - border: none; - outline: none; - margin-left: 2.5px; - font-size: 16px; - margin-top: 2px; - color: white; - background-color: rgba(0, 0, 0, 0); -} - -.manage-profile-job { - color: white; - margin-left: 10px; - font-size: 15px; - user-select: none; -} - -.manage-profile-job-input { - border: none; - outline: none; - margin-left: 2.5px; - font-size: 16px; - margin-top: 2px; - color: white; - background-color: rgba(0, 0, 0, 0); -} - -.manage-profile-url { - color: white; - margin-left: 10px; - font-size: 15px; - user-select: none; -} - -.manage-profile-url-input { - border: none; - outline: none; - margin-left: 2.5px; - font-size: 16px; - margin-top: 2px; - color: white; - background-color: rgba(0, 0, 0, 0); - width: 21.75vh; -} - -.manage-profile-info { - width: 92.5%; - margin: auto; - margin-top: 10px; - margin-bottom: 15px; - border: none; - outline: none; - height: 100%; - resize: none; - background-color: var(--color-5); - color: white; - font-size: 16px; - padding: 10px; -} - -.manage-profile-fingerprint { - width: 92.5%; - margin: auto; - margin-top: 10px; - margin-bottom: 15px; - border: none; - outline: none; - height: 8%; - resize: none; - background-color: var(--color-5); - color: white; - font-size: 16px; - padding: 10px; - line-height: 1 -} - -.manage-profile-right-container { - display: flex; - flex-direction: column; - height: 95.7%; - width: 50vh; - margin-top: 10px; - margin-left: 10px; - margin-right: 15px; -} - -.manage-profile-licenses-container { - background-color: var(--color-1); - width: 100%; - border: 2px solid var(--color-3); - height: 15%; -} - -.license-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.licenses-holder { - overflow: auto; - margin: auto; - margin-top: 10px; - width: 95%; - user-select: none; -} - -.license-tag { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: rgb(255, 255, 255); - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; -} - -.manage-profile-tags-container { - display: flex; - flex-direction: column; - background-color: var(--color-1); - width: 100%; - border: 2px solid var(--color-3); - margin-top: 10px; - min-height: 100px; - max-height: 200px; - overflow: scroll; -} - -.tags-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-right: 0px; - margin-bottom: 0px; - width: 84%; - align-items: center; - user-select: none; -} - -.tags-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7px; - padding-bottom: 7px; - margin: auto; - margin-top: 10px; - margin-left: 5px; - margin-bottom: 0px; - width: 10%; - text-align: center; -} - -.tags-add-btn:hover { - background-color: var(--color-3); -} - -.tags-holder { - overflow: auto; - margin: auto; - margin-top: 5px; - width: 95%; - user-select: none; -} - -.tag { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-top: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; -} - -span.tag-input[contenteditable]:empty::before { - content: 'Input Tag'; -} - -.tag-input { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-top: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; - outline: none; - border: none; -} - -.manage-profile-vehs-container { - display: flex; - flex-direction: column; - background-color: var(--color-1); - width: 100%; - border: 2px solid var(--color-3); - margin-top: 10px; - max-height: 150px; - overflow: scroll; -} - -.vehs-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.vehs-holder { - overflow: auto; - margin: auto; - margin-top: 10px; - width: 95%; - user-select: none; -} - -.veh-tag { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-top: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; -} - -.manage-profile-houses-container { - display: flex; - flex-direction: column; - background-color: var(--color-1); - width: 100%; - border: 2px solid var(--color-3); - margin-top: 10px; - max-height: 150px; - overflow: scroll; -} - -.houses-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.houses-holder { - overflow: auto; - margin: auto; - margin-top: 10px; - width: 95%; - user-select: none; -} - -.houses-tag { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-top: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: bolder; - background-color: white; - user-select: none; -} - -.manage-profile-gallery-container { - display: flex; - flex-direction: column; - background-color: var(--color-1); - width: 100%; - border: 2px solid var(--color-3); - margin-top: 10px; - height: 18vh; - overflow: scroll; -} - -.gallery-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-right: 0px; - margin-bottom: 0px; - width: 84%; - align-items: center; - user-select: none; -} - -.gallery-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7px; - padding-bottom: 7px; - margin: auto; - margin-top: 10px; - margin-left: 5px; - margin-bottom: 0px; - width: 10%; - text-align: center; -} - -.gallery-add-btn:hover { - background-color: var(--color-3); -} - -.gallery-inner-container { - overflow: auto; - white-space: nowrap; - margin: auto; - margin-top: 10px; - width: 95%; - user-select: none; -} - -.gallery-img { - width: 10vh; - filter: blur(5px); - object-fit: cover; -} - -.manage-convictions-container { - display: flex; - flex-direction: column; - background-color: var(--color-1); - width: 100%; - border: 2px solid var(--color-3); - margin-top: 10px; - max-height: 200px; - overflow: scroll; -} - -.convictions-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; - -} - -.convictions-holder { - overflow: auto; - margin: auto; - margin-top: 10px; - width: 95%; - user-select: none; -} - -.loader { - position: absolute; - left: 50%; - top: 50%; - z-index: 1; - width: 120px; - height: 120px; - border: 12px solid var(--color-1); - border-radius: 50%; - border-top: 12px solid var(--color-3); - -webkit-animation: spin 2s linear infinite; - animation: spin 2s linear infinite; -} - -.profile-loader { - margin-top: 5vh; - margin-left: auto; - margin-right: auto; - z-index: 1; - width: 120px; - height: 120px; - border: 12px solid var(--color-4); - border-radius: 50%; - border-top: 12px solid var(--color-3); - -webkit-animation: spin 2s linear infinite; - animation: spin 2s linear infinite; -} - -@-webkit-keyframes spin { - 0% { -webkit-transform: rotate(0deg); } - 100% { -webkit-transform: rotate(360deg); } -} - -@keyframes spin { - 0% { transform: rotate(0deg); } - 100% { transform: rotate(360deg); } -} - -.gallery-image-enlarged { - width: 40vh; - position: absolute; - top: 20%; - left: 25%; - display: none; - z-index: 999; -} - -/* Context Menu */ - -.contextmenu { - position: absolute; - width: fit-content; - padding: 2px; - margin: 0; - border: 1px solid var(--color-3); - background: var(--color-5); - z-index: 100; - border-radius: 3px; - box-shadow: 1px 1px 4px rgba(0,0,0,.2); - opacity: 0; - transform: translate(0, 15px) scale(.95); - transition: transform 0.1s ease-out, opacity 0.1s ease-out; - pointer-events: none; -} - -.contextmenu-item { - display: block; - position: relative; - margin: 0; - padding: 0; - white-space: nowrap; -} - -.contextmenu-btn { - display: block; - color: white; - font-size: 13px; - cursor: pointer; - border: 1px solid transparent; - white-space: nowrap; - padding: 6px 8px; - border-radius: 3px; -} - -.contextmenu-btn { - outline: 0 none; - text-decoration: none; -} - -.contextmenu-text { - margin-left: 5px; -} - -.contextmenu-btn .fa { - position: absolute; - left: 8px; - top: 50%; - transform: translateY(-50%); -} - -.contextmenu-item-disabled { - opacity: .5; - pointer-events: none; -} - -.contextmenu-item-disabled .contextmenu-btn { - cursor: default; -} - -.contextmenu-item-submenu::after { - content: ""; - position: absolute; - right: 6px; - top: 50%; - transform: translateY(-50%); - border: 5px solid transparent; - border-left-color: #808080; -} - -.contextmenu-item-submenu:hover::after { - border-left-color: #fff; -} - -.contextmenu-show, -.contextmenu-item:hover > .contextmenu { - opacity: 1; - transform: translate(0, 0) scale(1); - pointer-events: auto; -} - -.contextmenu-item:hover > .contextmenu { - transition-delay: 300ms; -} - -.revoke-licence:hover { - background-color: #950909; -} - -.give-licence:hover { - background-color: #099517; -} - -.remove-image:hover { - background-color: #950909; -} - -.expand-image:hover { - background-color: #099517; -} - -.gallery-upload-input { - background-color: var(--color-3); - color: white; - padding-top: 10px; - padding-bottom: 10px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; - display: none; -} - -#gallery-upload-input { - outline: none; - border: none; - width: 95%; - color: white; - font-size: 15px; - background-color: rgba(0, 0, 0, 0); - margin: auto; -} - -#gallery-upload-input::placeholder { - color: white; -} - -.penalcode-embed { - background-color: var(--color-1); - border: 2px solid var(--color-3); - display: flex; - flex-direction: column; - height: 96.5%; - width: 85%; - margin: auto; - overflow: hidden; -} - -.penalcode-embed iframe { - height: 96.5%; - width: 98%; - margin: auto; - border: none; - outline: none; -} - -.incidents-container { - background-color: var(--color-1); - border: 2px solid var(--color-3); - display: flex; - flex-direction: column; - height: 74.7vh; - width: 50vh; - margin-top: 10px; - margin-left: 10px; -} - -.incidents-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.incidents-title:hover { - background-color: var(--color-3); -} - -.incidents-search-input { - background-color: var(--color-3); - color: white; - padding-top: 10px; - padding-bottom: 10px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; - display: none; -} - -#incidents-search-input { - outline: none; - border: none; - width: 95%; - color: white; - font-size: 15px; - background-color: rgba(0, 0, 0, 0); - margin: auto; -} - -#incidents-search-input::placeholder { - color: white; -} - -.incidents-items { - display: flex; - flex-direction: column; - overflow: auto; - margin: auto; - margin-top: 10px; - width: 95%; - height: 100%; - margin-bottom: 15px; -} - -.incidents-item { - background-color: var(--color-5); - width: 100%; - height: 5.5vh; - margin: auto; - margin-bottom: 10px; - margin-top: 0px; - display: flex; - user-select: none; - flex-direction: column; -} - -.incidents-item:hover { - background-color: var(--color-3); -} - -.incidents-top-holder { - width: 100%; - height: 50%; - display: flex; - align-items: center; -} - -.incidents-item-title { - font-size: 14px; - font-weight: lighter; - color: white; - margin: auto; - margin-left: 5px; - max-width: 25vh; - margin-top: 5px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.incedent-report-name { - font-size: 14px; - font-weight: lighter; - color: white; - margin: auto; - margin-right: 5px; - margin-top: 5px; -} - -.incidents-bottom-holder { - width: 100%; - height: 50%; - display: flex; - align-items: center; - padding-top: 5px; -} - -.incedent-report-id { - font-size: 14px; - font-weight: lighter; - color: white; - margin: auto; - margin-left: 5px; - margin-bottom: 5px; -} - -.incedent-report-time-ago { - font-size: 14px; - font-weight: lighter; - color: white; - margin: auto; - margin-right: 5px; - margin-bottom: 5px; -} - -.manage-incidents-container { - background-color: var(--color-1); - border: 2px solid var(--color-3); - display: flex; - flex-direction: column; - height: 74.7vh; - max-height: 74.7vh; - width: 50vh; - margin-top: 10px; - margin-left: 10px; - overflow: auto; -} - -.manage-incidents-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - margin-right: auto; - width: 80%; - /* width: 66%; */ - align-items: center; - user-select: none; -} - -.manage-incidents-title:hover { - background-color: var(--color-3); -} - -.manage-incidents-create { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 5px; - padding-bottom: 5px; - align-items: center; - background-color: var(--color-4); - margin: auto; - margin-left: 5px; - margin-top: 10px; - /* margin-right: 0px; */ - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; - display: block; -} - -.manage-incidents-create:hover { - background-color: var(--color-3); -} - -.manage-incidents-save { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 5px; - padding-bottom: 5px; - background-color: #1b8f25; - margin: auto; - margin-left: 5px; - margin-top: 10px; - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; - display: block; -} - -.manage-incidents-save:hover { - background-color: #1caa28; -} - -.manage-incidents-title-tag { - font-size: 16px; - font-weight: lighter; - color: white; - width: 95%; - margin: auto; - text-align: left; - margin-top: 10px; - margin-bottom: 0px; -} - -.manage-incidents-title-input { - color: white; - font-weight: lighter; - width: 95%; - margin: auto; - margin-top: 5px; - margin-bottom: 0px; - align-items: center; - display: flex; - border-bottom: 2px solid var(--color-3); -} - -.manage-incidents-title-input input { - border: none; - outline: none; - margin-left: 5px; - font-size: 16px; - margin-top: 5px; - color: white; - width: 100%; - background-color: rgba(0, 0, 0, 0); -} - -.manage-incidents-reports-content { - width: 91%; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - border: none; - outline: none; - min-height: 30vh; - resize: none; - background-color: var(--color-5); - color: white; - font-size: 16px; - padding: 10px; - pointer-events: none; -} - -.manage-incidents-tags-container { - display: flex; - flex-direction: column; - border: 2px solid var(--color-3); - color: white; - font-size: 18px; - font-weight: bolder; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 94%; - height: fit-content; - align-items: center; - user-select: none; -} - -.manage-incidents-tags-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 15px; - margin-bottom: 0px; - margin-right: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.manage-incidents-tags-add-btn:hover { - background-color: var(--color-3); -} - -.manage-incidents-tags-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7.25px; - padding-bottom: 7.25px; - margin: auto; - margin-top: 15px; - margin-bottom: 0px; - margin-left: 5px; - margin-right: 0px; - width: 10%; - text-align: center; - pointer-events: none; -} - -.manage-incidents-tags-holder { - overflow: auto; - margin: auto; - margin-top: 10px; - margin-bottom: 5px; - width: 95%; - max-height: 14vh; - user-select: none; -} - -.manage-incidents-tag { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-bottom: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; -} - -.manage-incidents-officers-container { - display: flex; - flex-direction: column; - border: 2px solid var(--color-3); - color: white; - font-size: 18px; - font-weight: bolder; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 94%; - height: fit-content; - align-items: center; - user-select: none; -} - -.manage-incidents-officers-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 15px; - margin-bottom: 0px; - margin-right: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.manage-incidents-officers-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7.25px; - padding-bottom: 7.25px; - margin: auto; - margin-top: 15px; - margin-bottom: 0px; - margin-left: 5px; - margin-right: 0px; - width: 10%; - text-align: center; - pointer-events: none; -} - -.manage-incidents-officers-add-btn:hover { - background-color: var(--color-3); -} - -.manage-incidents-officers-holder { - overflow: auto; - margin: auto; - margin-top: 10px; - margin-bottom: 5px; - width: 95%; - max-height: 14vh; - user-select: none; -} - -.manage-incidents-officers { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-bottom: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; -} - -.manage-incidents-civilians-container { - display: flex; - flex-direction: column; - border: 2px solid var(--color-3); - color: white; - font-size: 18px; - font-weight: bolder; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 94%; - height: fit-content; - align-items: center; - user-select: none; -} - -.manage-incidents-civilians-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 15px; - margin-bottom: 0px; - margin-right: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.manage-incidents-civilians-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7.25px; - padding-bottom: 7.25px; - margin: auto; - margin-top: 15px; - margin-bottom: 0px; - margin-left: 5px; - margin-right: 0px; - width: 10%; - text-align: center; - pointer-events: none; -} - -.manage-incidents-civilians-add-btn:hover { - background-color: var(--color-3); -} - -.manage-incidents-civilians-holder { - overflow: auto; - margin: auto; - margin-top: 10px; - margin-bottom: 5px; - width: 95%; - max-height: 14vh; - user-select: none; -} - -.manage-incidents-civilians { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-bottom: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; -} - -.manage-incidents-evidence-container { - display: flex; - flex-direction: column; - border: 2px solid var(--color-3); - color: white; - font-size: 18px; - font-weight: bolder; - margin: auto; - margin-top: 10px; - margin-bottom: 10px; - width: 94%; - height: fit-content; - align-items: center; - user-select: none; -} - -.manage-incidents-evidence-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 15px; - margin-bottom: 0px; - margin-right: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.manage-incidents-evidence-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7.25px; - padding-bottom: 7.25px; - margin: auto; - margin-top: 15px; - margin-bottom: 0px; - margin-left: 5px; - margin-right: 0px; - width: 10%; - text-align: center; - pointer-events: none; -} - -.manage-incidents-evidence-add-btn:hover { - background-color: var(--color-3); -} - -.manage-incidents-evidence-holder { - overflow: auto; - margin: auto; - margin-top: 10px; - margin-bottom: 10px; - width: 95%; - max-height: 14vh; - user-select: none; -} - -.manage-incidents-evidence { - width: 10vh; - filter: blur(5px); -} - -span.tag-incident-input[contenteditable]:empty::before { - content: 'Input Tag'; -} - -.tag-incident-input { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-top: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; - outline: none; - border: none; -} - -span.officers-incident-input[contenteditable]:empty::before { - content: '(XXX) Officer Name'; -} - -.officers-incident-input { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-top: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; - outline: none; - border: none; -} - -span.civilians-incident-input[contenteditable]:empty::before { - content: 'Civilian Name'; -} - -.civilians-incident-input { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-top: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; - outline: none; - border: none; -} - -.associated-incidents-container { - background-color: var(--color-1); - border: 2px solid var(--color-3); - display: flex; - flex-direction: column; - height: 74.7vh; - width: 50vh; - margin-top: 10px; - margin-left: 10px; - margin-right: 10px; -} - -.associated-incidents-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.associated-incidents-title:hover { - background-color: var(--color-3); -} - -.associated-incidents-tags-container { - display: flex; - flex-direction: column; - border: 2px solid var(--color-3); - color: white; - font-size: 18px; - font-weight: bolder; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 94%; - height: fit-content; - align-items: center; - user-select: none; -} - -.associated-incidents-tags-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 15px; - margin-bottom: 0px; - margin-right: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.associated-incidents-tags-add-btn:hover { - background-color: var(--color-3); -} - -.associated-incidents-tags-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7.25px; - padding-bottom: 7.25px; - margin: auto; - margin-top: 15px; - margin-bottom: 0px; - margin-left: 5px; - margin-right: 0px; - width: 10%; - text-align: center; - pointer-events: none; -} - -.associated-incidents-tags-holder { - overflow: auto; - margin: auto; - margin-top: 10px; - margin-bottom: 10px; - width: 95%; - max-height: 14vh; - user-select: none; -} - -.associated-incidents-tag { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-bottom: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; -} - -.incidents-upload-input { - background-color: var(--color-3); - color: white; - padding-top: 10px; - padding-bottom: 10px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; - display: none; -} - -#incidents-upload-input { - outline: none; - border: none; - width: 95%; - color: white; - font-size: 15px; - background-color: rgba(0, 0, 0, 0); - margin: auto; -} - -#incidents-upload-input::placeholder { - color: white; -} - -.incidents-img { - width: 10vh; - filter: blur(5px); - object-fit: cover; -} - -.bulletin-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7px; - padding-bottom: 7px; - margin: auto; - margin-top: 10px; - margin-left: 5px; - margin-bottom: 0px; - width: 10%; - text-align: center; -} - -.bulletin-add-btn:hover { - background-color: var(--color-3); -} - -.associated-incidents-user-container { - display: flex; - flex-direction: column; - border: 2px solid var(--color-3); - color: white; - font-size: 18px; - font-weight: bolder; - margin: auto; - margin-bottom: 10px; - margin-top: 0px; - width: 94%; - height: fit-content; - align-items: center; - user-select: none; -} - -.associated-incidents-user-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 15px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.associated-incidents-user-tags-holder { - overflow: auto; - margin: auto; - margin-top: 10px; - margin-bottom: 10px; - width: 95%; - min-height: 3.5vh; - max-height: 14vh; - user-select: none; - display: flex; - background-color: var(--color-5); -} - -.associated-incidents-user-tag { - text-decoration: none; - margin-top: auto; - margin-bottom: auto; - margin-left: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: white; - font-size: 12px; - font-weight: 600; - background-color: black; - user-select: none; - width: fit-content; -} - -.associated-incidents-user-holder { - overflow: auto; - margin: auto; - margin-top: 10px; - margin-bottom: 10px; - width: 95%; - min-height: 3.5vh; - max-height: 37vh; - user-select: none; -} - -.associated-incidents-user { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-bottom: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; -} - -.associated-incidents-fine-input { - color: white; - font-weight: lighter; - width: 95%; - margin: auto; - margin-top: 5px; - margin-bottom: 0px; - align-items: center; - display: flex; - border-bottom: 2px solid var(--color-3); -} - -.associated-incidents-fine-input input { - border: none; - outline: none; - margin-left: 5px; - font-size: 16px; - margin-top: 5px; - color: white; - width: 100%; - background-color: rgba(0, 0, 0, 0); -} - -.associated-incidents-sentence-input { - color: white; - font-weight: lighter; - width: 95%; - margin: auto; - margin-top: 5px; - margin-bottom: 15px; - align-items: center; - display: flex; - border-bottom: 2px solid var(--color-3); -} - -.associated-incidents-sentence-input input { - border: none; - outline: none; - margin-left: 5px; - font-size: 16px; - margin-top: 5px; - color: white; - width: 100%; - background-color: rgba(0, 0, 0, 0); -} - -.icidents-person-search { - display: flex; - flex-direction: column; - width: 100%; - height: 100%; - margin-top: 32.5vh; -} - -.icidents-person-search-container { - background-color: var(--color-5); - width: 95vh; - height: 45vh; - margin: auto; - display: flex; - flex-direction: column; - z-index: 9999; - display: none; -} - -.icidents-person-search-title { - background-color: var(--color-4); - color: white; - font-size: 20px; - font-weight: bolder; - text-align: center; - padding-top: 15px; - padding-bottom: 15px; - width: 95%; - margin: auto; - margin-top: 15px; - margin-bottom: 0px; - user-select: none; -} - -.icidents-person-search-name-title { - width: 95%; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - color: white; - font-size: 15px; - text-align: left; - user-select: none; -} - -.icidents-person-search-name-input { - background-color: rgba(0, 0, 0, 0); - border: none; - outline: none; - color: white; - width: 100%; - margin: auto; - margin-top: 5px; - margin-bottom: 0px; - text-align: left; - padding-bottom: 2.5px; -} - -.icidents-person-search-holder { - overflow: auto; - height: 30vh; - width: 95%; - margin: auto; - margin-top: 15px; - margin-bottom: 15px; -} - -.icidents-person-search-item { - width: 100%; - height: 12.5vh; - display: flex; - flex-direction: row; -} - -.icidents-person-search-item:hover { - background-color: var(--color-3); -} - -.icidents-person-search-item-pfp { - width: 11vh; - height: 11vh; - margin-top: auto; - margin-bottom: auto; - margin-left: 10px; -} - -.icidents-person-search-item-right { - display: flex; - flex-direction: column; - width: 100%; - margin-top: auto; - margin-bottom: auto; - margin-right: 10px; - margin-left: 10px; - height: 11vh; -} - -.icidents-person-search-item-right-cid-title { - width: 100%; - margin: auto; - margin-top: 0px; - margin-bottom: 0px; - color: white; - font-size: 16px; - text-align: left; - user-select: none; -} - -.icidents-person-search-item-right-cid-input { - width: 100%; - margin: auto; - margin-top: 5px; - margin-bottom: auto; - color: white; - font-size: 16px; - text-align: left; - padding-bottom: 2.5px; - border-bottom: 2px solid var(--color-3); - user-select: none; -} - -.icidents-person-search-item-right-name-title { - width: 100%; - margin: auto; - margin-top: auto; - margin-bottom: 0px; - color: white; - font-size: 16px; - text-align: left; - user-select: none; -} - -.icidents-person-search-item-right-name-input { - width: 100%; - margin: auto; - margin-top: 5px; - margin-bottom: 0px; - color: white; - font-size: 16px; - text-align: left; - padding-bottom: 2.5px; - border-bottom: 2px solid var(--color-3); -} - -.bolos-container { - background-color: var(--color-1); - border: 2px solid var(--color-3); - display: flex; - flex-direction: column; - height: 74.7vh; - width: 50vh; - margin-top: 10px; - margin-left: 10px; -} - -.bolos-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.bolos-title:hover { - background-color: var(--color-3); -} - -.bolos-search-input { - background-color: var(--color-3); - color: white; - padding-top: 10px; - padding-bottom: 10px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; - display: none; -} - -#bolos-search-input { - outline: none; - border: none; - width: 95%; - color: white; - font-size: 15px; - background-color: rgba(0, 0, 0, 0); - margin: auto; -} - -#bolos-search-input::placeholder { - color: white; -} - -.bolos-items { - display: flex; - flex-direction: column; - overflow: auto; - margin: auto; - margin-top: 10px; - width: 95%; - height: 100%; - margin-bottom: 15px; -} - -.bolos-item { - background-color: var(--color-5); - width: 100%; - height: 5.5vh; - margin: auto; - margin-bottom: 10px; - margin-top: 0px; - display: flex; - user-select: none; - flex-direction: column; -} - -.manage-bolos-container { - background-color: var(--color-1); - border: 2px solid var(--color-3); - display: flex; - flex-direction: column; - height: 74.7vh; - max-height: 74.7vh; - width: 50vh; - margin-top: 10px; - margin-left: 10px; - overflow: auto; -} - -.manage-bolos-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - margin-right: 0px; - margin-left: 10px; - width: 66%; - /* width: 66%; */ - align-items: center; - user-select: none; -} - -.manage-bolos-title-tag { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-right: 0px; - margin-bottom: 0px; - width: 84%; - align-items: center; - user-select: none; -} - -.manage-bolos-title:hover { - background-color: var(--color-3); -} - - - -.manage-bolos-create { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 5px; - padding-bottom: 5px; - align-items: center; - background-color: var(--color-4); - margin: auto; - margin-left: 5px; - margin-top: 10px; - /* margin-right: 0px; */ - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; -} - -.manage-bolos-create:hover { - background-color: var(--color-3); -} - -.manage-bolos-input-tag { - font-size: 16px; - font-weight: lighter; - color: white; - width: 95%; - margin: auto; - text-align: left; - margin-top: 10px; - margin-bottom: 0px; -} - -.manage-bolos-input-title { - color: white; - font-weight: lighter; - width: 95%; - margin: auto; - margin-top: 5px; - margin-bottom: 0px; - align-items: center; - display: flex; - border-bottom: 2px solid var(--color-3); -} - -.manage-bolos-input-title input { - border: none; - outline: none; - margin-left: 5px; - font-size: 16px; - margin-top: 5px; - color: white; - width: 100%; - background-color: rgba(0, 0, 0, 0); -} - -.manage-bolos-input-plate { - color: white; - font-weight: lighter; - width: 95%; - margin: auto; - margin-top: 5px; - margin-bottom: 0px; - align-items: center; - display: flex; - border-bottom: 2px solid var(--color-3); -} - -.manage-bolos-input-plate input { - border: none; - outline: none; - margin-left: 5px; - font-size: 16px; - margin-top: 5px; - color: white; - width: 100%; - background-color: rgba(0, 0, 0, 0); -} - -.manage-bolos-input-owner { - color: white; - font-weight: lighter; - width: 95%; - margin: auto; - margin-top: 5px; - margin-bottom: 0px; - align-items: center; - display: flex; - border-bottom: 2px solid var(--color-3); -} - -.manage-bolos-input-owner input { - border: none; - outline: none; - margin-left: 5px; - font-size: 16px; - margin-top: 5px; - color: white; - width: 100%; - background-color: rgba(0, 0, 0, 0); -} - -.manage-bolos-input-individual { - color: white; - font-weight: lighter; - width: 95%; - margin: auto; - margin-top: 5px; - margin-bottom: 0px; - align-items: center; - display: flex; - border-bottom: 2px solid var(--color-3); -} - -.manage-bolos-input-individual input { - border: none; - outline: none; - margin-left: 5px; - font-size: 16px; - margin-top: 5px; - color: white; - width: 100%; - background-color: rgba(0, 0, 0, 0); -} - -.manage-bolos-save { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 7px; - padding-bottom: 7px; - background-color: #1b8f25; - margin: auto; - margin-left: 0px; - margin-top: 10px; - margin-right: 13px; - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; -} - -.manage-bolos-save:hover { - background-color: #1caa28; -} - -.manage-bolos-new { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 7px; - padding-bottom: 7px; - background-color: #8f1b1b; - margin: auto; - margin-left: 5px; - margin-top: 10px; - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; -} - -.manage-bolos-new:hover { - background-color: #aa1c1c; -} - -.manage-bolos-reports-content { - width: 91%; - margin: auto; - margin-top: 15px; - margin-bottom: 15px; - border: none; - outline: none; - height: 100%; - resize: none; - background-color: var(--color-5); - color: white; - font-size: 16px; - padding: 10px; -} - -.manage-bolos-right-container { - display: flex; - flex-direction: column; - height: 95.7%; - width: 50vh; - margin-top: 10px; - margin-left: 10px; - margin-right: 15px; -} - -.manage-bolos-tags-container { - display: flex; - flex-direction: column; - background-color: var(--color-1); - width: 100%; - border: 2px solid var(--color-3); - max-height: 150px; - overflow: scroll; -} - -.manage-bolos-gallery-container { - display: flex; - flex-direction: column; - background-color: var(--color-1); - width: 100%; - border: 2px solid var(--color-3); - margin-top: 10px; - height: 18vh; - overflow: scroll; -} - -.manage-bolos-tags-holder { - overflow: auto; - margin: auto; - width: 95%; - max-height: 14vh; - user-select: none; -} - -.manage-officers-tags-holder { - overflow: auto; - margin: auto; - width: 95%; - max-height: 14vh; - user-select: none; -} - -.officers-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7px; - padding-bottom: 7px; - margin: auto; - margin-top: 10px; - margin-left: 5px; - margin-bottom: 0px; - width: 10%; - text-align: center; -} - -.officers-add-btn:hover { - background-color: var(--color-3); -} - -.manage-officers-tags-container { - display: flex; - flex-direction: column; - background-color: var(--color-1); - width: 100%; - border: 2px solid var(--color-3); - max-height: 150px; - margin-top: 10px; - overflow: scroll; -} - -.bolo-item { - background-color: var(--color-5); - width: 100%; - margin: auto; - margin-bottom: 10px; - margin-top: 0px; - display: flex; - user-select: none; - flex-direction: column; -} - -.bolo-item:hover { - background-color: var(--color-3); -} - -.bolo-top-holder { - width: 100%; - height: 50%; - display: flex; - align-items: center; -} - -.bolo-item-title { - font-size: 14px; - font-weight: lighter; - color: white; - margin: auto; - margin-left: 5px; - margin-top: 5px; -} - -.bolo-report-name { - font-size: 14px; - font-weight: lighter; - color: white; - margin: auto; - margin-right: 5px; - margin-top: 5px; -} - -.bolo-bottom-holder { - width: 100%; - height: 50%; - display: flex; - align-items: center; - margin-top: 5px -} - -.bolo-report-id { - font-size: 14px; - font-weight: lighter; - color: white; - margin: auto; - margin-left: 5px; - margin-bottom: 5px; -} - -.bolo-report-time-ago { - font-size: 14px; - font-weight: lighter; - color: white; - margin: auto; - margin-right: 5px; - margin-bottom: 5px; -} - -.bolos-search-refresh { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 7px; - padding-bottom: 7px; - background-color: var(--color-10); - margin: auto; - margin-left: 5px; - margin-top: 10px; - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; -} - -.bolos-search-refresh:hover { - background-color: #aa891c; -} - -.bolos-search-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 0px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - margin-right: 0px; - width: 80%; - /* width: 66%; */ - align-items: center; - user-select: none; -} - -.bolos-search-title:hover { - background-color: var(--color-3); -} - -.manage-bolos-tags-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7px; - padding-bottom: 7px; - margin: auto; - margin-top: 10px; - margin-left: 5px; - margin-bottom: 0px; - width: 10%; - text-align: center; -} - -.manage-bolos-tags-add-btn:hover { - background-color: var(--color-3); -} - -span.tag-bolo-input[contenteditable]:empty::before { - content: 'Input Tag'; -} - -.tag-bolo-input { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-top: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; - outline: none; - border: none; -} - -span.officer-tag-bolo-input[contenteditable]:empty::before { - content: 'Input Tag'; -} - -.officer-tag-bolo-input { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-top: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; - outline: none; - border: none; -} - -.bolo-gallery-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7px; - padding-bottom: 7px; - margin: auto; - margin-top: 10px; - margin-left: 5px; - margin-bottom: 0px; - width: 10%; - text-align: center; -} - -.bolo-gallery-add-btn:hover { - background-color: var(--color-3); -} - -.bolo-gallery-upload-input { - background-color: var(--color-3); - color: white; - padding-top: 10px; - padding-bottom: 10px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; - display: none; -} - -#bolo-gallery-upload-input { - outline: none; - border: none; - width: 95%; - color: white; - font-size: 15px; - background-color: rgba(0, 0, 0, 0); - margin: auto; -} - -#bolo-gallery-upload-input::placeholder { - color: white; -} - -.bolo-img { - width: 10vh; - filter: blur(5px); - object-fit: cover; -} - -.bolo-gallery-inner-container { - overflow: auto; - margin: auto; - margin-top: 10px; - margin-bottom: 10px; - width: 95%; - max-height: 14vh; - user-select: none; -} - -.manage-bolos-editing-title { - background-color: var(--color-3); - color: white; - font-size: 15px; - font-weight: lighter; - padding-top: 10px; - padding-bottom: 10px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - margin-right: 0px; - margin-left: 10px; - width: 95%; - align-items: center; - user-select: none; -} - -.reports-container { - background-color: var(--color-1); - border: 2px solid var(--color-3); - display: flex; - flex-direction: column; - height: 74.7vh; - width: 50vh; - margin-top: 10px; - margin-left: 10px; -} - -#home-reports-container { - height: 50%; -} - -#home-warrants-container { - height: 50%; -} - -.dispatch-comms-container { - background-color: var(--color-1); - border: 2px solid var(--color-3); - display: flex; - flex-direction: column; - height: 45.5%; - width: 50vh; - margin-top: 1vh; - margin-left: 10px; -} - -.reports-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.reports-title:hover { - background-color: var(--color-3); -} - -.reports-search-input { - background-color: var(--color-3); - color: white; - padding-top: 10px; - padding-bottom: 10px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; - display: none; -} - -#reports-search-input { - outline: none; - border: none; - width: 95%; - color: white; - font-size: 15px; - background-color: rgba(0, 0, 0, 0); - margin: auto; -} - -#reports-search-input::placeholder { - color: white; -} - -.reports-items { - display: flex; - flex-direction: column; - overflow: auto; - margin: auto; - margin-top: 10px; - width: 95%; - height: 100%; - margin-bottom: 15px; -} - -.dispatch-item { - height: auto; - padding: auto; - margin-top: 1vh; -} - -.dispatch-item:hover { - background-color: var(--color-7); -} - -.dispatch-items { - display: flex; - flex-direction: column; - overflow: auto; - margin: auto; - margin-top: 10px; - width: 94%; - height: 100%; -} - -.dispatch-message-profilepic { - width: 2.8vh; - height: 2.8vh; - object-fit: cover; - float: left; - border-radius: 50%; -} - -.dispatch-item-info { - float:left; - font-size: 14px; - font-weight: bold; - padding-left: 0.75vh; - color: var(--color-8); -} - -.dispatch-info-job-lspd { - color: #2554cc; -} - -.dispatch-info-job-bcso { - color: #cc7e25; -} - -.dispatch-info-job-sast { - color: #2589cc; -} - -.dispatch-info-job-sasp { - color: #2589cc; -} - -.dispatch-info-job-doc { - color: #7b25cc; -} - -.dispatch-info-job-sapr { - color: #5acc25; -} - -.dispatch-info-job-pa { - color: #008080; -} - -.dispatch-info-job-ambulance { - color: #cc2525; -} - -.dispatch-info-job-doj { - color: #FFEAB9; -} - -.active-info-job-lspd { - background-color: #2554cc; -} - -.active-info-job-bcso { - background-color: #cc7e25; -} - -.active-info-job-sast { - background-color: #2589cc; -} - -.active-info-job-sasp { - background-color: #2589cc; -} - -.active-info-job-doc { - background-color: #7b25cc; -} - -.active-info-job-sapr { - background-color: #5acc25; -} - -.active-info-job-pa { - background-color: #008080; -} - -.active-info-job-ambulance { - background-color: #cc2525; -} - -.active-info-job-doj { - background-color: #525252; -} - -.active-info-job-unk { - background-color: #6E707C; -} - -.dispatch-item-message { - float:left; - font-size: 14px; - font-weight: lighter; - color: white; - width: 100%; - overflow:wrap; - white-space:normal; - padding-left: 0.80vh; - padding-top: 0.2vh; -} - -.dispatch-item-msg { - padding-left: 2.8vh; - padding-bottom: 0vh; -} - -.dispatch-item-msg:hover { - background-color: var(--color-7); -} - -.dispatch-item-grid { - display:grid; -} - -.dispatch-input { - min-width: 90%; - max-width: 90%; - min-height: 0.1vh; - margin-left: 1.1vh; - margin-bottom: 1vh; - border: none; - padding: 12px 20px; - background-color: var(--color-7); - color: #bebec2; -} - -.dispatch-input:focus { - outline:none!important; -} - -.reports-search-refresh { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 7px; - padding-bottom: 7px; - background-color: var(--color-10); - margin: auto; - margin-left: 5px; - margin-top: 10px; - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; -} - -.reports-search-refresh:hover { - background-color: #aa891c; -} - -.dispatch-comms-refresh { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 7px; - padding-bottom: 7px; - background-color: var(--color-10); - margin: auto; - margin-left: 5px; - margin-top: 10px; - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; -} - -.dispatch-comms-refresh:hover { - background-color: #aa891c; -} - -.reports-search-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 0px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - margin-right: 0px; - width: 80%; - /* width: 66%; */ - align-items: center; - user-select: none; -} - -.reports-search-title:hover { - background-color: var(--color-3); -} - -.manage-reports-container { - background-color: var(--color-1); - border: 2px solid var(--color-3); - display: flex; - flex-direction: column; - height: 74.7vh; - max-height: 74.7vh; - width: 50vh; - margin-top: 10px; - margin-left: 10px; - overflow: auto; -} - -.manage-reports-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - margin-right: auto; - margin-left: 10px; - width: 80%; - /* width: 66%; */ - align-items: center; - user-select: none; -} - -.manage-reports-title-tag { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-right: 0px; - margin-bottom: 0px; - width: 84%; - align-items: center; - user-select: none; -} - -.manage-reports-title:hover { - background-color: var(--color-3); -} - - - -.manage-reports-create { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 5px; - padding-bottom: 5px; - align-items: center; - background-color: var(--color-4); - margin: auto; - margin-left: 5px; - margin-top: 10px; - /* margin-right: 0px; */ - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; -} - -.manage-reports-create:hover { - background-color: var(--color-3); -} - -.manage-reports-input-tag { - font-size: 16px; - font-weight: lighter; - color: white; - width: 95%; - margin: auto; - text-align: left; - margin-top: 10px; - margin-bottom: 0px; -} - -.manage-reports-input-title { - color: white; - font-weight: lighter; - width: 95%; - margin: auto; - margin-top: 5px; - margin-bottom: 0px; - align-items: center; - display: flex; - border-bottom: 2px solid var(--color-3); -} - -.manage-reports-input-title input { - border: none; - outline: none; - margin-left: 5px; - font-size: 16px; - margin-top: 5px; - color: white; - width: 100%; - background-color: rgba(0, 0, 0, 0); -} - -.manage-reports-input-type { - color: white; - font-weight: lighter; - width: 95%; - margin: auto; - margin-top: 5px; - margin-bottom: 0px; - align-items: center; - display: flex; - border-bottom: 2px solid var(--color-3); -} - -.manage-reports-input-type input { - border: none; - outline: none; - margin-left: 5px; - font-size: 16px; - margin-top: 5px; - color: white; - width: 100%; - background-color: rgba(0, 0, 0, 0); -} - -.manage-reports-input-owner { - color: white; - font-weight: lighter; - width: 95%; - margin: auto; - margin-top: 5px; - margin-bottom: 0px; - align-items: center; - display: flex; - border-bottom: 2px solid var(--color-3); -} - -.manage-reports-input-owner input { - border: none; - outline: none; - margin-left: 5px; - font-size: 16px; - margin-top: 5px; - color: white; - width: 100%; - background-color: rgba(0, 0, 0, 0); -} - -.manage-reports-input-individual { - color: white; - font-weight: lighter; - width: 95%; - margin: auto; - margin-top: 5px; - margin-bottom: 0px; - align-items: center; - display: flex; - border-bottom: 2px solid var(--color-3); -} - -.manage-reports-input-individual input { - border: none; - outline: none; - margin-left: 5px; - font-size: 16px; - margin-top: 5px; - color: white; - width: 100%; - background-color: rgba(0, 0, 0, 0); -} - -.manage-reports-save { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 7px; - padding-bottom: 7px; - background-color: #1b8f25; - margin: auto; - margin-left: 0px; - margin-top: 10px; - margin-right: 13px; - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; - display: block; -} - -.manage-reports-save:hover { - background-color: #1caa28; -} - -.manage-reports-new { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 7px; - padding-bottom: 7px; - background-color: #8f1b1b; - margin: auto; - margin-left: 5px; - margin-top: 10px; - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; - display: block; -} - -.manage-reports-new:hover { - background-color: #aa1c1c; -} - -.incidents-remove-normal-tag:hover { - background-color: #aa1c1c; -} - -.incidents-remove-normal-civ:hover { - background-color: #aa1c1c; -} - -.incidents-remove-tag:hover { - background-color: #aa1c1c; -} - -.incidents-remove-officer-tag:hover { - background-color: #aa1c1c; -} - -.manage-reports-editing-title { - background-color: var(--color-3); - color: white; - font-size: 15px; - font-weight: lighter; - padding-top: 10px; - padding-bottom: 10px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - margin-right: 0px; - margin-left: 10px; - width: 95%; - align-items: center; - user-select: none; - display: block; -} - -.manage-reports-reports-content { - width: 91%; - margin: auto; - margin-top: 15px; - margin-bottom: 15px; - border: none; - outline: none; - height: 100%; - resize: none; - background-color: var(--color-5); - color: white; - font-size: 16px; - padding: 10px; -} - -.manage-reports-right-container { - display: flex; - flex-direction: column; - height: 95.7%; - width: 50vh; - margin-top: 10px; - margin-left: 10px; - margin-right: 15px; -} - -.manage-reports-tags-container { - display: flex; - flex-direction: column; - background-color: var(--color-1); - width: 100%; - border: 2px solid var(--color-3); - max-height: 150px; - overflow: scroll; -} - -.manage-reports-gallery-container { - display: flex; - flex-direction: column; - background-color: var(--color-1); - width: 100%; - border: 2px solid var(--color-3); - margin-top: 10px; - height: 18vh; - overflow: scroll; -} - -.manage-reports-tags-holder { - overflow: auto; - margin: auto; - width: 95%; - max-height: 14vh; - user-select: none; -} - -.reports-officers-tags-holder { - overflow: auto; - margin: auto; - width: 95%; - max-height: 14vh; - user-select: none; -} - -.reports-officers-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7px; - padding-bottom: 7px; - margin: auto; - margin-top: 10px; - margin-left: 5px; - margin-bottom: 0px; - width: 10%; - text-align: center; -} - -.reports-officers-add-btn:hover { - background-color: var(--color-3); -} - -.reports-officers-tags-container { - display: flex; - flex-direction: column; - background-color: var(--color-1); - width: 100%; - border: 2px solid var(--color-3); - max-height: 150px; - margin-top: 10px; - overflow: scroll; -} - -.reports-gallery-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7px; - padding-bottom: 7px; - margin: auto; - margin-top: 10px; - margin-left: 5px; - margin-bottom: 0px; - width: 10%; - text-align: center; -} - -.reports-gallery-add-btn:hover { - background-color: var(--color-3); -} - -.reports-gallery-upload-input { - background-color: var(--color-3); - color: white; - padding-top: 10px; - padding-bottom: 10px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; - display: none; -} - -#reports-gallery-upload-input { - outline: none; - border: none; - width: 95%; - color: white; - font-size: 15px; - background-color: rgba(0, 0, 0, 0); - margin: auto; -} - -#reports-gallery-upload-input::placeholder { - color: white; -} - -.reports-img { - width: 10vh; - filter: blur(5px); - object-fit: cover; -} - -.reports-gallery-inner-container { - overflow: auto; - margin: auto; - margin-top: 10px; - margin-bottom: 10px; - width: 95%; - max-height: 14vh; - user-select: none; -} - -.manage-reports-tags-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7px; - padding-bottom: 7px; - margin: auto; - margin-top: 10px; - margin-left: 5px; - margin-bottom: 0px; - width: 10%; - text-align: center; -} - -.manage-reports-tags-add-btn:hover { - background-color: var(--color-3); -} - -.reports-civilians-tags-container { - display: flex; - flex-direction: column; - background-color: var(--color-1); - width: 100%; - border: 2px solid var(--color-3); - max-height: 150px; - margin-top: 10px; - overflow: scroll; -} - -.reports-civilians-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7px; - padding-bottom: 7px; - margin: auto; - margin-top: 10px; - margin-left: 5px; - margin-bottom: 0px; - width: 10%; - text-align: center; -} - -.reports-civilians-add-btn:hover { - background-color: var(--color-3); -} - -.reports-civilians-tags-holder { - overflow: auto; - margin: auto; - width: 95%; - max-height: 14vh; - user-select: none; -} - -.reports-item { - background-color: var(--color-5); - width: 100%; - margin: auto; - margin-bottom: 10px; - margin-top: 0px; - display: flex; - user-select: none; - flex-direction: column; -} - -.reports-item:hover { - background-color: var(--color-3); -} - -.reports-top-holder { - width: 100%; - height: 50%; - display: flex; - align-items: center; -} - -.reports-item-title { - font-size: 14px; - font-weight: lighter; - color: white; - margin: auto; - margin-left: 5px; - margin-top: 5px; - max-width: 25vh; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.reports-report-name { - font-size: 14px; - font-weight: lighter; - color: white; - margin: auto; - margin-right: 5px; - margin-top: 5px -} - -.reports-bottom-holder { - width: 100%; - height: 50%; - display: flex; - align-items: center; - margin-top: 5px; -} - -.reports-report-id { - font-size: 14px; - font-weight: lighter; - color: white; - margin: auto; - margin-left: 5px; - margin-bottom: 5px; -} - -.reports-report-time-ago { - font-size: 14px; - font-weight: lighter; - color: white; - margin: auto; - margin-right: 5px; - margin-bottom: 5px; -} - -span.tag-reports-input[contenteditable]:empty::before { - content: 'Input Tag'; -} - -.tag-reports-input { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-top: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; - outline: none; - border: none; -} - -span.officer-tag-reports-input[contenteditable]:empty::before { - content: 'Input Tag'; -} - -.officer-tag-reports-input { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-top: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; - outline: none; - border: none; -} - -span.civilian-tag-reports-input[contenteditable]:empty::before { - content: 'Input Tag'; -} - -.civilian-tag-reports-input { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-top: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; - outline: none; - border: none; -} - -.dmv-container { - background-color: var(--color-1); - border: 2px solid var(--color-3); - display: flex; - flex-direction: column; - height: 74.7vh; - width: 50%; - margin-top: 10px; - margin-left: 10px; -} - -.dmv-search-refresh { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 7px; - padding-bottom: 7px; - background-color: var(--color-10); - margin: auto; - margin-left: 5px; - margin-top: 10px; - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; -} - -.dmv-search-refresh:hover { - background-color: #aa891c; -} - -.dmv-search-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.dmv-search-title:hover { - background-color: var(--color-3); -} - -.dmv-search-input { - background-color: var(--color-3); - color: white; - padding-top: 10px; - padding-bottom: 10px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; - display: none; -} - -#dmv-search-input { - outline: none; - border: none; - width: 95%; - color: white; - font-size: 15px; - background-color: rgba(0, 0, 0, 0); - margin: auto; -} - -#dmv-search-input::placeholder { - color: white; -} - -.dmv-items { - display: flex; - flex-direction: column; - overflow: auto; - margin: auto; - margin-top: 10px; - width: 95%; - height: 100%; - margin-bottom: 15px; -} - -.vehicle-information-container { - background-color: var(--color-1); - border: 2px solid var(--color-3); - display: flex; - flex-direction: column; - height: 74.7vh; - width: 50%; - margin-top: 10px; - margin-left: 10px; - margin-right: 10px; -} - -.vehicle-information-save { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 7px; - padding-bottom: 7px; - background-color: #1b8f25; - margin: auto; - margin-left: 5px; - margin-top: 10px; - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; - display: block; -} - -.vehicle-information-save:hover { - background-color: #1caa28; -} - -.add-charge:hover { - background-color: #1caa28; -} - -.vehicle-information-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 0px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - margin-right: 0px; - width: 81%; - /* width: 66%; */ - align-items: center; - user-select: none; -} - -.dmv-item { - background-color: var(--color-5); - width: 100%; - height: 9vh; - margin: auto; - margin-bottom: 10px; - margin-top: 0px; - display: flex; - user-select: none; - -} - -.dmv-item:hover { - background-color: var(--color-3); -} - -.dmv-image { - width: 7vh; - height: 7vh; - margin-left: 10px; - margin-top: auto; - margin-bottom: auto; - object-fit: cover; -} - -.dmv-item-title { - font-size: 16px; - font-weight: lighter; - color: white; - padding-top: 2px; -} - -.dmv-tags { - display: flex; - overflow-x: auto; - width: 98%; - margin-top: 10px; - margin-bottom: 5px; -} - -.dmv-tag { - margin: auto; - margin-left: 0px; - margin-right: 6px; - padding: 4px; - padding-left: 7px; - padding-right: 7px; - border-radius: 10px; - color: white; - font-size: 12px; - font-weight: bolder; - background-color: #956E09; -} - -.dmv-bottom-info { - display: flex; - margin: auto; - width: 100%; -} - -.dmv-id { - color: white; - font-size: 13px; -} - -.vehicle-info-stuff { - display: flex; - flex-direction: row; - width: 95%; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; -} - -.vehicle-info-image { - width: 444px; - height: 269px; - object-fit: cover; -} - -.vehicle-info-inner-container { - display: flex; - flex-direction: column; - width: 55%; -} - -.vehicle-info-plate { - color: white; - margin-left: 10px; - font-size: 15px; - user-select: none; -} - -.vehicle-info-plate-input { - border: none; - outline: none; - margin-left: 2.5px; - font-size: 16px; - margin-top: 5px; - color: white; - background-color: rgba(0, 0, 0, 0); -} - -.vehicle-info-owner { - color: white; - margin-left: 10px; - font-size: 15px; - user-select: none; -} - -.vehicle-info-owner-input { - border: none; - outline: none; - margin-left: 2.5px; - font-size: 16px; - margin-top: 5px; - color: white; - background-color: rgba(0, 0, 0, 0); -} - -.vehicle-info-class { - color: white; - margin-left: 10px; - font-size: 15px; - user-select: none; -} - -.vehicle-info-class-input { - border: none; - outline: none; - margin-left: 2.5px; - font-size: 16px; - margin-top: 5px; - color: white; - background-color: rgba(0, 0, 0, 0); -} - -.vehicle-info-model { - color: white; - margin-left: 10px; - font-size: 15px; - user-select: none; -} - -.vehicle-info-model-input { - border: none; - outline: none; - margin-left: 2.5px; - font-size: 16px; - margin-top: 5px; - color: white; - background-color: rgba(0, 0, 0, 0); -} - -.vehicle-info-imageurl { - color: white; - margin-left: 10px; - font-size: 15px; - user-select: none; -} - -.vehicle-info-imageurl-input { - border: none; - outline: none; - margin-left: 2.5px; - font-size: 16px; - margin-top: 5px; - color: white; - background-color: rgba(0, 0, 0, 0); -} - -.vehicle-info-icon { - color: white; - font-size: 16px; - margin-left: 10px -} - -.vehicle-info-line { - background-color: var(--color-3); - height: 2px; - margin-left: 10px; - margin-bottom: 10px; -} - -.vehicle-info-tags-container { - display: flex; - flex-direction: column; - border: 2px solid var(--color-3); - color: white; - font-size: 18px; - font-weight: bolder; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - height: fit-content; - align-items: center; - user-select: none; -} - -.vehicle-info-tags-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 5px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - width: 95%; - align-items: center; - user-select: none; -} - -.vehicle-info-tags-add-btn:hover { - background-color: var(--color-3); -} - -.vehicle-info-tags-add-btn { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 7.25px; - padding-bottom: 7.25px; - margin: auto; - margin-top: 15px; - margin-bottom: 0px; - margin-left: 5px; - margin-right: 0px; - width: 10%; - text-align: center; -} - -.vehicle-info-tags-holder { - overflow: auto; - margin: auto; - margin-top: 7px; - margin-bottom: 7px; - width: 95%; - max-height: 14vh; - user-select: none; -} - -.vehicle-info-tag { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-bottom: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; -} - -.vehicle-info-content { - width: 93%; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - border: none; - outline: none; - min-height: 30.9vh; - resize: none; - background-color: var(--color-5); - color: white; - font-size: 16px; - padding: 10px; -} - -.vehicle-tags { - display: flex; - overflow-x: auto; - width: 98%; - margin-top: 5px; - margin-bottom: 5px; -} - -.vehicle-tag { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - padding: 4px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: white; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; - outline: none; - border: none; -} - -.stafflogs-container { - background-color: var(--color-1); - border: 2px solid var(--color-3); - display: flex; - flex-direction: column; - height: 74.7vh; - width: 100%; - margin-top: 10px; - margin-left: 10px; - margin-right: 10px; - overflow: auto; -} - -.stafflogs-container > p { - color: white; - font-size: 1.3vh; - padding-left: 1vh; -} - -/* Vehicle Colors :( so long lol */ - -.black-color { - background-color: #0e0e0e; - color: white; -} - -.darksilver-color { - background-color: #333333; - color: white; -} - -.silver-color { - background-color: #333333; - color: white; -} - -.bluesilver-color { background-color: #c4d4e0; } - -.matteblack-color { - background-color: #141414; - color: white; -} - -.gray-color { - background-color: #808080; - color: white; -} - -.lightgray-color { background-color: #D3D3D3; } -.utilgunmetal-color { background-color: #39434d; } -.red-color { background-color: #c00e1a; } -.torinored-color { background-color: #da1918; } -.formulared-color { background-color: #b6111b; } -.blazered-color { background-color: #a51e23; } -.gracefulred-color { background-color: #7b1a22; } -.garnetred-color { background-color: #8e1b1f; } -.desertred-color { background-color: #6f1818; } -.cabernetred-color { background-color: #49111d; } -.candyred-color { background-color: #b60f25; } -.orange-color { background-color: #f78616; } -.gold-color { background-color: #c2944f; } -.mattedarkred-color { background-color: #732021; } -.matteyellow-color { background-color: #ffc91f; color: black } -.brightred-color { background-color: #de0f18; } -.darkgreen-color { background-color: #132428; } -.racingreen-color { background-color: #122e2b; } -.seagreen-color { background-color: #12383c; } -.olivegreen-color { background-color: #31423f; } -.green-color { background-color: #155c2d; } -.gasolinebluegreen-color { background-color: #1b6770; } -.mattelimegreen-color { background-color: #66b81f; } -.seawash-color { background-color: #65867f; } -.midnightblue-color { background-color: #222e46; } -.darkblue-color { background-color: #233155; } -.saxonyblue-color { background-color: #304c7e; } -.blue-color { background-color: #345df3; } -.diamondblue-color { background-color: #d6e7f1; } -.brightblue-color { background-color: #0b9cf1; } -.purpleblue-color { background-color: #2f2d52; } -.ultrablue-color { background-color: #2354a1; } -.lightningblue-color { background-color: #2446a8; } -.mattedarkblue-color { background-color: #1f2852; } -.matteblue-color { background-color: #253aa7; } -.yellow-color { background-color: #fbe212; color: black } -.bronze-color { background-color: #916532; } -.lime-color { background-color: #98d223; } -.champagne-color { background-color: #9b8c78; } -.beige-color { background-color: #F5F5DC; } -.darkivory-color { background-color: #473f2b; } -.brown-color { background-color: #3a2a1b; } -.lightbrown-color { background-color: #b5a079; } -.beechwood-color { background-color: #a4965f; } -.chocoorange-color { background-color: #752b19; } -.cream-color { background-color: #f7edd5; } -.white-color { background-color: #f0f0f0; color: black } -.steel-color { background-color: #6a747c; } -.blacksteel-color { background-color: #354158; } -.aluminium-color { background-color: #9ba0a8; } -.chrome-color { background-color: #5870a1; } -.wornwhite-color { background-color: #eae6de; color: black } -.offwhite-color { background-color: #dfddd0; color: black } -.lightorange-color { background-color: #f9a458; } -.pink-color { background-color: #f21f99; } -.blackblue-color { background-color: #0a0c17; } -.blackpurple-color { background-color: #0c0d18; } -.blackred-color { background-color: #0e0d14; } -.darkpurple-color { background-color: #621276; } -.olivedrab-color { background-color: #696748; } -.tan-color { background-color: #c3b492; } - -.reports-remove-image:hover { - background-color: #950909; -} - -.bolo-remove-image:hover { - background-color: #950909; -} - -.bolo-delete:hover { - background-color: #950909; -} - -.remove-bulletin:hover { - background-color: #950909; -} - -.search-vehicle:hover { - background-color: #956E09; -} - -.mark-code-5:hover { - background-color: #0B9509; -} - -.remove-code-5:hover { - background-color: #950909; -} - -.mark-stolen:hover { - background-color: #0B9509; -} - -.remove-stolen:hover { - background-color: #950909; -} - -.toggle-duty:hover { - background-color: #956E09; -} - -.set-callsign:hover { - background-color: #0B9509; -} - -.set-radio:hover { - background-color: #09956b; -} - -.incidents-ghost-holder { - overflow: auto; - max-height: 80vh; - margin-top: 10px; - margin-bottom: 10px; -} - -.incidents-charges-table { - display: flex; - flex-direction: column; - width: 100%; - height: 100%; - margin: auto; - margin-top: -25vh; -} - -.incidents-charges-table-container { - background-color: var(--color-5); - width: 155vh; - height: 85vh; - margin: auto; - display: flex; - flex-direction: column; - z-index: 9999; - user-select: none; -} - -.incidents-charges-title-container { - width: 95%; - height: 11vh; - background-color: var(--color-4); - margin: auto; - margin-top: 1.5vh; - margin-bottom: 0vh; - display: flex; - flex-direction: column; - border: 2px solid var(--color-4); -} - -.incidents-charges-title { - color: white; - margin: auto; - text-align: center; - align-items: center; - font-size: 22px; - font-weight: bolder; - margin-top: 1vh; -} - -.incidents-charges-title span { - color: #B4A684; - font-size: 19px; -} - -.incidents-charges-title-description { - color: white; - margin: auto; - background-color: var(--color-5); - text-align: left; - font-size: 17px; - padding: .5vh; - width: 97%; - margin-bottom: 1.5vh; -} - -.manage-incidents-editing-title { - background-color: var(--color-3); - color: white; - font-size: 15px; - font-weight: lighter; - padding-top: 10px; - padding-bottom: 10px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - margin-right: 0px; - margin-left: 10px; - width: 95%; - align-items: center; - user-select: none; -} - - -.current-charges-container { - width: 95%; - border: 2px solid var(--color-4); - margin: auto; - margin-top: 1.5vh; - margin-bottom: 0vh; - display: flex; -} - -.current-charges-inner-container { - background-color: var(--color-4); - width: 35vh; - height: fit-content; - margin: auto; - margin-left: 1vh; - margin-right: 0vh; - text-align: center; - display: flex; -} - -.current-charges-title { - color: white; - font-size: 19px; - font-weight: bolder; - padding: .25vh; - padding-left: 6vh; - padding-right: 6vh; - margin: auto; -} - -#current-charges-holder { - display: flex; - margin: auto; - width: 110vh; - margin-left: 1vh; - margin-right: 1vh; - overflow: hidden; -} - -.current-charges-tag { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - padding: 5px; - padding-left: 7px; - padding-right: 7px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; - background-color: white; - color: black; - white-space: nowrap; -} - -.offenses-title-container { - width: fit-content; - height: fit-content; - background-color: var(--color-4); - margin-left: 3.75vh; - margin-top: 1.5vh; - margin-bottom: 0vh; - display: flex; - border: 2px solid var(--color-4); -} - -.offenses-title { - color: white; - padding: .7vh; - padding-right: 3vh; - font-weight: bolder; - font-size: 1.4vh; -} - -.offenses-prepend-holder { - width: 95%; - background-color: var(--color-4); - margin: auto; - margin-top: 1.5vh; - margin-bottom: 0vh; - border: 2px solid var(--color-4); - display: grid; - grid-template-columns: auto auto auto auto; - grid-template-rows: auto auto auto auto; - row-gap: 0vh; - overflow: auto; -} - -.offense-item { - background-color: #0B9509; - border: 1.5px solid black; - height: 5.0vh; - margin: .5vh; - flex-direction: column; - color: white; - display: inline-block; - overflow: auto; - transition: all 0.15s ease-in-out; -} - -.offense-item:hover { - transform: scale(1.02); - transition: all 0.15s ease-in-out; -} - -.offense-item-offense { - margin: auto; - margin-left: .5vh; - margin-top: .5vh; - color: white; - font-size: 1.2vh; - font-weight: bold; -} - -.offfense-item-name { - margin: auto; - margin-right: .5vh; - margin-top: .5vh; - color: white; - font-size: 1.2vh; - font-weight: bold; -} - -.offense-item-id { - margin: auto; - margin-left: .5vh; - margin-bottom: .5vh; - color: white; - font-size: 1.2vh; - font-weight: bold; -} - -.offfense-item-months { - margin: auto; - margin-right: .5vh; - margin-bottom: .5vh; - color: white; - font-size: 1.2vh; - font-weight: bold; -} - -.offenses-main-container { - overflow: auto; - margin: auto; - margin-top: 1vh; - margin-bottom: 1vh; - width: 100%; -} - -.callsign-container { - display: flex; - flex-direction: column; - width: 100%; - height: 100%; - margin-top: 40.5vh; -} - -.radio-container { - display: flex; - flex-direction: column; - width: 100%; - height: 100%; - margin-top: 40.5vh; -} - -.radio-inner-container { - background-color: var(--color-5); - width: 30vh; - height: 17.5vh; - margin: auto; - display: flex; - flex-direction: column; - z-index: 9999; - border: .45vh solid white; -} - -.radio-title { - color: white; - font-size: 2vh; - font-weight: bold; - margin: auto; - margin-top: 2vh; - margin-bottom: 0vh; -} - -.radio-input { - width: 20vh; - margin: auto; - margin-top: 1.5vh; - margin-bottom: 0vh; - background-color: var(--color-6); - border: none; - outline: none; - font-size: 2vh; - color: white; - text-align: center; - padding: 1vh; -} - -.radio-buttons { - width: 20vh; - margin: auto; - margin-top: 1.5vh; - display: flex; - flex-direction: row; -} - -.radio-cancel { - color: white; - padding: .5vh; - padding-left: 1vh; - padding-right: 1vh; - background-color: #D77A0D; - border-radius: 1vh; - margin: auto; - user-select: none; -} - -.radio-cancel:hover { - background-color: #f18f1e; -} - -.radio-submit { - color: white; - padding: .5vh; - padding-left: 1vh; - padding-right: 1vh; - background-color: #0B9509; - border-radius: 1vh; - margin: auto; - user-select: none; -} - -.radio-submit:hover { - background-color: #15ac12; -} - -.callsign-inner-container { - background-color: var(--color-5); - width: 30vh; - height: 17.5vh; - margin: auto; - display: flex; - flex-direction: column; - z-index: 9999; - border: .45vh solid white; -} - -.callsign-title { - color: white; - font-size: 2vh; - font-weight: bold; - margin: auto; - margin-top: 2vh; - margin-bottom: 0vh; -} - -.callsign-input { - width: 20vh; - margin: auto; - margin-top: 1.5vh; - margin-bottom: 0vh; - background-color: var(--color-6); - border: none; - outline: none; - font-size: 2vh; - color: white; - text-align: center; - padding: 1vh; -} - -.callsign-buttons { - width: 20vh; - margin: auto; - margin-top: 1.5vh; - display: flex; - flex-direction: row; -} - -.callsign-cancel { - color: white; - padding: .5vh; - padding-left: 1vh; - padding-right: 1vh; - background-color: #D77A0D; - border-radius: 1vh; - margin: auto; - user-select: none; -} - -.callsign-cancel:hover { - background-color: #f18f1e; -} - -.callsign-submit { - color: white; - padding: .5vh; - padding-left: 1vh; - padding-right: 1vh; - background-color: #0B9509; - border-radius: 1vh; - margin: auto; - user-select: none; -} - -.callsign-submit:hover { - background-color: #15ac12; -} - - -/* Keep At Bottom */ - -.red-tag { - background-color: #950909; -} - -.orange-tag { - background-color: #956E09; -} - -.green-tag { - background-color: #0B9509; -} - -.white-tag { - display: inline-block; - text-decoration: none; - margin: auto; - margin-left: 0px; - margin-right: 10px; - margin-bottom: 6px; - padding: 7px; - padding-left: 8px; - padding-right: 8px; - border-radius: 10px; - color: black; - font-size: 12px; - font-weight: 600; - background-color: white; - user-select: none; - width: fit-content; - background-color: white; - color: black; -} - -.orange-penis-code { - background-color: #D77A0D; -} - -.green-penis-code { - background-color: #0B9509; -} - -.red-penis-code { - background-color: #950909; -} - -.header-pin { - padding-right: 5px; -} - -.priority-1 { - background-color: #bb0404; -} - -.priority-2 { - background-color: #ce7808; -} - -.call-bottom-info > span { - padding-right: 0.5vh; -} - -.call-attach:hover { - background-color: #1caa28; -} - -.Set-Waypoint:hover { - background-color: #f18f1e; -} - -.call-detach:hover { - background-color: #950909; -} - -.remove-blip:hover { - background-color: #950909; -} - -.dispatch-attached-units { - display: flex; - flex-direction: column; - width: 100%; - height: 100%; -} - -.active-unit-item:hover { - background-color: var(--color-3); -} - -.active-calls-item:hover { - background-color: var(--color-3); -} - -.dispatch-attached-units-container { - background-color: var(--color-1); - width: 92vh; - height: 46vh; - margin: auto; - display: flex; - flex-direction: column; - z-index: 1; - border: 2px solid #FFFFFF; - display: none; - margin-top: 32.5vh; -} - -.dispatch-attached-units-title { - background-color: var(--color-4); - color: white; - font-size: 20px; - font-weight: bolder; - text-align: center; - padding-top: 15px; - padding-bottom: 15px; - width: 95%; - margin: auto; - margin-top: 15px; - margin-bottom: 0px; - user-select: none; -} - -.dispatch-attached-units-holder { - margin: auto; - margin-top: 10px; - margin-bottom: 10px; - overflow: auto; - height: 37.8vh; - display: flex; - flex-direction: column; - width: 95%; -} - -.dispatch-attached-unit-item { - padding: 10px; - height: 3vh; - background-color: var(--color-5); - display: flex; - align-items: center; - margin-bottom: 5px; -} - -.attached-units:hover { - background-color: rgb(156, 156, 156); -} - -.Set-Dispatch-Waypoint:hover { - background-color: #f18f1e; -} - -.call-dispatch-detach:hover { - background-color: #950909; -} - -.incidents-title { - background-color: var(--color-4); - color: white; - font-size: 18px; - font-weight: bolder; - padding-top: 5px; - padding-bottom: 0px; - text-align: center; - margin: auto; - margin-top: 10px; - margin-bottom: 0px; - margin-right: 0px; - width: 80%; - /* width: 66%; */ - align-items: center; - user-select: none; -} - -.incidents-title:hover { - background-color: var(--color-3); -} - -.incidents-search-refresh { - width: 13.7%; - font-size: 15px; - font-weight: lighter; - padding-top: 7px; - padding-bottom: 7px; - background-color: var(--color-10); - margin: auto; - margin-left: 5px; - margin-top: 10px; - margin-bottom: 0px; - color: white; - text-align: center; - user-select: none; -} - -.incidents-search-refresh:hover { - background-color: #aa891c; -} - -.respond-calls { - display: flex; - flex-direction: column; - width: 100%; - height: 100%; - margin-top: 32.5vh; -} - -.respond-calls-container { - background-color: var(--color-5); - width: 70vh; - min-height: 30vh; - max-height: 40vh; - margin: auto; - display: flex; - flex-direction: column; - z-index: 9999; - overflow: auto; -} - -.respond-calls-title { - background-color: var(--color-4); - color: white; - font-size: 20px; - font-weight: bolder; - text-align: center; - padding-top: 15px; - padding-bottom: 15px; - width: 95%; - margin: auto; - margin-top: 15px; - margin-bottom: 0px; - user-select: none; -} - -.respond-calls-input { - width: 92.5%; - margin-top: 10px; - margin-bottom: 10px; - outline: solid 3px #1B3047; - margin-left: 27px; - min-height: 21.5vh; - max-height: 21.5vh; - border: none; - padding: 10px 10px; - background-color: transparent; - color: #dadada; - resize: none; - font-size: 16px; -} - -.respond-calls-input:focus { - outline: solid 3px #1B3047; -} - -.respond-calls-responses { - width: 95%; - margin-left: 1.7vh -} - -.respond-calls-response { - color: #dadada; - margin-top: 0.5vh; - padding: 0.5vh; - background-color: rgba(32, 32, 32, 0.5); - color: #FFFFFF; -} - -.offenses-search-area { - width: 95%; - border: 2px solid var(--color-4); - height: 3vh; - margin: 1.5vh auto 0vh; - display: flex; -} - -.offenses-search { - background: transparent; - border: none; - outline: none; - font-size: 1.2vh; - color: rgb(255, 255, 255); - font-family: Roboto, sans-serif; - font-style: normal; - font-weight: normal; - margin-left: 1vh; - padding-top: 10px; - padding-bottom: 10px; -} - -.impound-form { - display: flex; - flex-direction: column; - - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - - width: 750px; - height: 375px; - background: var(--color-5); - border: 1px solid white; -} - -.impound-form > form { - position: absolute; - left: 10%; - width: 73%; - height: 100%; -} - -.impound-form > form > input { - border: none; - outline: none; - font-size: 24px; - color: white; - - background: transparent; - border: 1px solid rgb(168, 168, 168); - - width: 100%; - height: 13.5%; - - margin-top: 20px; - padding-left: 10%; -} - -.impound-form > form > i { - position: absolute; - color: white; - font-size: 24px; - margin-top: 37.5px; - margin-left: 12.6px; -} - -.impound-buttons { - position: absolute; - margin: auto; - display: flex; - flex-direction: row; - bottom: 6%; - left: 10%; -} - -.impound-cancel { - color: white; - padding: .5vh; - padding-left: 1vh; - padding-right: 1vh; - background-color: #D77A0D; - border-radius: 1vh; - margin: auto; - user-select: none; -} - -.impound-cancel:hover { - background-color: #f18f1e; -} - -.impound-submit { - color: white; - padding: .5vh; - padding-left: 1vh; - padding-right: 1vh; - background-color: #0B9509; - border-radius: 1vh; - margin: auto; - user-select: none; - margin-left: 10px; -} - -.impound-submit:hover { - background-color: #15ac12; -} - -.status-impound:hover { - background-color: #ac8312; -} - -.remove-impound:hover { - background-color: #ac1212; -} - -.impound-vehicle:hover { - background-color: #12ac1f; -} - -.impound-fee { - color: white; -} - -.dispatch-reply:hover { - background-color: var(--color-1); -} -.display_hidden{ - display: none; -} - -.cams-page-container { - background-color: var(--color-9); - border-radius: 15px; - position: absolute; - width: 96.5%; - height: 96.5%; - left: 2.0%; - top: 1.5%; - display: none; - overflow: auto -} - -.cams-container { - background-color: var(--color-1); - border: 2px solid var(--color-3); - display: flex; - flex-direction: column; - height: 74.7vh; - width: 100%; - margin-top: 10px; - margin-left: 10px; - margin-right: 10px; - overflow: auto; -} - -.cams-item { - display: grid; - grid-template-columns: 1fr 1fr 1fr 1fr 1fr; - grid-auto-flow: row; - gap: 15px 15px; - overflow: auto; - margin-bottom: 10px; - - -} - -.cams-items { - background-color: var(--color-5); - height: auto; - padding: 10px; - text-align: center; - margin: 10px; - color: white; - font-size: 20px; - color: white; - overflow: visible; - -} - -.cams-image { - height:125px; - width: auto; - margin: 10px; - -} - -.cams-items:hover { - background-color: var(--color-3); -} +@import url('https://fonts.googleapis.com/css?family=Montserrat'); + +:root { + --color-1: #1E3955; + --color-2: #213F5F; + --color-3: #2C537B; + --color-4: #23405E; + --color-5: #152638; + --color-6: #121f2c; + --color-7: rgb(28, 54, 82); + --color-8: #2554cc; + --color-9: #6E707C; + --color-10: #8f741b; +} + +body { + font-family: 'Montserrat', sans-serif; + overflow: hidden; + display: none; +} + +textarea { + font-family: 'Montserrat', sans-serif; +} + +::-webkit-scrollbar { + width: 0px; +} + +input::-webkit-outer-spin-button, +input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; +} + +.dashboard-page-container { + background-color: var(--color-9); + border-radius: 15px; + position: absolute; + width: 96.5%; + height: 96.5%; + left: 2.0%; + top: 1.5%; + display: none; +} + +.badge-logo { + margin-left: 1vh; + width: 12vh; + height: 12vh; +} + +.profile-page-container { + background-color: var(--color-9); + border-radius: 15px; + position: absolute; + width: 96.5%; + height: 96.5%; + left: 2.0%; + top: 1.5%; + display: none; +} + +.incidents-page-container { + background-color: var(--color-9); + border-radius: 15px; + position: absolute; + width: 96.5%; + height: 96.5%; + left: 2.0%; + top: 1.5%; + display: none; +} + +.bolos-page-container { + background-color: var(--color-9); + border-radius: 15px; + position: absolute; + width: 96.5%; + height: 96.5%; + left: 2.0%; + top: 1.5%; + display: none; +} + +.reports-page-container { + background-color: var(--color-9); + border-radius: 15px; + position: absolute; + width: 96.5%; + height: 96.5%; + left: 2.0%; + top: 1.5%; + display: none; +} + +.penalcode-page-container { + background-color: var(--color-9); + border-radius: 15px; + position: absolute; + width: 96.5%; + height: 96.5%; + left: 2.0%; + top: 1.5%; + display: none; +} + +.sop-page-container { + background-color: var(--color-9); + border-radius: 15px; + position: absolute; + width: 96.5%; + height: 96.5%; + left: 2.0%; + top: 1.5%; + display: none; +} + +.dmv-page-container { + background-color: var(--color-9); + border-radius: 15px; + position: absolute; + width: 96.5%; + height: 96.5%; + left: 2.0%; + top: 1.5%; + display: none; +} + +.weapons-page-container { + background-color: var(--color-9); + border-radius: 15px; + position: absolute; + width: 96.5%; + height: 96.5%; + left: 2.0%; + top: 1.5%; + display: none; +} + +.stafflogs-page-container { + background-color: var(--color-9); + border-radius: 15px; + position: absolute; + width: 96.5%; + height: 96.5%; + left: 2.0%; + top: 1.5%; + display: none; + overflow: auto +} + +.container-load { + background-color: var(--color-9); + border-radius: 15px; + position: absolute; + width: 96.5%; + height: 96.5%; + left: 2.0%; + top: 1.5%; + display: none; +} + +.header { + height: 4vh; + background-color: var(--color-1); + border: 5px solid #393B39; + border-top-right-radius: 50px; + border-bottom-right-radius: 50px; + width: 96.5%; + position: absolute; + top: 4vh; + display: flex; + align-items: center; + user-select: none; +} + +.header-left { + display: flex; + flex-direction: column; + text-align: left; + margin-left: 10px; + margin-right: 0px; +} + +.header-middle { + background-color: var(--color-2); + border-radius: 15px; + border: 5px solid #393B39; + width: fit-content; + height: 3.5vh; + padding: 8px; + padding-left: 20px; + padding-right: 20px; + display: flex; + flex-direction: column; + text-align: center; + align-items: normal; + color: white; + margin: auto; + margin-top: -10px; + font-size: 15px; +} + +.header-right { + display: flex; + flex-direction: column; + text-align: right; + margin: auto; + margin-right: 35px; + margin-left: 0px; +} + +.main-container { + border-top: 5px solid var(--color-3); + width: 100%; + height: 86%; + position: absolute; + display: flex; + bottom: 0; +} + +.nav-menu { + background-color: var(--color-1); + border-right: 5px solid var(--color-3); + min-width: 22.5vh; + height: 100%; + display: flex; + flex-direction: column; + user-select: none; + border-bottom-left-radius: 15px; +} + +.nav-item { + background-color: var(--color-4); + margin-top: 10px; + padding: 10px; + color: white; + font-size: 18px; + font-weight: bolder; +} + +.nav-item:hover { + background-color: var(--color-3); +} + +.active-nav { + background-color: var(--color-3); +} + +.warrants-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 80.7vh; + width: 50vh; + margin-top: 10px; + margin-left: 10px; +} + +.warrants-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.fa-search { + font-size: 15px; + font-weight: normal; +} + +.warrants-items { + display: flex; + flex-direction: column; + overflow: auto; + margin: auto; + margin-top: 10px; + width: 95%; + height: 55vh; +} + +.warrants-item { + background-color: var(--color-5); + width: 100%; + margin: auto; + margin-bottom: 10px; + margin-top: 0px; + display: flex; + user-select: none; +} + +.warrants-item:hover { + background-color: var(--color-3); +} + +.warrant-image { + width: 9vh; + height: 9vh; + margin-left: 5px; + margin-top: auto; + margin-bottom: auto; +} + +.warrant-title { + font-size: 16px; + font-weight: lighter; + color: white; + margin-top: 5px; +} + +.warrant-item-info { + color: #cccccc; + font-size: 12px; +} + +.warrant-bottom-info { + display: flex; + margin-top: 1vh; + margin-bottom: 0.75vh; + width: 100%; +} + +.warrant-id { + color: white; + font-size: 12px; +} + +.warrant-expiry-date { + color: white; + font-size: 12px; + margin: auto; + margin-right: 10px; +} + +.quotes-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + width: 50vh; + height: 75px; + margin-top: 10px; + margin-left: 10px; + display: flex; + align-items: center; + user-select: none; +} + +.quote-title { + font-size: 14px; + background-color: var(--color-4); + padding: 5px; + margin: 10px 0px 10px 10px; + text-align: center; + color: white; + font-weight: bolder; + width: 85px; + /* height: 30px; */ + text-shadow: black 1px 1px; +} + +.quote { + margin-right: 10px; + margin-left: 10px; + /* margin-bottom: 25px; */ + width: 100%; + background-color: var(--color-5); + height: 30px; + padding: 10px; + text-align: center; + display: flex; + font-style: italic; +} + +.quote-span { + margin: auto; + color: white; + font-size: 16px; +} + +.bulletin-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 100%; + width: 50vh; + margin-top: 10px; + margin-bottom: 10px; + margin-left: 10px; + user-select: none; + overflow: hidden; +} + +.bulletin-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-right: 0px; + margin-bottom: 0px; + width: 83.5%; + align-items: center; + user-select: none; +} + +.bulletin-items-continer { + margin: auto; + margin-top: 10px; + margin-bottom: 10px; + overflow: auto; + height: 100%; + display: flex; + flex-direction: column; +} + +.bulletin-item { + background-color: var(--color-5); + width: 45vh; + /* min-height: 7.7vh; */ + /* height: 7.7vh; */ + padding: 10px; + display: flex; + flex-direction: column; + margin-bottom: 10px; +} + +.bulletin-item:hover { + background-color: var(--color-3); +} + +.bulletin-item-title { + color: white; + margin-left: 5px; + font-size: 20px; + text-align: left; +} + +span.bulletin-item-title { + outline: none; + border: none; +} + +span.bulletin-item-title[contenteditable]:empty::before { + content: 'Enter Title'; +} + +.bulletin-item-info { + color: #cccccc; + font-size: 15px; + margin-left: 5px; + margin-top: 10px; + text-align: left; + padding-bottom: 0.8vh; + overflow-wrap: break-word; +} + +span.bulletin-item-info { + outline: none; + border: none; +} + +span.bulletin-item-info[contenteditable]:empty::before { + content: 'Enter Bulletin Information'; +} + +.bulletin-bottom-info { + display: flex; + margin-left: 5px; + margin-bottom: 0px; + color: white; + font-size: 12px; + height: 100%; +} + +.bulletin-date { + margin: auto; + margin-right: 5px; + margin-bottom: 0px; +} + +.bulletin-id { + margin: auto; + margin-left: 0px; + margin-bottom: 0px; +} + +.dispatch-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 81.1vh; + width: 50vh; + margin-top: 10px; + margin-left: 10px; + margin-right: 15px; +} + +.dispatch-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.active-unit-title { + background-color: var(--color-3); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: 2px; + margin-left: 10px; + margin-left: 13px; + width: 57.5%; + align-items: center; + user-select: none; +} + +.active-unit-count { + background-color: var(--color-3); + color: white; + font-weight: bolder; + font-size: 14px; + padding-top: 6px; + padding-bottom: 6px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: 3px; + margin-left: 3px; + width: 8%; + align-items: center; + user-select: none; + border-radius: 5px; +} + +.calls-title { + background-color: var(--color-3); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: 2px; + margin-left: 10px; + margin-left: 13px; + width: 95%; + align-items: center; + user-select: none; +} + +#police-count { + background-color: #093095; +} + +#bcso-count { +background-color: #cc7e25;; +} + +#sasp-count { +background-color: #2589cc; +} + +#ems-count { + background-color: #950909; +} + +#doj-count { + background-color: #525252; +} + +#doc-count { + background-color: #7b25cc; +} + +#pa-count { + background-color: #008080; +} + +.active-unit-list { + margin: auto; + margin-top: 10px; + margin-bottom: 10px; + overflow: auto; + height: 35vh; + display: flex; + flex-direction: column; + width: 95%; +} + +.active-unit-item { + padding-top: 7.5px; + padding-bottom: 7.5px; + padding-right: 10px; + padding-left: 10px; + /* height: 3vh; */ + background-color: var(--color-5); + display: flex; + align-items: center; + margin-bottom: 5px; +} + +#draggedItem { + position: absolute; + z-index: 80; + -webkit-transition: opacity 0.2s ease; + -moz-transition: opacity 0.2s ease; + -ms-transition: opacity 0.2s ease; + transition: opacity 0.2s ease; + opacity: 0; + pointer-events: none; + + padding: 10px; + height: 3vh; + background-color: var(--color-5); + display: flex; + align-items: center; + margin-bottom: 5px; + width: 45vh; +} + +.unit-status { + width: fit-content; + padding: 5px; + padding-left: 15px; + padding-right: 15px; + color: white; + font-size: 12px; + font-weight: bolder; + margin: auto; + margin-left: 5px; + margin-right: 0px; + background-color: #0B9509; + border-radius: 10px; +} + +.green-status { + background-color: #099517; +} + +.yellow-status { + background-color: #958F09; +} + +.unit-job { + width: fit-content; + padding: 5px; + padding-left: 15px; + padding-right: 15px; + color: white; + font-size: 12px; + font-weight: bolder; + margin: auto; + margin-left: 5px; + margin-right: 0px; + background-color: #093095; + border-radius: 10px; +} + +.unit-police { + background-color: #093095; +} + +.unit-ems { + background-color: #950909; +} + +.unit-doc { + background-color: #7b25cc; +} + +.unit-pa { + background-color: #008080; +} + +.unit-name { + margin: auto; + margin-left: 10px; + margin-right: 0px; + font-size: 12px; + font-weight: bolder; + color: white; +} + +.unit-radio { + margin: auto; + margin-right: 5px; + font-size: 12px; + font-weight: bolder; + color: white; + background-color: var(--color-3); + padding: 5px; + padding-left: 12.5px; + padding-right: 12.5px; + border-radius: 5px; +} + +.active-calls-list { + margin: auto; + margin-top: 10px; + margin-bottom: 10px; + overflow: auto; + height: 100%; + display: flex; + flex-direction: column; + width: 95%; +} + +.active-calls-item { + height: fit-content; + background-color: var(--color-5); + display: flex; + align-items: center; + margin-bottom: 5px; +} + +.active-call-inner-container { + display: flex; + flex-direction: column; + width: 100%; + height: 100%; +} + +.red-call { + background-color: #381515; +} + +.call-item-top { + height: 50%; + width: 100%; + display: flex; + align-items: center; + margin: auto; + margin-top: .5vh; +} + +.call-number { + background-color: #950909; + color: white; + font-size: 15px; + font-weight: bolder; + padding: 2.5px; + padding-left: 10px; + padding-right: 10px; + border-radius: 10px; + width: fit-content; + margin: auto; + margin-left: .75vh; + margin-right: 0; +} + +.call-code { + background-color: #097C95; + color: white; + font-size: 15px; + font-weight: bolder; + padding: 2.5px; + padding-left: 10px; + padding-right: 10px; + border-radius: 10px; + width: fit-content; + margin: auto; + margin-left: 5px; + margin-right: 0; +} + +.call-title { + color: white; + font-size: 20px; + font-weight: bolder; + padding: 2.5px; + padding-left: 0px; + padding-right: 0px; + border-radius: 10px; + width: fit-content; + margin: auto; + margin-left: 5px; + margin-right: 0; +} + +.call-radio { + margin: auto; + margin-left: auto; + margin-right: .5vh; + font-size: 15px; + font-weight: bolder; + color: white; + background-color: var(--color-3); + padding: 5px; + padding-left: 12.5px; + padding-right: 12.5px; + border-radius: 5px; +} + +.call-item-bottom { + height: fit-content; + width: 100%; + display: flex; + flex-direction: column; + align-items: center; + margin: auto; + margin-top: 0vh; + margin-left: .75vh; + padding-bottom: .75vh; +} + +.call-bottom-info { + color: white; + font-size: 15px; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + margin-left: 0.3vh; + overflow:wrap; + white-space:normal; +} + +.dispatch-line { + background-color: rgba(128, 128, 128, 0.1); + height: 0.05vh; + width: 100%; + margin-top: 0.1vh; + margin-bottom: 0.1vh +} + +.call-bottom-info > .far { + margin-right: .1vh; +} + +.call-bottom-information { + margin-top: 0.5vh; +} + +.call-victim { + color: white; + font-size: 15px; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + margin-left: 0px; +} + +a { + text-decoration: none; +} + +.profile-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 80.7vh; + width: 50vh; + margin-top: 10px; + margin-left: 10px; +} + + + +.profile-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.profile-title:hover { + background-color: var(--color-3); +} + +.profile-search-input { + background-color: var(--color-3); + color: white; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; + display: none; +} + +#profile-search-input { + outline: none; + border: none; + width: 95%; + color: white; + font-size: 15px; + background-color: rgba(0, 0, 0, 0); + margin: auto; +} + +#profile-search-input::placeholder { + color: white; +} + +.profile-items { + display: flex; + flex-direction: column; + overflow: auto; + margin: auto; + margin-top: 10px; + width: 95%; + height: 100%; + margin-bottom: 15px; +} + +.profile-item { + background-color: var(--color-5); + width: 100%; + height: 12vh; + margin: auto; + margin-bottom: 10px; + margin-top: 0px; + display: flex; + user-select: none; + +} + +.profile-item:hover { + background-color: var(--color-3); +} + +.profile-image { + width: 10vh; + height: 10vh; + margin-left: 10px; + margin-top: auto; + margin-bottom: auto; + object-fit: cover; +} + +.profile-item-title { + font-size: 16px; + font-weight: lighter; + color: white; + padding-top: 2px; +} + +.profile-tags { + display: flex; + overflow-x: auto; + width: 100%; + margin-top: 10px; + margin-bottom: 5px; +} + +.profile-criminal-tags { + display: flex; + overflow-x: auto; + width: 100%; + margin-top: 5px; + margin-bottom: 5px; +} + +.profile-tag { + margin: auto; + margin-left: 0px; + margin-right: 6px; + padding: 4px; + padding-left: 7px; + padding-right: 7px; + border-radius: 10px; + color: white; + font-size: 12px; + font-weight: bolder; + background-color: #956E09; +} + +.profile-bottom-info { + display: flex; + margin: auto; + width: 100%; +} + +.profile-id { + color: white; + font-size: 13px; +} + +.manage-profile-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 80.7vh; + width: 50vh; + margin-top: 10px; + margin-left: 10px; +} + +.manage-profile-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.manage-profile-editing-title { + background-color: var(--color-3); + color: white; + font-size: 15px; + font-weight: lighter; + padding-top: 10px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: 0px; + width: 80%; + align-items: center; + user-select: none; + display: block; +} + +.manage-profile-save { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 10px; + padding-bottom: 10px; + background-color: #1b8f25; + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; + display: block; +} + +.manage-profile-save:hover { + background-color: #1caa28; +} + +.manage-profile-info-container { + display: flex; + flex-direction: row; + width: 95%; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; +} + +.manage-profile-pic { + width: 45%; + object-fit: cover; +} + +.manage-profile-info-inner-container { + display: flex; + flex-direction: column; + width: 55%; +} + +.manage-profile-citizenid { + color: white; + margin-left: 10px; + font-size: 14px; + user-select: none; +} + +.manage-profile-citizenid-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 2px; + color: white; + background-color: rgba(0, 0, 0, 0); +} + +.manage-cid-pic { + color: white; + font-size: 16px; + margin-left: 10px +} + +.line { + background-color: var(--color-3); + height: 2px; + margin-left: 10px; + margin-bottom: 10px; +} + +.manage-profile-name { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.manage-profile-name-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 2px; + color: white; + background-color: rgba(0, 0, 0, 0); +} + +.manage-profile-dob { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.manage-profile-dob-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 2px; + color: white; + background-color: rgba(0, 0, 0, 0); +} + +.manage-profile-fingerprint { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.manage-profile-fingerprint-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 2px; + color: white; + background-color: rgba(0, 0, 0, 0); +} + +.manage-profile-phonenumber { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.manage-profile-phonenumber-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 2px; + color: white; + background-color: rgba(0, 0, 0, 0); +} + +.manage-profile-job { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.manage-profile-job-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 2px; + color: white; + background-color: rgba(0, 0, 0, 0); +} + +.manage-profile-url { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.manage-profile-url-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 2px; + color: white; + background-color: rgba(0, 0, 0, 0); + width: 21.75vh; +} + +.manage-profile-info { + width: 92.5%; + margin: auto; + margin-top: 10px; + margin-bottom: 15px; + border: none; + outline: none; + height: 100%; + resize: none; + background-color: var(--color-5); + color: white; + font-size: 16px; + padding: 10px; +} + +.manage-profile-active-warrant { + display: none; + margin: auto; + padding: 8px; + color: red; + font-weight: bold; + font-size: 20px; +} + +.manage-profile-right-container { + display: flex; + flex-direction: column; + height: 97.9%; + width: 50vh; + margin-top: 10px; + margin-left: 10px; + margin-right: 15px; +} + +.manage-profile-licenses-container { + background-color: var(--color-1); + width: 100%; + border: 2px solid var(--color-3); + height: 20%; +} + +.license-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.licenses-holder { + overflow: auto; + margin: auto; + margin-top: 5px; + width: 95%; + user-select: none; +} + +.license-tag { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: rgb(255, 255, 255); + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; +} + +.manage-profile-tags-container { + display: flex; + flex-direction: column; + background-color: var(--color-1); + width: 100%; + height: 20%; + border: 2px solid var(--color-3); + margin-top: 5px; + min-height: 100px; + max-height: 200px; + overflow: scroll; +} + +.tags-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 5px; + margin-right: 0px; + margin-bottom: 0px; + width: 84%; + align-items: center; + user-select: none; +} + +.tags-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7px; + padding-bottom: 7px; + margin: auto; + margin-top: 5px; + margin-left: 5px; + margin-bottom: 0px; + width: 10%; + text-align: center; +} + +.tags-add-btn:hover { + background-color: var(--color-3); +} + +.tags-holder { + overflow: auto; + margin: auto; + margin-top: 5px; + width: 95%; + user-select: none; +} + +.tag { + display: inline-block; + text-decoration: none; + margin: auto; + margin-bottom: 5px; + margin-left: 0px; + margin-right: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; +} + +span.tag-input[contenteditable]:empty::before { + content: 'Input Tag'; +} + +.tag-input { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + margin-top: 5px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; + outline: none; + border: none; +} + +.manage-profile-vehs-container { + display: flex; + flex-direction: column; + background-color: var(--color-1); + width: 100%; + height: 20%; + border: 2px solid var(--color-3); + margin-top: 5px; + max-height: 150px; + overflow: scroll; +} + +.vehs-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.vehs-holder { + overflow: auto; + margin: auto; + margin-top: 5px; + width: 95%; + user-select: none; +} + +.veh-tag { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + margin-top: 5px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; +} + +.manage-profile-houses-container { + display: flex; + flex-direction: column; + background-color: var(--color-1); + width: 100%; + height: 20%; + border: 2px solid var(--color-3); + margin-top: 5px; + max-height: 150px; + overflow: scroll; +} + +.houses-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.houses-holder { + overflow: auto; + margin: auto; + margin-top: 5px; + width: 95%; + user-select: none; +} + +.houses-tag { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + margin-top: 5px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: bolder; + background-color: white; + user-select: none; +} + +.manage-profile-gallery-container { + display: flex; + flex-direction: column; + background-color: var(--color-1); + width: 100%; + border: 2px solid var(--color-3); + margin-top: 5px; + height: 20%; + overflow: scroll; +} + +.gallery-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 5px; + margin-right: 0px; + margin-bottom: 0px; + width: 84%; + align-items: center; + user-select: none; +} + +.gallery-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7px; + padding-bottom: 7px; + margin: auto; + margin-top: 5px; + margin-left: 5px; + margin-bottom: 0px; + width: 10%; + text-align: center; +} + +.gallery-add-btn:hover { + background-color: var(--color-3); +} + +.gallery-inner-container { + overflow: auto; + white-space: nowrap; + margin: auto; + margin-top: 5px; + width: 95%; + user-select: none; +} + +.gallery-img { + width: 10vh; + filter: blur(5px); + object-fit: cover; +} + +.convictions-known, .incidents-known { + display: flex; + flex-direction: column; + width: 100%; + height: 100%; +} + +.convictions-known-container, .incidents-known-container { + background-color: var(--color-5); + width: 95vh; + height: 45vh; + margin: auto; + margin-top: 10px; + display: flex; + flex-direction: column; + z-index: 9998; + display: none; +} + +.convictions-known-title, .incidents-known-title { + background-color: var(--color-4); + color: white; + font-size: 20px; + font-weight: bolder; + text-align: center; + padding-top: 15px; + padding-bottom: 15px; + width: 95%; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + user-select: none; +} + +.convictions-title { + background-color: var(--color-1); + border: 2px solid var(--color-3); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + width: 100%; + align-items: center; + user-select: none; +} + +.convictions-title:hover { + background-color: var(--color-3); +} + +.convictions-holder { + overflow: scroll; + max-height: 87%; + margin: auto; + margin-top: 5px; + width: 95%; + user-select: none; +} + +.profile-incidents-title { + background-color: var(--color-1); + border: 2px solid var(--color-3); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + width: 100%; + align-items: center; + user-select: none; +} + +.profile-incidents-title:hover { + background-color: var(--color-3); +} + +.profile-incidents-holder { + overflow: scroll; + max-height: 87%; + margin: auto; + margin-top: 5px; + width: 95%; + user-select: none; +} + +.incident-number { + padding-right: 8px; +} + +.incident-timestamp { + color: #303030; + font-size: 10px; + font-weight: 500; +} + +.loader { + position: absolute; + left: 50%; + top: 50%; + z-index: 1; + width: 120px; + height: 120px; + border: 12px solid var(--color-1); + border-radius: 50%; + border-top: 12px solid var(--color-3); + -webkit-animation: spin 2s linear infinite; + animation: spin 2s linear infinite; +} + +.profile-loader { + margin-top: 5vh; + margin-left: auto; + margin-right: auto; + z-index: 1; + width: 120px; + height: 120px; + border: 12px solid var(--color-4); + border-radius: 50%; + border-top: 12px solid var(--color-3); + -webkit-animation: spin 2s linear infinite; + animation: spin 2s linear infinite; +} + +@-webkit-keyframes spin { + 0% { -webkit-transform: rotate(0deg); } + 100% { -webkit-transform: rotate(360deg); } +} + +@keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } +} + +.gallery-image-enlarged { + width: 40vh; + position: absolute; + top: 20%; + left: 25%; + display: none; + z-index: 999; +} + +/* Context Menu */ + +.contextmenu { + position: absolute; + width: fit-content; + padding: 2px; + margin: 0; + border: 1px solid var(--color-3); + background: var(--color-5); + z-index: 9999; + border-radius: 3px; + box-shadow: 1px 1px 4px rgba(0,0,0,.2); + opacity: 0; + transform: translate(0, 15px) scale(.95); + transition: transform 0.1s ease-out, opacity 0.1s ease-out; + pointer-events: none; +} + +.contextmenu-item { + display: block; + position: relative; + margin: 0; + padding: 0; + white-space: nowrap; +} + +.contextmenu-btn { + display: block; + color: white; + font-size: 13px; + cursor: pointer; + border: 1px solid transparent; + white-space: nowrap; + padding: 6px 8px; + border-radius: 3px; +} + +.contextmenu-btn { + outline: 0 none; + text-decoration: none; +} + +.contextmenu-text { + margin-left: 5px; +} + +.contextmenu-btn .fa { + position: absolute; + left: 8px; + top: 50%; + transform: translateY(-50%); +} + +.contextmenu-item-disabled { + opacity: .5; + pointer-events: none; +} + +.contextmenu-item-disabled .contextmenu-btn { + cursor: default; +} + +.contextmenu-item-submenu::after { + content: ""; + position: absolute; + right: 6px; + top: 50%; + transform: translateY(-50%); + border: 5px solid transparent; + border-left-color: #808080; +} + +.contextmenu-item-submenu:hover::after { + border-left-color: #fff; +} + +.contextmenu-show, +.contextmenu-item:hover > .contextmenu { + opacity: 1; + transform: translate(0, 0) scale(1); + pointer-events: auto; +} + +.contextmenu-item:hover > .contextmenu { + transition-delay: 300ms; +} + +.revoke-licence:hover { + background-color: #950909; +} + +.give-licence:hover { + background-color: #099517; +} + +.remove-image:hover { + background-color: #950909; +} + +.expand-image:hover { + background-color: #099517; +} + +.copy-image-link:hover { + background-color: #099517; +} + +.view-incident:hover { + background-color: var(--color-3); +} + +.view-incident2:hover { + background-color: var(--color-3); +} + +.make-waypoint:hover { + background-color: var(--color-3); +} + +.view-profile:hover { + background-color: var(--color-3); +} + +.gallery-upload-input { + background-color: var(--color-3); + color: white; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; + display: none; +} + +#gallery-upload-input { + outline: none; + border: none; + width: 95%; + color: white; + font-size: 15px; + background-color: rgba(0, 0, 0, 0); + margin: auto; +} + +#gallery-upload-input::placeholder { + color: white; +} + +.penalcode-embed { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 96.5%; + width: 85%; + margin: auto; + overflow: hidden; +} + +.penalcode-embed iframe { + height: 96.5%; + width: 98%; + margin: auto; + border: none; + outline: none; +} + +.sop-embed { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 96.5%; + width: 85%; + margin: auto; + overflow: hidden; +} + +.sop-embed iframe { + height: 96.5%; + width: 98%; + margin: auto; + border: none; + outline: none; +} + +.incidents-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 80.7vh; + width: 50vh; + margin-top: 10px; + margin-left: 10px; +} + +.incidents-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.incidents-title:hover { + background-color: var(--color-3); +} + +.incidents-search-input { + background-color: var(--color-3); + color: white; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; + display: none; +} + +#incidents-search-input { + outline: none; + border: none; + width: 95%; + color: white; + font-size: 15px; + background-color: rgba(0, 0, 0, 0); + margin: auto; +} + +#incidents-search-input::placeholder { + color: white; +} + +.incidents-items { + display: flex; + flex-direction: column; + overflow: auto; + margin: auto; + margin-top: 10px; + width: 95%; + height: 100%; + margin-bottom: 15px; +} + +.incidents-item { + background-color: var(--color-5); + width: 100%; + height: 5.5vh; + margin: auto; + margin-bottom: 10px; + margin-top: 0px; + display: flex; + user-select: none; + flex-direction: column; +} + +.incidents-item:hover { + background-color: var(--color-3); +} + +.incidents-top-holder { + width: 100%; + height: 50%; + display: flex; + align-items: center; +} + +.incidents-item-title { + font-size: 14px; + font-weight: lighter; + color: white; + margin: auto; + margin-left: 5px; + max-width: 25vh; + margin-top: 5px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.incedent-report-name { + font-size: 14px; + font-weight: lighter; + color: white; + margin: auto; + margin-right: 5px; + margin-top: 5px; +} + +.incidents-bottom-holder { + width: 100%; + height: 50%; + display: flex; + align-items: center; + padding-top: 5px; +} + +.incedent-report-id { + font-size: 14px; + font-weight: lighter; + color: white; + margin: auto; + margin-left: 5px; + margin-bottom: 5px; +} + +.incedent-report-time-ago { + font-size: 14px; + font-weight: lighter; + color: white; + margin: auto; + margin-right: 5px; + margin-bottom: 5px; +} + +.manage-incidents-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 80.7vh; + max-height: 80.7vh; + width: 50vh; + margin-top: 10px; + margin-left: 10px; + overflow: auto; +} + +.manage-incidents-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: auto; + width: 80%; + /* width: 66%; */ + align-items: center; + user-select: none; +} + +.manage-incidents-title:hover { + background-color: var(--color-3); +} + +.manage-incidents-create { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 5px; + padding-bottom: 5px; + align-items: center; + background-color: var(--color-4); + margin: auto; + margin-left: 5px; + margin-top: 10px; + /* margin-right: 0px; */ + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; + display: block; +} + +.manage-incidents-create:hover { + background-color: var(--color-3); +} + +.manage-incidents-save { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 5px; + padding-bottom: 5px; + background-color: #1b8f25; + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; + display: block; +} + +.manage-incidents-save:hover { + background-color: #1caa28; +} + +.manage-incidents-title-tag { + font-size: 16px; + font-weight: lighter; + color: white; + width: 95%; + margin: auto; + text-align: left; + margin-top: 10px; + margin-bottom: 0px; +} + +.manage-incidents-title-input { + color: white; + font-weight: lighter; + width: 95%; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + align-items: center; + display: flex; + border-bottom: 2px solid var(--color-3); +} + +.manage-incidents-title-input input { + border: none; + outline: none; + margin-left: 5px; + font-size: 16px; + margin-top: 5px; + color: white; + width: 100%; + background-color: rgba(0, 0, 0, 0); +} + +.manage-incidents-reports-content { + width: 91%; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + border: none; + outline: none; + min-height: 30vh; + resize: none; + background-color: var(--color-5); + color: white; + font-size: 16px; + padding: 10px; + pointer-events: none; +} + +.manage-incidents-tags-container { + display: flex; + flex-direction: column; + border: 2px solid var(--color-3); + color: white; + font-size: 18px; + font-weight: bolder; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 94%; + height: fit-content; + align-items: center; + user-select: none; +} + +.manage-incidents-tags-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + margin-right: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.manage-incidents-tags-add-btn:hover { + background-color: var(--color-3); +} + +.manage-incidents-tags-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7.25px; + padding-bottom: 7.25px; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + margin-left: 5px; + margin-right: 0px; + width: 10%; + text-align: center; + pointer-events: none; +} + +.manage-incidents-tags-holder { + overflow: auto; + margin: auto; + margin-top: 10px; + margin-bottom: 10px; + width: 95%; + max-height: 14vh; + user-select: none; +} + +.manage-incidents-tag { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + margin-bottom: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; +} + +.manage-incidents-officers-container { + display: flex; + flex-direction: column; + border: 2px solid var(--color-3); + color: white; + font-size: 18px; + font-weight: bolder; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 94%; + height: fit-content; + align-items: center; + user-select: none; +} + +.manage-incidents-officers-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + margin-right: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.manage-incidents-officers-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7.25px; + padding-bottom: 7.25px; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + margin-left: 5px; + margin-right: 0px; + width: 10%; + text-align: center; + pointer-events: none; +} + +.manage-incidents-officers-add-btn:hover { + background-color: var(--color-3); +} + +.manage-incidents-officers-holder { + overflow: auto; + margin: auto; + margin-top: 10px; + margin-bottom: 10px; + width: 95%; + max-height: 14vh; + user-select: none; +} + +.manage-incidents-civilians-container { + display: flex; + flex-direction: column; + border: 2px solid var(--color-3); + color: white; + font-size: 18px; + font-weight: bolder; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 94%; + height: fit-content; + align-items: center; + user-select: none; +} + +.manage-incidents-civilians-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + margin-right: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.manage-incidents-civilians-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7.25px; + padding-bottom: 7.25px; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + margin-left: 5px; + margin-right: 0px; + width: 10%; + text-align: center; + pointer-events: none; +} + +.manage-incidents-civilians-add-btn:hover { + background-color: var(--color-3); +} + +.manage-incidents-civilians-holder { + overflow: auto; + margin: auto; + margin-top: 10px; + margin-bottom: 10px; + width: 95%; + max-height: 14vh; + user-select: none; +} + +.manage-incidents-evidence-container { + display: flex; + flex-direction: column; + border: 2px solid var(--color-3); + color: white; + font-size: 18px; + font-weight: bolder; + margin: auto; + margin-top: 10px; + margin-bottom: 10px; + width: 94%; + height: fit-content; + align-items: center; + user-select: none; +} + +.manage-incidents-evidence-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + margin-right: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.manage-incidents-evidence-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7.25px; + padding-bottom: 7.25px; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + margin-left: 5px; + margin-right: 0px; + width: 10%; + text-align: center; + pointer-events: none; +} + +.manage-incidents-evidence-add-btn:hover { + background-color: var(--color-3); +} + +.manage-incidents-evidence-holder { + overflow: auto; + margin: auto; + margin-top: 10px; + margin-bottom: 10px; + width: 95%; + max-height: 14vh; + user-select: none; +} + +.manage-incidents-evidence { + width: 10vh; + filter: blur(5px); +} + +span.tag-incident-input[contenteditable]:empty::before { + content: 'Input Tag'; +} + +.tag-incident-input { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; + outline: none; + border: none; +} + +.associated-incidents-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 80.7vh; + width: 50vh; + margin-top: 10px; + margin-left: 10px; + margin-right: 10px; +} + +.associated-incidents-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.associated-incidents-title:hover { + background-color: var(--color-3); +} + +.associated-incidents-tags-container { + display: flex; + flex-direction: column; + border: 2px solid var(--color-3); + color: white; + font-size: 18px; + font-weight: bolder; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 94%; + height: fit-content; + align-items: center; + user-select: none; +} + +.associated-incidents-tags-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + margin-right: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.associated-incidents-tags-add-btn:hover { + background-color: var(--color-3); +} + +.associated-incidents-tags-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7.25px; + padding-bottom: 7.25px; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + margin-left: 5px; + margin-right: 0px; + width: 10%; + text-align: center; + pointer-events: none; +} + +.associated-incidents-tags-holder { + overflow: auto; + margin: auto; + margin-top: 10px; + margin-bottom: 10px; + width: 95%; + max-height: 14vh; + user-select: none; +} + +.associated-incidents-tag { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; +} + +.incidents-upload-input { + background-color: var(--color-3); + color: white; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; + display: none; +} + +#incidents-upload-input { + outline: none; + border: none; + width: 95%; + color: white; + font-size: 15px; + background-color: rgba(0, 0, 0, 0); + margin: auto; +} + +#incidents-upload-input::placeholder { + color: white; +} + +.incidents-img { + width: 10vh; + filter: blur(5px); + object-fit: cover; +} + +.bulletin-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7px; + padding-bottom: 7px; + margin: auto; + margin-top: 10px; + margin-left: 5px; + margin-bottom: 0px; + width: 10%; + text-align: center; +} + +.bulletin-add-btn:hover { + background-color: var(--color-3); +} + +.associated-incidents-user-container { + display: flex; + flex-direction: column; + border: 2px solid var(--color-3); + color: white; + font-size: 18px; + font-weight: bolder; + margin: auto; + margin-bottom: 10px; + margin-top: 0px; + width: 94%; + height: fit-content; + align-items: center; + user-select: none; +} + +.associated-incidents-user-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.associated-incidents-user-tags-holder { + overflow: auto; + margin: auto; + margin-top: 10px; + margin-bottom: 10px; + width: 95%; + min-height: 3.5vh; + max-height: 14vh; + user-select: none; + display: flex; + background-color: var(--color-5); +} + +.modify-charges-label { + color: white; + font-size: 13px; + font-weight: bolder; + border-bottom: 2px solid #2C537B; + padding: 2px; + margin: auto; + margin-top: 4px; + margin-bottom: -3px; + width: 95%; + align-items: center; + user-select: none; +} + +.associated-incidents-user-tag { + text-decoration: none; + margin-top: auto; + margin-bottom: auto; + margin-left: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: white; + font-size: 12px; + font-weight: 600; + background-color: black; + user-select: none; + width: fit-content; +} + +.associated-incidents-user-holder { + padding: 10px; + overflow: auto; + margin: auto; + margin-top: 10px; + margin-bottom: 10px; + width: 92%; + min-height: 3.5vh; + max-height: 37vh; + user-select: none; +} + +.associated-incidents-user { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + margin-bottom: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; +} + +.associated-incidents-fine-input { + color: white; + font-weight: lighter; + width: 95%; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + align-items: center; + display: flex; + border-bottom: 2px solid var(--color-3); +} + +.associated-incidents-fine-input input { + border: none; + outline: none; + margin-left: 5px; + font-size: 16px; + margin-top: 5px; + color: white; + width: 100%; + background-color: rgba(0, 0, 0, 0); +} + +.associated-incidents-sentence-input { + color: white; + font-weight: lighter; + width: 95%; + margin: auto; + margin-top: 5px; + margin-bottom: 15px; + align-items: center; + display: flex; + border-bottom: 2px solid var(--color-3); +} + +.associated-incidents-sentence-input input { + border: none; + outline: none; + margin-left: 5px; + font-size: 16px; + margin-top: 5px; + color: white; + width: 100%; + background-color: rgba(0, 0, 0, 0); +} + +.associated-incidents-controls { + justify-content: inherit; + width: 90%; + margin-top: 5px; + margin-bottom: 15px; +} + +.control-button { + text-align: center; + background-color: var(--color-4); + border: 2px solid var(--color-3); + margin-bottom: 10px; + padding: 10px; +} + +.control-button span { + padding-right: 8px; +} + +.control-button:hover { + background-color: var(--color-3); + cursor: pointer; +} + +.incidents-person-search { + display: flex; + flex-direction: column; + width: 100%; + height: 100%; + margin-top: 32.5vh; +} + +.incidents-person-search-container { + background-color: var(--color-5); + width: 95vh; + height: 45vh; + margin: auto; + display: flex; + flex-direction: column; + z-index: 9998; + display: none; +} + +.incidents-person-search-title { + background-color: var(--color-4); + color: white; + font-size: 20px; + font-weight: bolder; + text-align: center; + padding-top: 15px; + padding-bottom: 15px; + width: 95%; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + user-select: none; +} + +.incidents-person-search-name-title { + width: 95%; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + color: white; + font-size: 15px; + text-align: left; + user-select: none; +} + +.incidents-person-search-name-input { + background-color: rgba(0, 0, 0, 0); + border: none; + outline: none; + color: white; + width: 100%; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + text-align: left; + padding-bottom: 2.5px; +} + +.incidents-person-search-holder { + overflow: auto; + height: 30vh; + width: 95%; + margin: auto; + margin-top: 15px; + margin-bottom: 15px; +} + +.incidents-person-search-item { + width: 100%; + height: 12.5vh; + display: flex; + flex-direction: row; +} + +.incidents-person-search-item:hover { + background-color: var(--color-3); +} + +.incidents-person-search-item-pfp { + width: 11vh; + height: 11vh; + margin-top: auto; + margin-bottom: auto; + margin-left: 10px; +} + +.incidents-person-search-item-right { + display: flex; + flex-direction: column; + width: 100%; + margin-top: auto; + margin-bottom: auto; + margin-right: 10px; + margin-left: 10px; + height: 11vh; +} + +.incidents-person-search-item-right-cid-title { + width: 100%; + margin: auto; + margin-top: 0px; + margin-bottom: 0px; + color: white; + font-size: 16px; + text-align: left; + user-select: none; +} + +.incidents-person-search-item-right-cid-input { + width: 100%; + margin: auto; + margin-top: 5px; + margin-bottom: auto; + color: white; + font-size: 16px; + text-align: left; + padding-bottom: 2.5px; + border-bottom: 2px solid var(--color-3); + user-select: none; +} + +.incidents-person-search-item-right-name-title { + width: 100%; + margin: auto; + margin-top: auto; + margin-bottom: 0px; + color: white; + font-size: 16px; + text-align: left; + user-select: none; +} + +.incidents-person-search-item-right-name-input { + width: 100%; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + color: white; + font-size: 16px; + text-align: left; + padding-bottom: 2.5px; + border-bottom: 2px solid var(--color-3); +} + +.bolos-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 80.7vh; + width: 50vh; + margin-top: 10px; + margin-left: 10px; +} + +.bolos-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.bolos-title:hover { + background-color: var(--color-3); +} + +.bolos-search-input { + background-color: var(--color-3); + color: white; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; + display: none; +} + +#bolos-search-input { + outline: none; + border: none; + width: 95%; + color: white; + font-size: 15px; + background-color: rgba(0, 0, 0, 0); + margin: auto; +} + +#bolos-search-input::placeholder { + color: white; +} + +.bolos-items { + display: flex; + flex-direction: column; + overflow: auto; + margin: auto; + margin-top: 10px; + width: 95%; + height: 100%; + margin-bottom: 15px; +} + +.bolos-item { + background-color: var(--color-5); + width: 100%; + height: 5.5vh; + margin: auto; + margin-bottom: 10px; + margin-top: 0px; + display: flex; + user-select: none; + flex-direction: column; +} + +.manage-bolos-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 80.7vh; + max-height: 80.7vh; + width: 50vh; + margin-top: 10px; + margin-left: 10px; + overflow: auto; +} + +.manage-bolos-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: 0px; + margin-left: 10px; + width: 66%; + /* width: 66%; */ + align-items: center; + user-select: none; +} + +.manage-bolos-title-tag { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-right: 0px; + margin-bottom: 0px; + width: 84%; + align-items: center; + user-select: none; +} + +.manage-bolos-title:hover { + background-color: var(--color-3); +} + + + +.manage-bolos-create { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 5px; + padding-bottom: 5px; + align-items: center; + background-color: var(--color-4); + margin: auto; + margin-left: 5px; + margin-top: 10px; + /* margin-right: 0px; */ + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; +} + +.manage-bolos-create:hover { + background-color: var(--color-3); +} + +.manage-bolos-input-tag { + font-size: 16px; + font-weight: lighter; + color: white; + width: 95%; + margin: auto; + text-align: left; + margin-top: 10px; + margin-bottom: 0px; +} + +.manage-bolos-input-title { + color: white; + font-weight: lighter; + width: 95%; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + align-items: center; + display: flex; + border-bottom: 2px solid var(--color-3); +} + +.manage-bolos-input-title input { + border: none; + outline: none; + margin-left: 5px; + font-size: 16px; + margin-top: 5px; + color: white; + width: 100%; + background-color: rgba(0, 0, 0, 0); +} + +.manage-bolos-input-plate { + color: white; + font-weight: lighter; + width: 95%; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + align-items: center; + display: flex; + border-bottom: 2px solid var(--color-3); +} + +.manage-bolos-input-plate input { + border: none; + outline: none; + margin-left: 5px; + font-size: 16px; + margin-top: 5px; + color: white; + width: 100%; + background-color: rgba(0, 0, 0, 0); +} + +.manage-bolos-input-owner { + color: white; + font-weight: lighter; + width: 95%; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + align-items: center; + display: flex; + border-bottom: 2px solid var(--color-3); +} + +.manage-bolos-input-owner input { + border: none; + outline: none; + margin-left: 5px; + font-size: 16px; + margin-top: 5px; + color: white; + width: 100%; + background-color: rgba(0, 0, 0, 0); +} + +.manage-bolos-input-individual { + color: white; + font-weight: lighter; + width: 95%; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + align-items: center; + display: flex; + border-bottom: 2px solid var(--color-3); +} + +.manage-bolos-input-individual input { + border: none; + outline: none; + margin-left: 5px; + font-size: 16px; + margin-top: 5px; + color: white; + width: 100%; + background-color: rgba(0, 0, 0, 0); +} + +.manage-bolos-save { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: #1b8f25; + margin: auto; + margin-left: 0px; + margin-top: 10px; + margin-right: 13px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; +} + +.manage-bolos-save:hover { + background-color: #1caa28; +} + +.manage-bolos-new { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: #8f1b1b; + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; +} + +.manage-bolos-new:hover { + background-color: #aa1c1c; +} + +.manage-bolos-reports-content { + width: 91%; + margin: auto; + margin-top: 15px; + margin-bottom: 15px; + border: none; + outline: none; + height: 100%; + resize: none; + background-color: var(--color-5); + color: white; + font-size: 16px; + padding: 10px; +} + +.manage-bolos-right-container { + display: flex; + flex-direction: column; + height: 95.7%; + width: 50vh; + margin-top: 10px; + margin-left: 10px; + margin-right: 15px; +} + +.manage-bolos-tags-container { + display: flex; + flex-direction: column; + background-color: var(--color-1); + width: 100%; + border: 2px solid var(--color-3); + max-height: 150px; + overflow: scroll; +} + +.manage-bolos-gallery-container { + display: flex; + flex-direction: column; + background-color: var(--color-1); + width: 100%; + border: 2px solid var(--color-3); + margin-top: 10px; + height: 18vh; + overflow: scroll; +} + +.manage-bolos-tags-holder { + overflow: auto; + margin: auto; + width: 95%; + max-height: 14vh; + user-select: none; +} + +.manage-officers-tags-holder { + overflow: auto; + margin: auto; + width: 95%; + max-height: 14vh; + user-select: none; + margin-top: 10px; +} + +.officers-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7px; + padding-bottom: 7px; + margin: auto; + margin-top: 10px; + margin-left: 5px; + margin-bottom: 0px; + width: 10%; + text-align: center; +} + +.officers-add-btn:hover { + background-color: var(--color-3); +} + +.manage-officers-tags-container { + display: flex; + flex-direction: column; + background-color: var(--color-1); + width: 100%; + border: 2px solid var(--color-3); + max-height: 150px; + margin-top: 10px; + overflow: scroll; +} + +.bolo-item { + background-color: var(--color-5); + width: 100%; + margin: auto; + margin-bottom: 10px; + margin-top: 0px; + display: flex; + user-select: none; + flex-direction: column; +} + +.bolo-item:hover { + background-color: var(--color-3); +} + +.bolo-top-holder { + width: 100%; + height: 50%; + display: flex; + align-items: center; +} + +.bolo-item-title { + font-size: 14px; + font-weight: lighter; + color: white; + margin: auto; + margin-left: 5px; + margin-top: 5px; +} + +.bolo-report-name { + font-size: 14px; + font-weight: lighter; + color: white; + margin: auto; + margin-right: 5px; + margin-top: 5px; +} + +.bolo-bottom-holder { + width: 100%; + height: 50%; + display: flex; + align-items: center; + margin-top: 5px +} + +.bolo-report-id { + font-size: 14px; + font-weight: lighter; + color: white; + margin: auto; + margin-left: 5px; + margin-bottom: 5px; +} + +.bolo-report-time-ago { + font-size: 14px; + font-weight: lighter; + color: white; + margin: auto; + margin-right: 5px; + margin-bottom: 5px; +} + +.bolos-search-refresh { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: var(--color-10); + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; +} + +.bolos-search-refresh:hover { + background-color: #aa891c; +} + +.bolos-search-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 0px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: 0px; + width: 80%; + /* width: 66%; */ + align-items: center; + user-select: none; +} + +.bolos-search-title:hover { + background-color: var(--color-3); +} + +.manage-bolos-tags-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7px; + padding-bottom: 7px; + margin: auto; + margin-top: 10px; + margin-left: 5px; + margin-bottom: 0px; + width: 10%; + text-align: center; +} + +.manage-bolos-tags-add-btn:hover { + background-color: var(--color-3); +} + +span.tag-bolo-input[contenteditable]:empty::before { + content: 'Input Tag'; +} + +.tag-bolo-input { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + margin-top: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; + outline: none; + border: none; +} + +span.officer-tag-bolo-input[contenteditable]:empty::before { + content: 'Input Tag'; +} + +.officer-tag-bolo-input { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + margin-top: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; + outline: none; + border: none; +} + +.bolo-gallery-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7px; + padding-bottom: 7px; + margin: auto; + margin-top: 10px; + margin-left: 5px; + margin-bottom: 0px; + width: 10%; + text-align: center; +} + +.bolo-gallery-add-btn:hover { + background-color: var(--color-3); +} + +.bolo-gallery-upload-input { + background-color: var(--color-3); + color: white; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; + display: none; +} + +#bolo-gallery-upload-input { + outline: none; + border: none; + width: 95%; + color: white; + font-size: 15px; + background-color: rgba(0, 0, 0, 0); + margin: auto; +} + +#bolo-gallery-upload-input::placeholder { + color: white; +} + +.bolo-img { + width: 10vh; + filter: blur(5px); + object-fit: cover; +} + +.bolo-gallery-inner-container { + overflow: auto; + margin: auto; + margin-top: 10px; + margin-bottom: 10px; + width: 95%; + max-height: 14vh; + user-select: none; +} + +.manage-bolos-editing-title { + background-color: var(--color-3); + color: white; + font-size: 15px; + font-weight: lighter; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: 0px; + margin-left: 10px; + width: 95%; + align-items: center; + user-select: none; +} + +.reports-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 80.7vh; + width: 50vh; + margin-top: 10px; + margin-left: 10px; +} + +#home-reports-container { + height: 50%; +} + +#home-warrants-container { + height: 50%; +} + +.dispatch-comms-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 46.5%; + width: 50vh; + margin-top: 1vh; + margin-left: 10px; +} + +.reports-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.reports-title:hover { + background-color: var(--color-3); +} + +.reports-search-input { + background-color: var(--color-3); + color: white; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; + display: none; +} + +#reports-search-input { + outline: none; + border: none; + width: 95%; + color: white; + font-size: 15px; + background-color: rgba(0, 0, 0, 0); + margin: auto; +} + +#reports-search-input::placeholder { + color: white; +} + +.reports-items { + display: flex; + flex-direction: column; + overflow: auto; + margin: auto; + margin-top: 10px; + width: 95%; + height: 100%; + margin-bottom: 15px; +} + +.dispatch-item { + height: auto; + padding: auto; + margin-top: 1vh; +} + +.dispatch-item:hover { + background-color: var(--color-7); +} + +.dispatch-items { + display: flex; + flex-direction: column; + overflow: auto; + margin: auto; + margin-top: 10px; + width: 94%; + height: 100%; +} + +.dispatch-message-profilepic { + width: 2.8vh; + height: 2.8vh; + object-fit: cover; + float: left; + border-radius: 50%; +} + +.dispatch-item-info { + float:left; + font-size: 14px; + font-weight: bold; + padding-left: 0.75vh; + color: var(--color-8); +} + +.dispatch-info-job-lspd { + color: #2554cc; +} + +.dispatch-info-job-bcso { + color: #cc7e25; +} + +.dispatch-info-job-sast { + color: #2589cc; +} + +.dispatch-info-job-sasp { + color: #2589cc; +} + +.dispatch-info-job-doc { + color: #7b25cc; +} + +.dispatch-info-job-sapr { + color: #5acc25; +} + +.dispatch-info-job-pa { + color: #008080; +} + +.dispatch-info-job-ambulance { + color: #cc2525; +} + +.dispatch-info-job-doj { + color: #FFEAB9; +} + +.active-info-job-lspd { + background-color: #2554cc; +} + +.active-info-job-bcso { + background-color: #cc7e25; +} + +.active-info-job-sast { + background-color: #2589cc; +} + +.active-info-job-sasp { + background-color: #2589cc; +} + +.active-info-job-doc { + background-color: #7b25cc; +} + +.active-info-job-sapr { + background-color: #5acc25; +} + +.active-info-job-pa { + background-color: #008080; +} + +.active-info-job-ambulance { + background-color: #cc2525; +} + +.active-info-job-doj { + background-color: #525252; +} + +.active-info-job-unk { + background-color: #6E707C; +} + +.dispatch-item-message { + float:left; + font-size: 14px; + font-weight: lighter; + color: white; + width: 100%; + overflow:wrap; + white-space:normal; + padding-left: 0.80vh; + padding-top: 0.2vh; +} + +.dispatch-item-msg { + padding-left: 2.8vh; + padding-bottom: 0vh; +} + +.dispatch-item-msg:hover { + background-color: var(--color-7); +} + +.dispatch-item-grid { + display:grid; +} + +.dispatch-input { + min-width: 90%; + max-width: 90%; + min-height: 0.1vh; + margin-left: 1.1vh; + margin-bottom: 1vh; + border: none; + padding: 12px 20px; + background-color: var(--color-7); + color: #bebec2; +} + +.dispatch-input:focus { + outline:none!important; +} + +.reports-search-refresh { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: var(--color-10); + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; +} + +.reports-search-refresh:hover { + background-color: #aa891c; +} + +.dispatch-comms-refresh { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: var(--color-10); + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; +} + +.dispatch-comms-refresh:hover { + background-color: #aa891c; +} + +.reports-search-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 0px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: 0px; + width: 80%; + /* width: 66%; */ + align-items: center; + user-select: none; +} + +.reports-search-title:hover { + background-color: var(--color-3); +} + +.manage-reports-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 80.7vh; + max-height: 80.7vh; + width: 50vh; + margin-top: 10px; + margin-left: 10px; + overflow: auto; +} + +.manage-reports-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: auto; + margin-left: 10px; + width: 80%; + /* width: 66%; */ + align-items: center; + user-select: none; +} + +.manage-reports-title-tag { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-right: 0px; + margin-bottom: 0px; + width: 84%; + align-items: center; + user-select: none; +} + +.manage-reports-title:hover { + background-color: var(--color-3); +} + + + +.manage-reports-create { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 5px; + padding-bottom: 5px; + align-items: center; + background-color: var(--color-4); + margin: auto; + margin-left: 5px; + margin-top: 10px; + /* margin-right: 0px; */ + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; +} + +.manage-reports-create:hover { + background-color: var(--color-3); +} + +.manage-reports-input-tag { + font-size: 16px; + font-weight: lighter; + color: white; + width: 95%; + margin: auto; + text-align: left; + margin-top: 10px; + margin-bottom: 0px; +} + +.manage-reports-input-title { + color: white; + font-weight: lighter; + width: 95%; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + align-items: center; + display: flex; + border-bottom: 2px solid var(--color-3); +} + +.manage-reports-input-title input { + border: none; + outline: none; + margin-left: 5px; + font-size: 16px; + margin-top: 5px; + color: white; + width: 100%; + background-color: rgba(0, 0, 0, 0); +} + +.manage-reports-input-type { + color: white; + font-weight: lighter; + width: 95%; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + align-items: center; + display: flex; + border-bottom: 2px solid var(--color-3); +} + +.manage-reports-input-type input { + border: none; + outline: none; + margin-left: 5px; + font-size: 16px; + margin-top: 5px; + color: white; + width: 100%; + background-color: rgba(0, 0, 0, 0); +} + +.manage-reports-input-owner { + color: white; + font-weight: lighter; + width: 95%; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + align-items: center; + display: flex; + border-bottom: 2px solid var(--color-3); +} + +.manage-reports-input-owner input { + border: none; + outline: none; + margin-left: 5px; + font-size: 16px; + margin-top: 5px; + color: white; + width: 100%; + background-color: rgba(0, 0, 0, 0); +} + +.manage-reports-input-individual { + color: white; + font-weight: lighter; + width: 95%; + margin: auto; + margin-top: 5px; + margin-bottom: 0px; + align-items: center; + display: flex; + border-bottom: 2px solid var(--color-3); +} + +.manage-reports-input-individual input { + border: none; + outline: none; + margin-left: 5px; + font-size: 16px; + margin-top: 5px; + color: white; + width: 100%; + background-color: rgba(0, 0, 0, 0); +} + +.manage-reports-save { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: #1b8f25; + margin: auto; + margin-left: 0px; + margin-top: 10px; + margin-right: 13px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; + display: block; +} + +.manage-reports-save:hover { + background-color: #1caa28; +} + +.manage-reports-new { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: #8f1b1b; + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; + display: block; +} + +.manage-reports-new:hover { + background-color: #aa1c1c; +} + +.incidents-remove-normal-tag:hover { + background-color: #aa1c1c; +} + +.incidents-remove-normal-civ:hover { + background-color: #aa1c1c; +} + +.incidents-remove-tag:hover { + background-color: #aa1c1c; +} + +.incidents-remove-officer-tag:hover { + background-color: #aa1c1c; +} + +.remove-tag:hover { + background-color: #aa1c1c; +} + +.manage-reports-editing-title { + background-color: var(--color-3); + color: white; + font-size: 15px; + font-weight: lighter; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: 0px; + margin-left: 10px; + width: 95%; + align-items: center; + user-select: none; + display: block; +} + +.manage-reports-reports-content { + width: 91%; + margin: auto; + margin-top: 15px; + margin-bottom: 15px; + border: none; + outline: none; + height: 100%; + resize: none; + background-color: var(--color-5); + color: white; + font-size: 16px; + padding: 10px; +} + +.manage-reports-right-container { + display: flex; + flex-direction: column; + height: 95.7%; + width: 50vh; + margin-top: 10px; + margin-left: 10px; + margin-right: 15px; +} + +.manage-reports-tags-container { + display: flex; + flex-direction: column; + background-color: var(--color-1); + width: 100%; + border: 2px solid var(--color-3); + max-height: 150px; + overflow: scroll; +} + +.manage-reports-gallery-container { + display: flex; + flex-direction: column; + background-color: var(--color-1); + width: 100%; + border: 2px solid var(--color-3); + margin-top: 10px; + height: 18vh; + overflow: scroll; +} + +.manage-reports-tags-holder { + overflow: auto; + margin: auto; + width: 95%; + max-height: 14vh; + user-select: none; +} + +.reports-officers-tags-holder { + overflow: auto; + margin: auto; + width: 95%; + max-height: 14vh; + user-select: none; + margin-top: 10px; +} + +.reports-officers-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7px; + padding-bottom: 7px; + margin: auto; + margin-top: 10px; + margin-left: 5px; + margin-bottom: 0px; + width: 10%; + text-align: center; +} + +.reports-officers-add-btn:hover { + background-color: var(--color-3); +} + +.reports-officers-tags-container { + display: flex; + flex-direction: column; + background-color: var(--color-1); + width: 100%; + border: 2px solid var(--color-3); + max-height: 150px; + margin-top: 10px; + overflow: scroll; +} + +.reports-gallery-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7px; + padding-bottom: 7px; + margin: auto; + margin-top: 10px; + margin-left: 5px; + margin-bottom: 0px; + width: 10%; + text-align: center; +} + +.reports-gallery-add-btn:hover { + background-color: var(--color-3); +} + +.reports-gallery-upload-input { + background-color: var(--color-3); + color: white; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; + display: none; +} + +#reports-gallery-upload-input { + outline: none; + border: none; + width: 95%; + color: white; + font-size: 15px; + background-color: rgba(0, 0, 0, 0); + margin: auto; +} + +#reports-gallery-upload-input::placeholder { + color: white; +} + +.reports-img { + width: 10vh; + filter: blur(5px); + object-fit: cover; +} + +.reports-gallery-inner-container { + overflow: auto; + margin: auto; + margin-top: 10px; + margin-bottom: 10px; + width: 95%; + max-height: 14vh; + user-select: none; +} + +.manage-reports-tags-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7px; + padding-bottom: 7px; + margin: auto; + margin-top: 10px; + margin-left: 5px; + margin-bottom: 0px; + width: 10%; + text-align: center; +} + +.manage-reports-tags-add-btn:hover { + background-color: var(--color-3); +} + +.reports-civilians-tags-container { + display: flex; + flex-direction: column; + background-color: var(--color-1); + width: 100%; + border: 2px solid var(--color-3); + max-height: 150px; + margin-top: 10px; + overflow: scroll; +} + +.reports-civilians-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7px; + padding-bottom: 7px; + margin: auto; + margin-top: 10px; + margin-left: 5px; + margin-bottom: 0px; + width: 10%; + text-align: center; +} + +.reports-civilians-add-btn:hover { + background-color: var(--color-3); +} + +.reports-civilians-tags-holder { + overflow: auto; + margin: auto; + width: 95%; + max-height: 14vh; + user-select: none; + margin-top: 10px; +} + +.reports-item { + background-color: var(--color-5); + width: 100%; + margin: auto; + margin-bottom: 10px; + margin-top: 0px; + display: flex; + user-select: none; + flex-direction: column; +} + +.reports-item:hover { + background-color: var(--color-3); +} + +.reports-top-holder { + width: 100%; + height: 50%; + display: flex; + align-items: center; +} + +.reports-item-title { + font-size: 14px; + font-weight: lighter; + color: white; + margin: auto; + margin-left: 5px; + margin-top: 5px; + max-width: 25vh; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.reports-report-name { + font-size: 14px; + font-weight: lighter; + color: white; + margin: auto; + margin-right: 5px; + margin-top: 5px +} + +.reports-bottom-holder { + width: 100%; + height: 50%; + display: flex; + align-items: center; + margin-top: 5px; +} + +.reports-report-id { + font-size: 14px; + font-weight: lighter; + color: white; + margin: auto; + margin-left: 5px; + margin-bottom: 5px; +} + +.reports-report-time-ago { + font-size: 14px; + font-weight: lighter; + color: white; + margin: auto; + margin-right: 5px; + margin-bottom: 5px; +} + +span.tag-reports-input[contenteditable]:empty::before { + content: 'Input Tag'; +} + +.tag-reports-input { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + margin-top: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; + outline: none; + border: none; +} + + +.dmv-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 80.7vh; + width: 50%; + margin-top: 10px; + margin-left: 10px; +} + +.dmv-search-refresh { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: var(--color-10); + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; +} + +.dmv-search-refresh:hover { + background-color: #aa891c; +} + +.dmv-search-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.dmv-search-title:hover { + background-color: var(--color-3); +} + +.dmv-search-input { + background-color: var(--color-3); + color: white; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; + display: none; +} + +#dmv-search-input { + outline: none; + border: none; + width: 95%; + color: white; + font-size: 15px; + background-color: rgba(0, 0, 0, 0); + margin: auto; +} + +#dmv-search-input::placeholder { + color: white; +} + +.dmv-items { + display: flex; + flex-direction: column; + overflow: auto; + margin: auto; + margin-top: 10px; + width: 95%; + height: 100%; + margin-bottom: 15px; +} + +.vehicle-information-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 80.7vh; + width: 50%; + margin-top: 10px; + margin-left: 10px; + margin-right: 10px; +} + +.vehicle-information-save { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: #1b8f25; + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; + display: block; +} + +.vehicle-information-save:hover { + background-color: #1caa28; +} + +.add-charge:hover { + background-color: #1caa28; +} + +.vehicle-information-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 0px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: 0px; + width: 81%; + /* width: 66%; */ + align-items: center; + user-select: none; +} + +.dmv-item { + background-color: var(--color-5); + width: 100%; + height: 9vh; + margin: auto; + margin-bottom: 10px; + margin-top: 0px; + display: flex; + user-select: none; + +} + +.dmv-item:hover { + background-color: var(--color-3); +} + +.dmv-image { + width: 7vh; + height: 7vh; + margin-left: 10px; + margin-top: auto; + margin-bottom: auto; + object-fit: cover; +} + +.dmv-item-title { + font-size: 16px; + font-weight: lighter; + color: white; + padding-top: 2px; +} + +.dmv-tags { + display: flex; + overflow-x: auto; + width: 98%; + margin-top: 10px; + margin-bottom: 5px; +} + +.dmv-tag { + margin: auto; + margin-left: 0px; + margin-right: 6px; + padding: 4px; + padding-left: 7px; + padding-right: 7px; + border-radius: 10px; + color: white; + font-size: 12px; + font-weight: bolder; + background-color: #956E09; +} + +.dmv-bottom-info { + display: flex; + margin: auto; + width: 100%; +} + +.dmv-id { + color: white; + font-size: 13px; +} + +.vehicle-info-stuff { + display: flex; + flex-direction: row; + width: 95%; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; +} + +.vehicle-info-image { + width: 444px; + height: 269px; + object-fit: cover; +} + +.vehicle-info-inner-container { + display: flex; + flex-direction: column; + width: 55%; +} + +.vehicle-info-plate { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.vehicle-info-plate-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + background-color: rgba(0, 0, 0, 0); + width: 80%; +} + +.vehicle-info-owner { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.vehicle-info-owner-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + background-color: rgba(0, 0, 0, 0); + width: 80%; +} + +.vehicle-info-class { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.vehicle-info-class-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + background-color: rgba(0, 0, 0, 0); + width: 80%; +} + +.vehicle-info-model { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.vehicle-info-model-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + background-color: rgba(0, 0, 0, 0); + width: 80%; +} + +.vehicle-info-imageurl { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.vehicle-info-imageurl-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + background-color: rgba(0, 0, 0, 0); + width: 80%; +} + +.vehicle-info-icon { + color: white; + font-size: 16px; + margin-left: 10px +} + +.vehicle-info-line { + background-color: var(--color-3); + height: 2px; + margin-left: 10px; + margin-bottom: 10px; +} + +.vehicle-info-tags-container { + display: flex; + flex-direction: column; + border: 2px solid var(--color-3); + color: white; + font-size: 18px; + font-weight: bolder; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + height: fit-content; + align-items: center; + user-select: none; +} + +.vehicle-info-tags-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.vehicle-info-tags-add-btn:hover { + background-color: var(--color-3); +} + +.vehicle-info-tags-add-btn { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 7.25px; + padding-bottom: 7.25px; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + margin-left: 5px; + margin-right: 0px; + width: 10%; + text-align: center; +} + +.vehicle-info-tags-holder { + overflow: auto; + margin: auto; + margin-top: 7px; + margin-bottom: 7px; + width: 95%; + max-height: 14vh; + user-select: none; +} + +.vehicle-info-tag { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + margin-bottom: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; +} + +.vehicle-info-content { + width: 93%; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + border: none; + outline: none; + min-height: 26.9vh; + resize: none; + background-color: var(--color-5); + color: white; + font-size: 16px; + padding: 10px; +} + +.vehicle-tags { + display: flex; + overflow-x: auto; + width: 98%; + margin-top: 5px; + margin-bottom: 5px; +} + +.vehicle-tag { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + padding: 4px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: white; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; + outline: none; + border: none; +} + +.stafflogs-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 80.7vh; + width: 66%; + margin-top: 10px; + margin-left: 10px; + margin-right: 10px; + overflow: auto; +} + +.stafflogs-box { + display: flex; + flex-direction: column; + height: 80.7vh; + width: 100%; + margin-top: 2px; + margin-left: 1px; + margin-right: 1px; + overflow: auto; +} + +.stafflogs-box > p { + color: white; + font-size: 1.3vh; + padding-left: 1vh; +} + +.stafflogs-box-title { + align-self: center; + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-left: 10px; + margin-right: 10px; + width: 97.5%; + height: 25px; + align-items: center; + user-select: none; +} + +.leaderboard-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 80.7vh; + width: 33%; + margin-top: 10px; + margin-left: 4px; + margin-right: 10px; + overflow: auto; +} + +.leaderboard-box { + display: flex; + flex-direction: column; + height: 80.7vh; + width: 100%; + margin-top: 2px; + margin-left: 1px; + margin-right: 1px; + overflow: auto; +} + +.leaderboard-box-test { + margin: 0; + padding-top:0.8vh; + color: white; + font-size: 1.3vh; + padding-left: 1vh; +} + +.leaderboard-title { + align-self: center; + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-left: 10px; + margin-right: 10px; + width: 95.5%; + height: 25px; + align-items: center; + user-select: none; +} + +/* Vehicle Colors :( so long lol */ + +.black-color { + background-color: #0e0e0e; + color: white; +} + +.darksilver-color { + background-color: #333333; + color: white; +} + +.silver-color { + background-color: #333333; + color: white; +} + +.bluesilver-color { background-color: #c4d4e0; } + +.matteblack-color { + background-color: #141414; + color: white; +} + +.gray-color { + background-color: #808080; + color: white; +} + +.lightgray-color { background-color: #D3D3D3; } +.utilgunmetal-color { background-color: #39434d; } +.red-color { background-color: #c00e1a; } +.torinored-color { background-color: #da1918; } +.formulared-color { background-color: #b6111b; } +.blazered-color { background-color: #a51e23; } +.gracefulred-color { background-color: #7b1a22; } +.garnetred-color { background-color: #8e1b1f; } +.desertred-color { background-color: #6f1818; } +.cabernetred-color { background-color: #49111d; } +.candyred-color { background-color: #b60f25; } +.orange-color { background-color: #f78616; } +.gold-color { background-color: #c2944f; } +.mattedarkred-color { background-color: #732021; } +.matteyellow-color { background-color: #ffc91f; color: black } +.brightred-color { background-color: #de0f18; } +.darkgreen-color { background-color: #132428; } +.racingreen-color { background-color: #122e2b; } +.seagreen-color { background-color: #12383c; } +.olivegreen-color { background-color: #31423f; } +.green-color { background-color: #155c2d; } +.gasolinebluegreen-color { background-color: #1b6770; } +.mattelimegreen-color { background-color: #66b81f; } +.seawash-color { background-color: #65867f; } +.midnightblue-color { background-color: #222e46; } +.darkblue-color { background-color: #233155; } +.saxonyblue-color { background-color: #304c7e; } +.blue-color { background-color: #345df3; } +.diamondblue-color { background-color: #d6e7f1; } +.brightblue-color { background-color: #0b9cf1; } +.purpleblue-color { background-color: #2f2d52; } +.ultrablue-color { background-color: #2354a1; } +.lightningblue-color { background-color: #2446a8; } +.mattedarkblue-color { background-color: #1f2852; } +.matteblue-color { background-color: #253aa7; } +.yellow-color { background-color: #fbe212; color: black } +.bronze-color { background-color: #916532; } +.lime-color { background-color: #98d223; } +.champagne-color { background-color: #9b8c78; } +.beige-color { background-color: #F5F5DC; } +.darkivory-color { background-color: #473f2b; } +.brown-color { background-color: #3a2a1b; } +.lightbrown-color { background-color: #b5a079; } +.beechwood-color { background-color: #a4965f; } +.chocoorange-color { background-color: #752b19; } +.cream-color { background-color: #f7edd5; } +.white-color { background-color: #f0f0f0; color: black } +.steel-color { background-color: #6a747c; } +.blacksteel-color { background-color: #354158; } +.aluminium-color { background-color: #9ba0a8; } +.chrome-color { background-color: #5870a1; } +.wornwhite-color { background-color: #eae6de; color: black } +.offwhite-color { background-color: #dfddd0; color: black } +.lightorange-color { background-color: #f9a458; } +.pink-color { background-color: #f21f99; } +.blackblue-color { background-color: #0a0c17; } +.blackpurple-color { background-color: #0c0d18; } +.blackred-color { background-color: #0e0d14; } +.darkpurple-color { background-color: #621276; } +.olivedrab-color { background-color: #696748; } +.tan-color { background-color: #c3b492; } + +.reports-remove-image:hover { + background-color: #950909; +} + +.bolo-remove-image:hover { + background-color: #950909; +} + +.incidents-delete:hover { + background-color: #950909; +} + +.bolo-delete:hover { + background-color: #950909; +} + +.weapons-delete:hover { + background-color: #950909; +} + +.reports-delete:hover { + background-color: #950909; +} + +.remove-bulletin:hover { + background-color: #950909; +} + +.search-vehicle:hover { + background-color: #956E09; +} + +.mark-code-5:hover { + background-color: #0B9509; +} + +.remove-code-5:hover { + background-color: #950909; +} + +.mark-stolen:hover { + background-color: #0B9509; +} + +.remove-stolen:hover { + background-color: #950909; +} + +.toggle-duty:hover { + background-color: #956E09; +} + +.set-callsign:hover { + background-color: #0B9509; +} + +.set-radio:hover { + background-color: #09956b; +} + +.incidents-ghost-holder { + overflow: auto; + max-height: 80vh; + margin-top: 10px; + margin-bottom: 10px; +} + +.incidents-charges-table { + display: flex; + flex-direction: column; + width: 100%; + height: 100%; + margin: auto; + margin-top: -25vh; +} + +.incidents-charges-table-container { + background-color: var(--color-5); + width: 155vh; + height: 85vh; + margin: auto; + display: flex; + flex-direction: column; + z-index: 9998; + user-select: none; +} + +.incidents-charges-title-container { + width: 95%; + height: 11vh; + background-color: var(--color-4); + margin: auto; + margin-top: 1.5vh; + margin-bottom: 0vh; + display: flex; + flex-direction: column; + border: 2px solid var(--color-4); +} + +.incidents-charges-title { + color: white; + margin: auto; + text-align: center; + align-items: center; + font-size: 22px; + font-weight: bolder; + margin-top: 1vh; +} + +.incidents-charges-title span { + color: #B4A684; + font-size: 19px; +} + +.incidents-charges-title-description { + color: white; + margin: auto; + background-color: var(--color-5); + text-align: left; + font-size: 17px; + padding: .5vh; + width: 97%; + margin-bottom: 1.5vh; +} + +.manage-incidents-editing-title { + background-color: var(--color-3); + color: white; + font-size: 15px; + font-weight: lighter; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: 0px; + margin-left: 10px; + width: 95%; + align-items: center; + user-select: none; +} + + +.current-charges-container { + width: 95%; + border: 2px solid var(--color-4); + margin: auto; + margin-top: 1.5vh; + margin-bottom: 0vh; + display: flex; +} + +.current-charges-inner-container { + background-color: var(--color-4); + width: 35vh; + height: fit-content; + margin: auto; + margin-left: 1vh; + margin-right: 0vh; + text-align: center; + display: flex; +} + +.current-charges-title { + color: white; + font-size: 19px; + font-weight: bolder; + padding: .25vh; + padding-left: 6vh; + padding-right: 6vh; + margin: auto; +} + +#current-charges-holder { + display: flex; + margin: auto; + width: 110vh; + margin-left: 1vh; + margin-right: 1vh; + overflow: hidden; +} + +.current-charges-tag { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + padding: 5px; + padding-left: 7px; + padding-right: 7px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; + background-color: white; + color: black; + white-space: nowrap; +} + +.offenses-title-container { + width: fit-content; + height: fit-content; + background-color: var(--color-4); + margin-left: 3.75vh; + margin-top: 1.5vh; + margin-bottom: 0vh; + display: flex; + border: 2px solid var(--color-4); +} + +.offenses-title { + color: white; + padding: .7vh; + padding-right: 3vh; + font-weight: bolder; + font-size: 1.4vh; +} + +.offenses-prepend-holder { + width: 95%; + background-color: var(--color-4); + margin: auto; + margin-top: 1.5vh; + margin-bottom: 0vh; + border: 2px solid var(--color-4); + display: grid; + grid-template-columns: auto auto auto auto; + grid-template-rows: auto auto auto auto; + row-gap: 0vh; + overflow: auto; +} + +.offense-item { + background-color: #0B9509; + border: 1.5px solid black; + height: 5.0vh; + margin: .5vh; + flex-direction: column; + color: white; + display: inline-block; + overflow: auto; + transition: all 0.15s ease-in-out; +} + +.offense-item:hover { + transform: scale(1.02); + transition: all 0.15s ease-in-out; +} + +.offense-item-offense { + margin: auto; + margin-left: .5vh; + margin-top: .5vh; + color: white; + font-size: 1.2vh; + font-weight: bold; +} + +.offfense-item-name { + margin: auto; + margin-right: .5vh; + margin-top: .5vh; + color: white; + font-size: 1.2vh; + font-weight: bold; +} + +.offense-item-id { + margin: auto; + margin-left: .5vh; + margin-bottom: .5vh; + color: white; + font-size: 1.2vh; + font-weight: bold; +} + +.offfense-item-months { + margin: auto; + margin-right: .5vh; + margin-bottom: .5vh; + color: white; + font-size: 1.2vh; + font-weight: bold; +} + +.offenses-main-container { + overflow: auto; + margin: auto; + margin-top: 1vh; + margin-bottom: 1vh; + width: 100%; +} + +.callsign-container { + display: flex; + flex-direction: column; + width: 100%; + height: 100%; + margin-top: 40.5vh; +} + +.radio-container { + display: flex; + flex-direction: column; + width: 100%; + height: 100%; + margin-top: 40.5vh; +} + +.radio-inner-container { + background-color: var(--color-5); + width: 30vh; + height: 17.5vh; + margin: auto; + display: flex; + flex-direction: column; + z-index: 9998; + border: .45vh solid white; +} + +.radio-title { + color: white; + font-size: 2vh; + font-weight: bold; + margin: auto; + margin-top: 2vh; + margin-bottom: 0vh; +} + +.radio-input { + width: 20vh; + margin: auto; + margin-top: 1.5vh; + margin-bottom: 0vh; + background-color: var(--color-6); + border: none; + outline: none; + font-size: 2vh; + color: white; + text-align: center; + padding: 1vh; +} + +.radio-buttons { + width: 20vh; + margin: auto; + margin-top: 1.5vh; + display: flex; + flex-direction: row; +} + +.radio-cancel { + color: white; + padding: .5vh; + padding-left: 1vh; + padding-right: 1vh; + background-color: #D77A0D; + border-radius: 1vh; + margin: auto; + user-select: none; +} + +.radio-cancel:hover { + background-color: #f18f1e; +} + +.radio-submit { + color: white; + padding: .5vh; + padding-left: 1vh; + padding-right: 1vh; + background-color: #0B9509; + border-radius: 1vh; + margin: auto; + user-select: none; +} + +.radio-submit:hover { + background-color: #15ac12; +} + +.callsign-inner-container { + background-color: var(--color-5); + width: 30vh; + height: 17.5vh; + margin: auto; + display: flex; + flex-direction: column; + z-index: 9998; + border: .45vh solid white; +} + +.callsign-title { + color: white; + font-size: 2vh; + font-weight: bold; + margin: auto; + margin-top: 2vh; + margin-bottom: 0vh; +} + +.callsign-input { + width: 20vh; + margin: auto; + margin-top: 1.5vh; + margin-bottom: 0vh; + background-color: var(--color-6); + border: none; + outline: none; + font-size: 2vh; + color: white; + text-align: center; + padding: 1vh; +} + +.callsign-buttons { + width: 20vh; + margin: auto; + margin-top: 1.5vh; + display: flex; + flex-direction: row; +} + +.callsign-cancel { + color: white; + padding: .5vh; + padding-left: 1vh; + padding-right: 1vh; + background-color: #D77A0D; + border-radius: 1vh; + margin: auto; + user-select: none; +} + +.callsign-cancel:hover { + background-color: #f18f1e; +} + +.callsign-submit { + color: white; + padding: .5vh; + padding-left: 1vh; + padding-right: 1vh; + background-color: #0B9509; + border-radius: 1vh; + margin: auto; + user-select: none; +} + +.callsign-submit:hover { + background-color: #15ac12; +} + + +/* Keep At Bottom */ + +.red-tag { + background-color: #950909; +} + +.orange-tag { + background-color: #956E09; +} + +.green-tag { + background-color: #0B9509; +} + +.white-tag { + display: inline-block; + text-decoration: none; + margin: auto; + margin-left: 0px; + margin-right: 10px; + margin-bottom: 6px; + padding: 7px; + padding-left: 8px; + padding-right: 8px; + border-radius: 10px; + color: black; + font-size: 12px; + font-weight: 600; + background-color: white; + user-select: none; + width: fit-content; + background-color: white; + color: black; +} + +.orange-penal-code { + background-color: #D77A0D; +} + +.green-penal-code { + background-color: #0B9509; +} + +.red-penal-code { + background-color: #950909; +} + +.header-pin { + padding-right: 5px; +} + +.priority-1 { + background-color: #bb0404; +} + +.priority-2 { + background-color: #ce7808; +} + +.call-bottom-info > span { + padding-right: 0.5vh; +} + +.call-attach:hover { + background-color: #1caa28; +} + +.Set-Waypoint:hover { + background-color: #f18f1e; +} + +.call-detach:hover { + background-color: #950909; +} + +.remove-blip:hover { + background-color: #950909; +} + +.dispatch-attached-units { + display: flex; + flex-direction: column; + width: 100%; + height: 100%; +} + +.active-unit-item:hover { + background-color: var(--color-3); +} + +.active-calls-item:hover { + background-color: var(--color-3); +} + +.dispatch-attached-units-container { + background-color: var(--color-1); + width: 92vh; + height: 46vh; + margin: auto; + display: flex; + flex-direction: column; + z-index: 1; + border: 2px solid #FFFFFF; + display: none; + margin-top: 32.5vh; +} + +.dispatch-attached-units-title { + background-color: var(--color-4); + color: white; + font-size: 20px; + font-weight: bolder; + text-align: center; + padding-top: 15px; + padding-bottom: 15px; + width: 95%; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + user-select: none; +} + +.dispatch-attached-units-holder { + margin: auto; + margin-top: 10px; + margin-bottom: 10px; + overflow: auto; + height: 37.8vh; + display: flex; + flex-direction: column; + width: 95%; +} + +.dispatch-attached-unit-item { + padding: 10px; + height: 3vh; + background-color: var(--color-5); + display: flex; + align-items: center; + margin-bottom: 5px; +} + +.attached-units:hover { + background-color: rgb(156, 156, 156); +} + +.Set-Dispatch-Waypoint:hover { + background-color: #f18f1e; +} + +.call-dispatch-detach:hover { + background-color: #950909; +} + +.incidents-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 0px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: 0px; + width: 80%; + /* width: 66%; */ + align-items: center; + user-select: none; +} + +.incidents-title:hover { + background-color: var(--color-3); +} + +.incidents-search-refresh { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: var(--color-10); + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; +} + +.incidents-search-refresh:hover { + background-color: #aa891c; +} + +.respond-calls { + display: flex; + flex-direction: column; + width: 100%; + height: 100%; + margin-top: 32.5vh; +} + +.respond-calls-container { + background-color: var(--color-5); + width: 70vh; + min-height: 30vh; + max-height: 40vh; + margin: auto; + display: flex; + flex-direction: column; + z-index: 9998; + overflow: auto; +} + +.respond-calls-title { + background-color: var(--color-4); + color: white; + font-size: 20px; + font-weight: bolder; + text-align: center; + padding-top: 15px; + padding-bottom: 15px; + width: 95%; + margin: auto; + margin-top: 15px; + margin-bottom: 0px; + user-select: none; +} + +.respond-calls-input { + width: 92.5%; + margin-top: 10px; + margin-bottom: 10px; + outline: solid 3px var(--color-4); + margin-left: 27px; + min-height: 21.5vh; + max-height: 21.5vh; + border: none; + padding: 10px 10px; + background-color: transparent; + color: #dadada; + resize: none; + font-size: 16px; +} + +.respond-calls-input:focus { + outline: solid 3px var(--color-4); +} + +.respond-calls-responses { + width: 95%; + margin-left: 1.7vh +} + +.respond-calls-response { + color: #dadada; + margin-top: 0.5vh; + padding: 0.5vh; + background-color: rgba(32, 32, 32, 0.5); + color: #FFFFFF; +} + +.offenses-search-area { + width: 95%; + border: 2px solid var(--color-4); + height: 3vh; + margin: 1.5vh auto 0vh; + display: flex; +} + +.offenses-search { + background: transparent; + border: none; + outline: none; + font-size: 1.2vh; + color: rgb(255, 255, 255); + font-family: Roboto, sans-serif; + font-style: normal; + font-weight: normal; + margin-left: 1vh; + padding-top: 10px; + padding-bottom: 10px; +} + +.impound-form { + display: flex; + flex-direction: column; + + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + + width: 750px; + height: 375px; + background: var(--color-5); + border: 1px solid white; +} + +.impound-form > form { + position: absolute; + left: 10%; + width: 73%; + height: 100%; +} + +.impound-form > form > input { + border: none; + outline: none; + font-size: 24px; + color: white; + + background: transparent; + border: 1px solid rgb(168, 168, 168); + + width: 100%; + height: 13.5%; + + margin-top: 20px; + padding-left: 10%; +} + +.impound-form > form > i { + position: absolute; + color: white; + font-size: 24px; + margin-top: 37.5px; + margin-left: 12.6px; +} + +.impound-buttons { + position: absolute; + margin: auto; + display: flex; + flex-direction: row; + bottom: 6%; + left: 10%; +} + +.impound-cancel { + color: white; + padding: .5vh; + padding-left: 1vh; + padding-right: 1vh; + background-color: #D77A0D; + border-radius: 1vh; + margin: auto; + user-select: none; +} + +.impound-cancel:hover { + background-color: #f18f1e; +} + +.impound-submit { + color: white; + padding: .5vh; + padding-left: 1vh; + padding-right: 1vh; + background-color: #0B9509; + border-radius: 1vh; + margin: auto; + user-select: none; + margin-left: 10px; +} + +.impound-submit:hover { + background-color: #15ac12; +} + +.status-impound:hover { + background-color: #ac8312; +} + +.remove-impound:hover { + background-color: #ac1212; +} + +.impound-vehicle:hover { + background-color: #12ac1f; +} + +.impound-fee { + color: white; +} + +.dispatch-reply:hover { + background-color: var(--color-1); +} +.display_hidden{ + display: none; +} + +.cams-page-container { + background-color: var(--color-9); + border-radius: 15px; + position: absolute; + width: 96.5%; + height: 96.5%; + left: 2.0%; + top: 1.5%; + display: none; + overflow: auto +} + +.cams-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 80.7vh; + width: 100%; + margin-top: 10px; + margin-left: 10px; + margin-right: 10px; + overflow: auto; +} + +.cams-item { + display: grid; + grid-template-columns: 1fr 1fr 1fr 1fr 1fr; + grid-auto-flow: row; + gap: 15px 15px; + overflow: auto; + margin-bottom: 10px; + + +} + +.cams-items { + background-color: var(--color-5); + height: auto; + padding: 10px; + text-align: center; + margin: 10px; + color: white; + font-size: 20px; + color: white; + overflow: visible; + +} + +.cams-image { + height:125px; + width: auto; + margin: 10px; + +} + +.cams-items:hover { + background-color: var(--color-3); +} + +.weapons-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 80.7vh; + width: 50%; + margin-top: 10px; + margin-left: 10px; +} + +.weapons-search-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.weapons-search-title:hover { + background-color: var(--color-3); +} + +.weapons-search-input { + background-color: var(--color-3); + color: white; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; + display: none; +} + +#weapons-search-input { + outline: none; + border: none; + width: 95%; + color: white; + font-size: 15px; + background-color: rgba(0, 0, 0, 0); + margin: auto; +} + +#weapons-search-input::placeholder { + color: white; +} + +.weapons-items { + display: flex; + flex-direction: column; + overflow: auto; + margin: auto; + margin-top: 10px; + width: 95%; + height: 100%; + margin-bottom: 15px; +} + +.weapon-information-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 80.7vh; + width: 50%; + margin-top: 10px; + margin-left: 10px; + margin-right: 10px; +} + +.weapon-information-new { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: #8f1b1b; + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; + display: block; +} + +.weapon-information-new:hover { + background-color: #aa1c1c; +} + +.weapon-information-save { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: #1b8f25; + margin: auto; + margin-left: 5px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; + display: block; +} + +.weapon-information-save:hover { + background-color: #1caa28; +} + +.weapon-information-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 0px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-right: 0px; + width: 81%; + /* width: 66%; */ + align-items: center; + user-select: none; +} + +.weapon-info-stuff { + display: flex; + flex-direction: row; + width: 95%; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; +} + +.weapon-info-image { + width: 444px; + height: 269px; + object-fit: cover; +} + +.weapon-info-imageurl { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.weapon-info-imageurl-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + background-color: rgba(0, 0, 0, 0); + width: 80%; +} + +.weapon-info-inner-container { + display: flex; + flex-direction: column; + width: 55%; +} + +.weapon-info-serial { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.weapon-info-serial-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + background-color: rgba(0, 0, 0, 0); + width: 80%; +} + +.weapon-info-icon { + color: white; + font-size: 16px; + margin-left: 10px +} + +.weapon-info-line { + background-color: var(--color-3); + height: 2px; + margin-left: 10px; + margin-bottom: 10px; +} + +.weapon-info-model { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.weapon-info-model-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + background-color: rgba(0, 0, 0, 0); + width: 80%; +} + +.weapon-info-owner { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.weapon-info-owner-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + background-color: rgba(0, 0, 0, 0); + width: 80%; +} + +.weapon-info-class { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.weapon-info-class-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + background-color: rgba(0, 0, 0, 0); + width: 80%; +} + +.weapon-info-imageurl { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.weapon-info-imageurl-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + background-color: rgba(0, 0, 0, 0); +} + +.weapon-info-content { + width: 93%; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + border: none; + outline: none; + min-height: 30.9vh; + resize: none; + background-color: var(--color-5); + color: white; + font-size: 16px; + padding: 10px; +} + +.weapons-item-title { + font-size: 16px; + font-weight: lighter; + color: white; + padding-top: 2px; +} + +.weapons-image { + width: 7vh; + height: 7vh; + margin-left: 10px; + margin-top: auto; + margin-bottom: auto; + object-fit: cover; +} + +.weapons-item-title { + font-size: 16px; + font-weight: lighter; + color: white; + padding-top: 2px; +} + +.weapons-bottom-info { + display: flex; + margin: auto; + width: 100%; +} + +.weapons-id { + color: white; + font-size: 13px; +} + +.weapons-item { + background-color: var(--color-5); + width: 100%; + height: 9vh; + margin: auto; + margin-bottom: 10px; + margin-top: 0px; + display: flex; + user-select: none; + +} + +.weapons-item:hover { + background-color: var(--color-3); +} + +.weapons-image { + width: 7vh; + height: 7vh; + margin-left: 10px; + margin-top: auto; + margin-bottom: auto; + object-fit: cover; +} + +.weapons-item-title { + font-size: 16px; + font-weight: lighter; + color: white; + padding-top: 2px; +} + +.vehicle-info-points { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; + margin-top: 5px; +} + +input[type="range"].vehicle-info-points-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 5px; + color: white; + width: 80%; +} + +input[type="range"].vehicle-info-points-input::-moz-range-thumb { + box-shadow: none; + border: 2px solid grey; + height: 16px; + width: 16px; + border-radius: 16px; + background: white; +} + +input[type="range"].vehicle-info-points-input::-moz-range-track { + width: 100%; + height: 2px; + box-shadow: none; + background: var(--color-8); + border-radius: 0px; + border: 0px; +} + +.manage-profile-apartment { + color: white; + margin-left: 10px; + font-size: 15px; + user-select: none; +} + +.manage-profile-apartment-input { + border: none; + outline: none; + margin-left: 2.5px; + font-size: 16px; + margin-top: 2px; + color: white; + background-color: rgba(0, 0, 0, 0); +} + +/* Charges Hover */ + +.ccontextmenu { + position: absolute; + width: fit-content; + padding: 2px; + margin: 0; + border: 1px solid var(--color-3); + background: var(--color-5); + z-index: 100; + border-radius: 3px; + box-shadow: 1px 1px 4px rgba(0,0,0,.2); + opacity: 0; + transform: translate(0, 15px) scale(.95); + transition: transform 0.1s ease-out, opacity 0.1s ease-out; + pointer-events: none; +} + +.ccontextmenu-item { + display: block; + position: relative; + margin: 0; + padding: 0; + /* white-space: nowrap; */ + max-width: 34ch; + word-wrap:break-word; +} + +.ccontextmenu-text { + display: block; + color: white; + font-size: 13px; + cursor: pointer; + border: 1px solid transparent; + /* white-space: nowrap; */ + padding: 6px 8px; + border-radius: 3px; + max-width: 34ch; + word-wrap:break-word; +} + +.ccontextmenu-text { + outline: 0 none; + text-decoration: none; +} + +.ccontextmenu-text .fa { + position: absolute; + left: 8px; + top: 50%; + transform: translateY(-50%); +} + +.ccontextmenu-item-disabled { + opacity: .5; + pointer-events: none; +} + +.ccontextmenu-item-disabled .ccontextmenu-text { + cursor: default; +} + +.ccontextmenu-item-submenu::after { + content: ""; + position: absolute; + right: 6px; + top: 50%; + transform: translateY(-50%); + border: 5px solid transparent; + border-left-color: #808080; +} + +.ccontextmenu-item-submenu:hover::after { + border-left-color: #fff; +} + +.ccontextmenu-show, +.ccontextmenu-item:hover > .ccontextmenu { + opacity: 1; + transform: translate(0, 0) scale(1); + pointer-events: auto; + z-index: 9999; +} + +.map-page-container { + background-color: var(--color-9); + border-radius: 15px; + position: absolute; + width: 96.5%; + height: 96.5%; + left: 2.0%; + top: 1.5%; + display: none; +} + +.calls-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 80.7vh; + width: 30%; + margin-top: 10px; + margin-left: 10px; +} + +.calls-search-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; +} + +.calls-search-title:hover { + background-color: var(--color-3); +} + +.calls-search-input { + background-color: var(--color-3); + color: white; + padding-top: 10px; + padding-bottom: 10px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + width: 95%; + align-items: center; + user-select: none; + display: none; +} + +#calls-search-input { + outline: none; + border: none; + width: 95%; + color: white; + font-size: 15px; + background-color: rgba(0, 0, 0, 0); + margin: auto; +} + +#calls-search-input::placeholder { + color: white; +} + +.map-container { + background-color: var(--color-1); + border: 2px solid var(--color-3); + display: flex; + flex-direction: column; + height: 80.7vh; + width: 70%; + margin-top: 10px; + margin-left: 10px; + margin-right: 10px; +} + +.map-clear { + width: 13.7%; + font-size: 15px; + font-weight: lighter; + padding-top: 7px; + padding-bottom: 7px; + background-color: #8f1b1b; + margin: auto; + margin-left: 5px; + margin-right: 10px; + margin-top: 10px; + margin-bottom: 0px; + color: white; + text-align: center; + user-select: none; + display: block; +} + +.map-clear:hover { + background-color: #aa1c1c; +} + +.map-title { + background-color: var(--color-4); + color: white; + font-size: 18px; + font-weight: bolder; + padding-top: 5px; + padding-bottom: 5px; + text-align: center; + margin: auto; + margin-top: 10px; + margin-bottom: 0px; + margin-left: 10px; + margin-right: 5px; + width: 98%; + align-items: center; + user-select: none; +} + +.map-item { + border: 2px solid var(--color-3); + position: absolute; + width: 58%; + height: 88.5%; + left: 40.6%; + top: 8%; + margin-bottom: 15px; +} + +.leaflet-marker-pane { + z-index: 600; +} + +.leaflet-tooltip-pane { + z-index: 650; +} + +.leaflet-tooltip-right { + margin-left: 6px; +} diff --git a/v2 b/v2 new file mode 100644 index 00000000..69b99b12 --- /dev/null +++ b/v2 @@ -0,0 +1 @@ +April fools.