Skip to content
Snippets Groups Projects
Commit a3945eee authored by Rémi PAILHAREY's avatar Rémi PAILHAREY :fork_knife_plate:
Browse files

chore(release): Ecolyo canary release

parent 1d7c524e
Branches
Tags
1 merge request!77Back-office SGE before canary release
import axios from 'axios' import axios, { AxiosRequestConfig } from 'axios'
import { toast } from 'react-toastify' import { toast } from 'react-toastify'
import { IPrice } from '../models/price.model' import { IPrice } from '../models/price.model'
export class PricesService { export class PricesService {
/** /**
* Save the partnersInfo * Save the partnersInfo
* @param price * @param price
* @param token * @param axiosHeaders
*/ */
public savePrice = async (price: IPrice, token: string): Promise<void> => { public savePrice = async (
price: IPrice,
axiosHeaders: AxiosRequestConfig
): Promise<void> => {
try { try {
await axios.put(`/api/admin/prices`, price, { await axios.put(`/api/admin/prices`, price, axiosHeaders)
headers: {
'XSRF-TOKEN': token,
},
})
toast.success('Price succesfully saved !') toast.success('Price succesfully saved !')
} catch (e) { } catch (e) {
toast.error('Failed to save price') toast.error('Failed to save price')
......
...@@ -5,6 +5,12 @@ $dark-background: radial-gradient( ...@@ -5,6 +5,12 @@ $dark-background: radial-gradient(
#1b1c22 100% #1b1c22 100%
); );
$gold: #e3b82a; $gold: #e3b82a;
$gold-dark: #e2a70d;
$btn-gold: #f1c017;
$dark-light: #1b1c22; $dark-light: #1b1c22;
$grey-dark: #25262b; $grey-dark: #25262b;
$grey-light: #32343d;
$dark-bg: #121212;
$text-grey: #e0e0e0; $text-grey: #e0e0e0;
$text-dark: #a0a0a0;
$text-chart: #7b7b7b;
$menu-width: 8rem; $menu-width: 11.25rem;
$navbar-height: 3.5rem; $navbar-height: 3.5rem;
$navigator-height: 8rem; $navigator-height: 8rem;
$small-nav-height: 5.5rem;
...@@ -27,20 +27,14 @@ $main-spacing: 4px; ...@@ -27,20 +27,14 @@ $main-spacing: 4px;
cursor: pointer; cursor: pointer;
border: solid 1px transparent; border: solid 1px transparent;
color: $dark-light; color: $dark-light;
background: radial-gradient( background: $btn-gold;
105.25% 64.58% at 49.68% 70.83%,
rgba(226, 137, 4, 0.5) 0%,
rgba(255, 255, 255, 0) 100%
),
#f1c017;
font-weight: 600; font-weight: 600;
border-radius: 5px; border-radius: 2px;
box-shadow: 0px 5px 5px rgb(0 0 0 / 20%), 0px 3px 14px rgb(0 0 0 / 12%), padding: 0.5rem;
0px 8px 10px rgb(0 0 0 / 14%);
padding: 0.5rem 1rem;
margin-top: 1rem; margin-top: 1rem;
transition: all 300ms ease; transition: all 300ms ease;
font-size: 1.05rem; font-size: 1rem;
height: 40px;
min-width: 130px; min-width: 130px;
margin-right: 0.5rem; margin-right: 0.5rem;
&:hover { &:hover {
...@@ -63,13 +57,22 @@ $main-spacing: 4px; ...@@ -63,13 +57,22 @@ $main-spacing: 4px;
background: darken($text-grey, 20%); background: darken($text-grey, 20%);
} }
} }
.btnCancel2 {
@include baseButton();
border: 1px solid $text-dark;
background: transparent;
color: white;
&:hover {
background: darken($grey-dark, 5%);
}
}
.btnDelete { .btnDelete {
@include baseButton(); @include baseButton();
display: inline-block; display: inline-block;
margin-left: auto; margin-left: auto;
background: $dark-light; background: $grey-dark;
color: $gold; color: $gold;
border: 1px solid $gold; border: 1px solid $text-dark;
&:hover { &:hover {
background: $dark-light; background: $dark-light;
color: $text-grey; color: $text-grey;
...@@ -84,3 +87,55 @@ $main-spacing: 4px; ...@@ -84,3 +87,55 @@ $main-spacing: 4px;
border-radius: 5px; border-radius: 5px;
padding: 0.3rem; padding: 0.3rem;
} }
@mixin customCheckBox($size) {
.checkbox {
cursor: pointer;
margin: 0.5rem 0;
display: flex;
align-items: center;
width: fit-content;
font-size: 0.9rem;
color: $text-grey;
input {
margin: 0.5rem 1rem 0.5rem 0.5rem;
appearance: none;
-moz-appearance: none;
-webkit-appearance: none;
width: $size;
height: $size;
min-width: $size;
min-height: $size;
position: relative;
border: solid 2px $gold;
background: black;
border-radius: 2px;
cursor: pointer;
}
}
.answerChecked {
input {
&:before,
&:after {
content: '';
position: absolute;
display: inline-block;
background: $gold;
border-radius: 0.5rem;
}
&:before {
width: 3px;
height: 12px;
left: 10px;
top: 4px;
transform: rotate(41deg);
}
&:after {
width: 3px;
height: 6px;
left: 5px;
top: 8px;
transform: rotate(133deg);
}
}
}
}
...@@ -6,6 +6,5 @@ export const convertStringToEditorState = (string: string): EditorState => { ...@@ -6,6 +6,5 @@ export const convertStringToEditorState = (string: string): EditorState => {
blocksFromHTML.contentBlocks, blocksFromHTML.contentBlocks,
blocksFromHTML.entityMap blocksFromHTML.entityMap
) )
const editorState = EditorState.createWithContent(state) return EditorState.createWithContent(state)
return editorState
} }
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment