Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin drink page #87

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Admin drink page #87

wants to merge 5 commits into from

Conversation

jvBatista
Copy link
Collaborator

@jvBatista jvBatista commented Jan 29, 2023

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.

Types of changes

What types of changes does your code introduce to <repo_name>?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING.md doc.
  • I have added necessary documentation (if appropriate).
  • Any dependent changes have been merged and published in downstream modules.

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

@fmaachadoo fmaachadoo self-requested a review January 30, 2023 23:17
@fmaachadoo fmaachadoo enabled auto-merge January 30, 2023 23:18
@ltakehana ltakehana disabled auto-merge January 30, 2023 23:20
Copy link
Collaborator

@Sabanai104 Sabanai104 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Só uma questão nunca abram um PR de 36 arquivos isso é demais, encontrou problemas em vários componentes? Primeiro que então revisaram o PR errado, segundo, abre uma branch hotfix para corrigir o BO.

@@ -1,4 +1,4 @@
import { ReactNode } from "react";

export type IconsTypes = ReactNode & 'block' | 'sports_bar' | 'lock_open' | 'info' | 'schedule' | 'school' | 'flag' | 'logout' ;
export type IconsTypes = ReactNode & 'block' | 'sports_bar' | 'lock_open' | 'info' | 'schedule' | 'school' | 'flag' | 'logout' | 'expand_more' | 'segment' | 'filter_list' | 'search' | '❤' ;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Não passa um emoji como type pfv

height: 70px;
min-height: 70px;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Literalmente não teve pq fazer isso...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

o ideal é voltar, só utilizar min-height em casos de usar % no height. Se for para definir um height padrão, só use a propriedade height.

Comment on lines 1 to 83
import styled from "styled-components";
import User from "../../models/UserModel";
import Card from "./Card";
import {useState} from "react";
import {createPortal} from "react-dom";
import UserManagementModal from "../organisms/UserManagementModal";


interface ListUsersInterface {
listUsers: Array<User>;
}

const ModalWrapper = styled.div`
background-color: rgba(0, 0, 0, 0.5);
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
`;

const ListUsersStyle = styled.div`
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-auto-rows: minmax(100px, auto);
column-gap: 56px;
row-gap: 36px;
padding-top: 360px;
`;

const ListUsers = ({ listUsers }: ListUsersInterface) => {

const ActionModal = (userEmail: string, action: string, setShowModal: any) => {
console.log(action);
return (
<ModalWrapper>
<UserManagementModal
userEmail={userEmail}
action={action}
setShowModal={setShowModal}
/>
</ModalWrapper>
);
};

const [showModal, setShowModal] = useState(false);
const [modalContent, setModalContent] = useState<React.ReactElement | null>(null);

return (
<ListUsersStyle>
{
listUsers.map(function (user: User) {
return (
<Card
cardTitle={user.email!}
cardType="user"
userIndicationQuantity={3}
height="291px"
width="227px"
backgroundImage="https://viciados.net/wp-content/uploads/2022/11/Naruto-Shippuden-Boruto-2023.webp"
userBlock={false}
onBlockUser={ () => {
setModalContent(ActionModal(user.email!, 'block', setShowModal));
setShowModal(true);
} }
onDrinkRecommendation={() => { }}
onUnlockUser={ () => {
setModalContent(ActionModal(user.email!, 'unlock', setShowModal));
setShowModal(true);
} }
/>
);
})
}

{showModal && createPortal(modalContent, document.body)}
</ListUsersStyle >
)
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Esse componente tb vai ser usar na lista de drinks pq não troca ro nome dele e das variaveis?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inclusive o Modal foi oq eu falei, da pra deixar sendo tanto pra usuário como pra drink

Comment on lines 136 to 139
//useEffect(() => {
//console.log(categoryQuery); // replace with back end req
//}, [categoryQuery]);

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mata

Comment on lines 127 to 131





Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Muito espaçamento

Comment on lines 19 to 24
const ListUserTemplate = () => {
let maxCount = 0;
const [listUsersData, setlistUsersData] = useState<Array<User>>([]);
const [isLoading, setIsLoading] = useState<boolean>(false);

const showMoreUsers = async () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pq krls isso existe se n ta usando em nenhum lugar?

const ListUsers = ({ listUsers }: ListUsersInterface) => {

const ActionModal = (userEmail: string, action: string, setShowModal: any) => {
console.log(action);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mata

`

const pass = () => {
console.log('aaa')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mata

Comment on lines 186 to 213
<ControlsContainer>
{(type==="drink")&&(
<Dropdown
label={categoryQuery}
icon={'segment'}
options={categories}
width='238px'
onSelect={(category) => setCategoryQuery(category)}
/>
)}
<StringInput
value={nameQuery}
onChange={(event) => setNameQuery(event.target.value)}
height='58px'
width='499px'
borderRadius='8px'
hasSearchButton
onSearch={() => { }} // replace with back end req
/>
{(type==="drink")&&(
<Dropdown
label={'Filtrar'}
icon={'filter_list'}
options={[]}
onSelect={(option) => { }}
/>
)}
</ControlsContainer>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Transforma isso num componente Search lá nos organismos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants