Skip to content

Commit

Permalink
adjust folders images to public and change imports b00tc4mp#257
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeyusin committed Aug 13, 2024
1 parent fc432fe commit 78e2eb1
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 20 deletions.
2 changes: 1 addition & 1 deletion staff/sergio-ocaña/project/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ mongoose.connect(MONGO_URL)

logic.authenticateUser(email, password)
.then(user => {
const token = jwt.sign({ sub: user.id, role: user.role }, JWT_SECRET, { expiresIn: '1h' })
const token = jwt.sign({ sub: user.id, role: user.role }, JWT_SECRET, { expiresIn: '2h' })

res.status(200).json(token)
})
Expand Down
8 changes: 4 additions & 4 deletions staff/sergio-ocaña/project/app/src/components/Issue.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ function Issue({ issue, onCloseIssueButton, onDeleteIssueButton, onCommentButton
<p className={isIssueOpen ? 'text-green-600' : 'text-red-600'}>{`(${issue.status})`}</p>
</div>
<div className={prop}>
<p className='text-gray-400'>{issue.cinema.name}</p>
<p className='text-gray-400'>{issue.location}</p>
<p className='text-white'>{issue.cinema.name}</p>
<p className='text-white'>{issue.location}</p>
</div>
<p className='text-gray-400 px-2'>{issue.type}</p>
<p className='text-gray-400 px-2'>{issue.description}</p>
<p className='text-white px-2'>{issue.type}</p>
<p className='text-white px-2'>{issue.description}</p>
{logic.isManagerUserLoggedIn() && <p className='text-green-600 px-2'>{issue.author.name}</p>}
<div className='flex flex-row justify-between'>
<div className='flex flex-row justify-start'>
Expand Down
Binary file removed staff/sergio-ocaña/project/app/src/img/80.png
Binary file not shown.
3 changes: 1 addition & 2 deletions staff/sergio-ocaña/project/app/src/pages/GenerateTicket.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Button, ButtonText, HTag } from "../components"
import QRCode from 'react-qr-code'
import logic from "../logic"
import { generateTicketRoute } from '../routes'
import logo from '../img/logo.png'

function GenerateTicket({ redirectClick }) {
const [ticket, setTicket] = useState(null)
Expand All @@ -20,7 +19,7 @@ function GenerateTicket({ redirectClick }) {

return <main main className='flex flex-col bg-happy-bg bg-cover min-h-screen '>
<footer className=''>
<img src={logo} alt='Logo' />
<img src='/images/logo.png' alt='Logo' />
</footer>

<article className='flex flex-col bg-[#e4b641] min-h-96 bg-opacity-80 rounded-3xl mx-4 justify-center gap-4 shadow-[#e4b641]-50 my-5'>
Expand Down
3 changes: 1 addition & 2 deletions staff/sergio-ocaña/project/app/src/pages/HeaderFooter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Outlet } from 'react-router-dom'
import Footer from '../components/Footer'
import { Header, Button, MainThin } from '../components'
import logic from '../logic'
import logo from '../img/logocut.png'

function HeaderFooter({ onHomeClick, onIssueClick, onTicketClick, onLogoutClick }) {
const handleLogoutButton = () => {
Expand All @@ -14,7 +13,7 @@ function HeaderFooter({ onHomeClick, onIssueClick, onTicketClick, onLogoutClick
return <div className='grid grid-rows-[auto_1fr_auto] h-screen'>
<Header >
<div className='flex flex-row w-1/8'>
<img className='flex-grow' src={logo} alt=' Logo' />
<img className='flex-grow' src='/images/logocut.png' alt=' Logo' />
</div>
<Button onClick={handleLogoutButton}>🚪</Button>
</Header>
Expand Down
3 changes: 1 addition & 2 deletions staff/sergio-ocaña/project/app/src/pages/Login.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { ButtonText, LabelInput, Form, HTag, Main, Article } from '../components'
import logic from '../logic'
import { errors } from 'com'
import logo from '../img/logo.png'

const { MatchError, ContentError } = errors

Expand Down Expand Up @@ -44,7 +43,7 @@ function Login({ onUserLoggedIn, onRegisterClick }) {
}
return <>
<header className=''>
<img src={logo} alt='Logo' />
<img src='/images/logo.png' alt='Logo' />
</header>

<Article>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { LabelInput, Form, HTag, ButtonText, Article, Main } from '../components'
import logic from '../logic'
import { errors } from 'com'
import logo from '../img/logo.png'


const { DuplicityError, ContentError } = errors

Expand All @@ -19,6 +19,8 @@ function RegisterCustomer({ onUserRegistered, onLoginClick }) {
feedback = `${feedback}, please log in or try with other email`

else feedback = 'sorry, there was an error, please try again later'

alert(feedback)
}

const handleLoginButton = () => {
Expand Down Expand Up @@ -47,7 +49,7 @@ function RegisterCustomer({ onUserRegistered, onLoginClick }) {
}
return <>
<header className=''>
<img src={logo} alt='Logo' />
<img src='/images/logo.png' alt='Logo' />
</header>
<Article>
<HTag>Register</HTag>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { ButtonText, LabelInput, Form, HTag, Main, Article } from '../components'
import logic from '../logic'
import logo from '../img/logo.png'

import { errors } from 'com'

Expand Down Expand Up @@ -47,7 +46,7 @@ function RegisterManager({ onUserRegistered, onLoginClick }) {
}
return <>
<header>
<img src={logo} alt='Logo' />
<img src='/images/logo.png' alt='Logo' />
</header>

<Article>
Expand Down
16 changes: 13 additions & 3 deletions staff/sergio-ocaña/project/app/src/pages/SaveQR.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,19 @@ import logic from "../logic"

function SaveQR({ onSavedQR }) {
const { cinemaId, location } = useParams()
try {

logic.saveLocalQR(cinemaId, location)
.catch(error => console.error(error))
.then(() => onSavedQR())
logic.saveLocalQR(cinemaId, location)
.then(() => onSavedQR())
.catch(error => {
console.error(error)
alert(error.message)
})

} catch (error) {
console.error(error)

alert(error.message)
}
}
export default SaveQR
4 changes: 2 additions & 2 deletions staff/sergio-ocaña/project/app/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export default {
theme: {
extend: {
backgroundImage: {
'happy-logo': "url('src/img/logo.png')",
'happy-bg': "url('src/img/background.png')",
'happy-logo': "url('/images/logo.png')",
'happy-bg': "url('/images/background.png')",
}
},
},
Expand Down

0 comments on commit 78e2eb1

Please sign in to comment.