delete offer popup
This commit is contained in:
parent
56fa3e20e7
commit
7fcf62e647
2 changed files with 20 additions and 1 deletions
|
|
@ -45,6 +45,7 @@ const bigNotesAcceptedCheckbox = document.getElementById(
|
|||
const publishOfferButton = document.getElementById('button-submit-offer');
|
||||
|
||||
const offerCreatedPopup = document.getElementById('offer-created-confirmation');
|
||||
const offerDeletedPopup = document.getElementById('offer-deleted-confirmation');
|
||||
|
||||
const ownOffersContainer = document.getElementById('own-offers-container');
|
||||
|
||||
|
|
@ -193,6 +194,17 @@ function toggleOfferCreatedAlert() {
|
|||
}, 4000);
|
||||
}
|
||||
|
||||
function toggleOfferDeletedAlert() {
|
||||
offerDeletedPopup.classList.remove('max-size-zero');
|
||||
offerDeletedPopup.classList.add('revealed');
|
||||
setTimeout(() => {
|
||||
offerDeletedPopup.classList.remove('revealed');
|
||||
}, 3000);
|
||||
setTimeout(() => {
|
||||
offerDeletedPopup.classList.add('max-size-zero');
|
||||
}, 4000);
|
||||
}
|
||||
|
||||
class Offer {
|
||||
constructor(offerData) {
|
||||
this.uuid = offerData.uuid;
|
||||
|
|
@ -548,7 +560,7 @@ class Offer {
|
|||
await deleteOfferByUuid(this.uuid);
|
||||
await myOffers.getOffersFromApi();
|
||||
await myOffers.render();
|
||||
// toggle popup
|
||||
toggleOfferDeletedAlert();
|
||||
});
|
||||
|
||||
actionButtonsArea.append(editActionArea, deleteActionArea);
|
||||
|
|
|
|||
|
|
@ -201,6 +201,13 @@
|
|||
<img src="/img/circle-check-white.svg" />
|
||||
<p>¡Oferta creada! Puedes verla en tus ofertas.</p>
|
||||
</div>
|
||||
<div
|
||||
id="offer-deleted-confirmation"
|
||||
class="top-notification-good max-size-zero"
|
||||
>
|
||||
<img src="/img/circle-check-white.svg" />
|
||||
<p>¡Oferta eliminada!</p>
|
||||
</div>
|
||||
|
||||
<%- include("partials/appCommonScripts") %>
|
||||
<script src="/javascript/offers.js"></script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue