diff --git a/package.json b/package.json index 9d51eae..3bac8dc 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "react": "18.2.0", "react-dom": "18.2.0", "react-native": "0.73.4", + "react-native-modal": "^13.0.1", "react-native-pager-view": "^6.2.3", "react-native-reanimated": "~3.6.2", "react-native-safe-area-context": "4.8.2", diff --git a/public/assets/fonts/OFL.txt b/public/assets/fonts/OFL.txt deleted file mode 100644 index 76df3b5..0000000 --- a/public/assets/fonts/OFL.txt +++ /dev/null @@ -1,93 +0,0 @@ -Copyright 2020 The Poppins Project Authors (https://github.com/itfoundry/Poppins) - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/public/assets/fonts/Poppins-Black.ttf b/public/assets/fonts/Poppins-Black.ttf deleted file mode 100644 index a9520b7..0000000 Binary files a/public/assets/fonts/Poppins-Black.ttf and /dev/null differ diff --git a/public/assets/fonts/Poppins-BlackItalic.ttf b/public/assets/fonts/Poppins-BlackItalic.ttf deleted file mode 100644 index ebfdd70..0000000 Binary files a/public/assets/fonts/Poppins-BlackItalic.ttf and /dev/null differ diff --git a/public/assets/fonts/Poppins-Bold.ttf b/public/assets/fonts/Poppins-Bold.ttf deleted file mode 100644 index b94d47f..0000000 Binary files a/public/assets/fonts/Poppins-Bold.ttf and /dev/null differ diff --git a/public/assets/fonts/Poppins-BoldItalic.ttf b/public/assets/fonts/Poppins-BoldItalic.ttf deleted file mode 100644 index e2e6445..0000000 Binary files a/public/assets/fonts/Poppins-BoldItalic.ttf and /dev/null differ diff --git a/public/assets/fonts/Poppins-ExtraBold.ttf b/public/assets/fonts/Poppins-ExtraBold.ttf deleted file mode 100644 index 8f008c3..0000000 Binary files a/public/assets/fonts/Poppins-ExtraBold.ttf and /dev/null differ diff --git a/public/assets/fonts/Poppins-ExtraBoldItalic.ttf b/public/assets/fonts/Poppins-ExtraBoldItalic.ttf deleted file mode 100644 index b2a9bf5..0000000 Binary files a/public/assets/fonts/Poppins-ExtraBoldItalic.ttf and /dev/null differ diff --git a/public/assets/fonts/Poppins-ExtraLight.ttf b/public/assets/fonts/Poppins-ExtraLight.ttf deleted file mode 100644 index ee62382..0000000 Binary files a/public/assets/fonts/Poppins-ExtraLight.ttf and /dev/null differ diff --git a/public/assets/fonts/Poppins-ExtraLightItalic.ttf b/public/assets/fonts/Poppins-ExtraLightItalic.ttf deleted file mode 100644 index e392492..0000000 Binary files a/public/assets/fonts/Poppins-ExtraLightItalic.ttf and /dev/null differ diff --git a/public/assets/fonts/Poppins-Italic.ttf b/public/assets/fonts/Poppins-Italic.ttf deleted file mode 100644 index 4620399..0000000 Binary files a/public/assets/fonts/Poppins-Italic.ttf and /dev/null differ diff --git a/public/assets/fonts/Poppins-Light.ttf b/public/assets/fonts/Poppins-Light.ttf deleted file mode 100644 index 2ab0221..0000000 Binary files a/public/assets/fonts/Poppins-Light.ttf and /dev/null differ diff --git a/public/assets/fonts/Poppins-LightItalic.ttf b/public/assets/fonts/Poppins-LightItalic.ttf deleted file mode 100644 index 6f9279d..0000000 Binary files a/public/assets/fonts/Poppins-LightItalic.ttf and /dev/null differ diff --git a/public/assets/fonts/Poppins-Medium.ttf b/public/assets/fonts/Poppins-Medium.ttf deleted file mode 100644 index e90e87e..0000000 Binary files a/public/assets/fonts/Poppins-Medium.ttf and /dev/null differ diff --git a/public/assets/fonts/Poppins-MediumItalic.ttf b/public/assets/fonts/Poppins-MediumItalic.ttf deleted file mode 100644 index d8a251c..0000000 Binary files a/public/assets/fonts/Poppins-MediumItalic.ttf and /dev/null differ diff --git a/public/assets/fonts/Poppins-Regular.ttf b/public/assets/fonts/Poppins-Regular.ttf deleted file mode 100644 index be06e7f..0000000 Binary files a/public/assets/fonts/Poppins-Regular.ttf and /dev/null differ diff --git a/public/assets/fonts/Poppins-SemiBold.ttf b/public/assets/fonts/Poppins-SemiBold.ttf deleted file mode 100644 index dabf7c2..0000000 Binary files a/public/assets/fonts/Poppins-SemiBold.ttf and /dev/null differ diff --git a/public/assets/fonts/Poppins-SemiBoldItalic.ttf b/public/assets/fonts/Poppins-SemiBoldItalic.ttf deleted file mode 100644 index 29d5f74..0000000 Binary files a/public/assets/fonts/Poppins-SemiBoldItalic.ttf and /dev/null differ diff --git a/public/assets/fonts/Poppins-Thin.ttf b/public/assets/fonts/Poppins-Thin.ttf deleted file mode 100644 index f5c0fdd..0000000 Binary files a/public/assets/fonts/Poppins-Thin.ttf and /dev/null differ diff --git a/public/assets/fonts/Poppins-ThinItalic.ttf b/public/assets/fonts/Poppins-ThinItalic.ttf deleted file mode 100644 index b910089..0000000 Binary files a/public/assets/fonts/Poppins-ThinItalic.ttf and /dev/null differ diff --git a/public/assets/img/warnnign.png b/public/assets/img/warnnign.png new file mode 100644 index 0000000..9a2a32e Binary files /dev/null and b/public/assets/img/warnnign.png differ diff --git a/src/screens/SalesInspector/index.tsx b/src/screens/SalesInspector/index.tsx index cc9d60b..62795e7 100644 --- a/src/screens/SalesInspector/index.tsx +++ b/src/screens/SalesInspector/index.tsx @@ -5,12 +5,14 @@ import useAuth from '@hooks/useAuth'; import SellerServices from '@services/SellerServices'; import ISeller from '@interfaces/Seller'; import { View } from 'react-native'; +import Modal from 'react-native-modal'; const SalesInpector = ({ route }) => { const navigation = useNavigation(); const { idVendedor } = route.params; const { user } = useAuth(); const [seller, setSeller] = useState(null); + const [isModalVisible, setIsModalVisible] = useState(false); useEffect(() => { const fetchData = async () => { @@ -28,6 +30,18 @@ const SalesInpector = ({ route }) => { navigation.goBack(); }; + const toggleModal = () => { + setIsModalVisible(!isModalVisible); + }; + + const handleDelete = async () => { + try { + console.log('DELETADO'); + } catch (error) { + console.error('Erro ao excluir vendedor:', error); + } + }; + return ( @@ -47,11 +61,29 @@ const SalesInpector = ({ route }) => { {seller?.email || 'user123@gmail.com'} - + + + + + + + Tem certeza que deseja excluir esse vendedor? + + + + Sim + + + Voltar + + + diff --git a/src/screens/SalesInspector/styles.ts b/src/screens/SalesInspector/styles.ts index bdfc5a0..f4d29b8 100644 --- a/src/screens/SalesInspector/styles.ts +++ b/src/screens/SalesInspector/styles.ts @@ -84,3 +84,61 @@ export const ImageVectorLixeira = styled(Image)` width: 24px; height: 24px; `; + +export const ContentModal = styled(View)` + background-color: white; + padding: 32px 24px; + gap: 8px; + border-radius: 8px; +`; + +export const WrapperConteudo = styled(View)` + display: flex; + justify-content: center; + align-items: center; +`; + +export const ImageWarning = styled(Image)` + width: 48px; + height: 48px; +`; + +export const TextModal = styled(Text)` + font-family: Poppins; + font-size: 14px; + margin: 16px auto; + text-align: center; + letter-spacing: 0.5px; +`; + +export const BtnYes = styled(TouchableOpacity)` + background-color: #e5484d; + border-radius: 8px; + padding: 16px; + display: flex; + justify-content: center; + align-items: center; +`; + +export const TitleBtnYes = styled(Text)` + font-family: PoppinsBold; + color: #f8faff; + letter-spacing: 1.25px; + text-transform: uppercase; +`; + +export const BtnBack = styled(TouchableOpacity)` + border: 2px solid ${theme.colors.secundary.main}; + border-radius: 8px; + padding: 16px; + display: flex; + justify-content: center; + align-items: center; +`; + +export const TitleBtnBack = styled(Text)` + color: ${theme.colors.secundary.main}; + font-family: PoppinsBold; + font-size: 14px; + text-transform: uppercase; +`; diff --git a/yarn.lock b/yarn.lock index 1c648b5..0b22ffd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8811,7 +8811,7 @@ prompts@^2.3.2, prompts@^2.4.2: kleur "^3.0.3" sisteransi "^1.0.5" -prop-types@^15.8.1: +prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1: version "15.8.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== @@ -8953,6 +8953,21 @@ react-is@^17.0.1: resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== +react-native-animatable@1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/react-native-animatable/-/react-native-animatable-1.3.3.tgz#a13a4af8258e3bb14d0a9d839917e9bb9274ec8a" + integrity sha512-2ckIxZQAsvWn25Ho+DK3d1mXIgj7tITkrS4pYDvx96WyOttSvzzFeQnM2od0+FUMzILbdHDsDEqZvnz1DYNQ1w== + dependencies: + prop-types "^15.7.2" + +react-native-modal@^13.0.1: + version "13.0.1" + resolved "https://registry.yarnpkg.com/react-native-modal/-/react-native-modal-13.0.1.tgz#691f1e646abb96fa82c1788bf18a16d585da37cd" + integrity sha512-UB+mjmUtf+miaG/sDhOikRfBOv0gJdBU2ZE1HtFWp6UixW9jCk/bhGdHUgmZljbPpp0RaO/6YiMmQSSK3kkMaw== + dependencies: + prop-types "^15.6.2" + react-native-animatable "1.3.3" + react-native-pager-view@^6.2.3: version "6.2.3" resolved "https://registry.yarnpkg.com/react-native-pager-view/-/react-native-pager-view-6.2.3.tgz#698f6387fdf06cecc3d8d4792604419cb89cb775"