Skip to content

Commit

Permalink
Merge branch 'dev' for release 6.3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
gnepud committed Jan 8, 2024
2 parents c2c71b2 + 83eca55 commit c770ab3
Show file tree
Hide file tree
Showing 33 changed files with 5,473 additions and 98 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog Fab-manager

## Next release

## v6.3.9 2024 January 8

- translation files added for Swedish
- Fix a bug: unable to show extended prices of space
- Fix a bug: event number places error in statistic
- [TODO DEPLOY] `rails fablab:maintenance:regenerate_statistics[2014,1]`

## v6.3.8 2023 December 29

- Fix a bug: unable to build docker image
Expand Down
90 changes: 33 additions & 57 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,39 +1,20 @@
FROM ruby:3.2.2-alpine
MAINTAINER contact@fab-manager.com
FROM ruby:3.2.2
MAINTAINER contact@sleede.com

# Install upgrade system packages
RUN apk update && apk upgrade && \
# Install runtime apk dependencies
apk add --update \
bash \
curl \
nodejs \
yarn \
git \
openssh \
imagemagick \
supervisor \
tzdata \
libc-dev \
ruby-dev \
zlib-dev \
xz \
xz-dev \
postgresql-dev \
postgresql-client \
libxml2-dev \
libxslt-dev \
libsass-dev \
libsass \
libc6-compat \
libidn-dev \
shared-mime-info && \
# Install buildtime apk dependencies
apk add --update --no-cache --virtual .build-deps \
alpine-sdk \
build-base \
linux-headers \
patch
# First we need to be able to fetch from https repositories
RUN apt-get update && \
apt-get install -y apt-transport-https \
ca-certificates apt-utils supervisor locales

RUN locale-gen C.UTF-8

RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -\
&& apt-get update -qq && apt-get install -qq --no-install-recommends \
nodejs \
&& apt-get upgrade -qq \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*\
&& npm install -g yarn@1

# Fix bug: LoadError: Could not open library '/usr/local/bundle/gems/sassc-2.1.0-x86_64-linux/lib/sassc/libsass.so': Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /usr/local/bundle/gems/sassc-2.1.0-x86_64-linux/lib/sassc/libsass.so)
# add libsass-dev libsass libc6-compat and env below
Expand All @@ -46,36 +27,31 @@ RUN bundle config --global frozen 1

# Install gems in a cache efficient way
WORKDIR /tmp
COPY Gemfile* /tmp/
RUN bundle config set --local without 'development test doc' && bundle install && bundle binstubs --all

# Prepare the application directories
RUN mkdir -p /var/log/supervisor && \
mkdir -p /usr/src/app/tmp/sockets && \
mkdir -p /usr/src/app/tmp/pids && \
mkdir -p /usr/src/app/tmp/cache && \
mkdir -p /usr/src/app/log && \
mkdir -p /usr/src/app/node_modules && \
mkdir -p /usr/src/app/public/api && \
chmod -R a+w /usr/src/app && \
chmod -R a+w /var/run
COPY Gemfile /tmp/
COPY Gemfile.lock /tmp/
RUN bundle install --binstubs --without development test doc

# Install Javascript packages
WORKDIR /usr/src/app
COPY package.json /usr/src/app/package.json
COPY yarn.lock /usr/src/app/yarn.lock
RUN yarn install

# Clean up build deps, cached packages and temp files
RUN apk del .build-deps && \
yarn cache clean && \
rm -rf /tmp/* \
/var/tmp/* \
/var/cache/apk/* \
/usr/lib/ruby/gems/*/cache/* && \
chmod -R a+w /usr/src/app/node_modules
# Web app
RUN mkdir -p /usr/src/app && \
mkdir -p /usr/src/app/config && \
mkdir -p /usr/src/app/invoices && \
mkdir -p /usr/src/app/payment_schedules && \
mkdir -p /usr/src/app/exports && \
mkdir -p /usr/src/app/imports && \
mkdir -p /usr/src/app/log && \
mkdir -p /usr/src/app/public/uploads && \
mkdir -p /usr/src/app/public/packs && \
mkdir -p /usr/src/app/accounting && \
mkdir -p /usr/src/app/supporting_document_files && \
mkdir -p /usr/src/app/tmp/sockets && \
mkdir -p /usr/src/app/tmp/pids

# Copy source files
COPY docker/database.yml /usr/src/app/config/database.yml
COPY . /usr/src/app

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const AbstractItem: React.FC<AbstractItemProps> = ({ item, errors, cart,
<span>{t('app.public.abstract_item.total')}</span>
<p>{FormatLib.price(OrderLib.itemAmount(item))}</p>
</div>
<FabButton className="main-action-btn" onClick={handleRemoveItem(item)}>
<FabButton className="is-alert" onClick={handleRemoveItem(item)}>
<i className="fa fa-trash" />
</FabButton>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ export const EventForm: React.FC<EventFormProps> = ({ action, event, onError, on
formState={formState}
label={t('app.admin.event_form.price')}
addOn={FormatLib.currencySymbol()} />
<FabButton className="remove-price is-main" onClick={() => handlePriceRemove(price, index)} icon={<Trash size={20} />} />
<FabButton className="remove-price is-alert" onClick={() => handlePriceRemove(price, index)} icon={<Trash size={20} />} />
</div>
))}
<FabButton className="add-price is-secondary" onClick={() => append({})}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const FormFileUpload = <TFieldValues extends FieldValues>({ id, label, re
onChange={onFileSelected}
placeholder={placeholder()}/>
{showRemoveButton && hasFile() &&
<FabButton onClick={onRemoveFile} icon={<Trash size={20} weight="fill" />} className="is-main" />
<FabButton onClick={onRemoveFile} icon={<Trash size={20} weight="fill" />} className="is-alert" />
}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export const FormImageUpload = <TFieldValues extends FieldValues, TContext exten
onChange={onFileSelected}
placeholder={placeholder()}
tooltip={tooltip} />
{hasImage() && <FabButton onClick={onRemoveFile} icon={<Trash size={20} weight="fill" />} className="is-main" />}
{hasImage() && <FabButton onClick={onRemoveFile} icon={<Trash size={20} weight="fill" />} className="is-alert" />}
</div>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ReactNode, useState } from 'react';
import { ReactNode, useState, useEffect } from 'react';
import * as React from 'react';
import { Price } from '../../../models/price';
import { useTranslation } from 'react-i18next';
Expand Down Expand Up @@ -28,6 +28,10 @@ export const ConfigureExtendedPricesButton: React.FC<ConfigureExtendedPricesButt
const [extendedPrices, setExtendedPrices] = useState<Array<Price>>(prices);
const [showList, setShowList] = useState<boolean>(false);

useEffect(() => {
setExtendedPrices(prices);
}, [prices]);

/**
* Return the number of hours, user-friendly formatted
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ export const ProductItem: React.FC<ProductItemProps> = ({ product, onEdit, onDel
</div>
<div className='actions'>
<EditDestroyButtons onDeleteSuccess={onDelete}
className="manage"
onError={onError}
onEdit={editProduct(product)}
itemId={product.id}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
border-radius: 0;
color: var(--gray-soft-lightest);
&.edit-btn {background: var(--gray-hard-darkest) }
&.delete-btn {background: var(--main) }
&.delete-btn {background: var(--alert) }
&:hover,
&:focus {
opacity: 0.75;
Expand Down
4 changes: 2 additions & 2 deletions app/frontend/src/stylesheets/modules/cart/store-cart.scss
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,11 @@
padding: 1.6rem 0.8rem;
background-color: var(--main);
border: none;
color: var(--gray-soft-lightest);
color: var(--main-text-color);
justify-content: center;
text-transform: uppercase;
&:hover {
color: var(--gray-soft-lightest);
color: var(--main-text-color);
opacity: 0.75;
cursor: pointer;
}
Expand Down
4 changes: 2 additions & 2 deletions app/frontend/src/stylesheets/modules/store/_utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

.main-action-btn {
background-color: var(--main);
color: var(--gray-soft-lightest);
color: var(--main-text-color);
border: none;
&:hover {
background-color: var(--main);
color: var(--gray-soft-lightest);
color: var(--main-text-color);
opacity: 0.75;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
&:hover { opacity: 0.75; }
}
.edit-btn { background: var(--gray-hard-darkest); }
.delete-btn { background: var(--main); }
.delete-btn { background: var(--alert); }
}
}
}
Expand Down
13 changes: 0 additions & 13 deletions app/frontend/src/stylesheets/modules/store/products-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,6 @@
display: flex;
justify-content: flex-end;
align-items: center;
.manage {
overflow: hidden;
display: flex;
border-radius: var(--border-radius-sm);
button {
@include btn;
border-radius: 0;
color: var(--gray-soft-lightest);
&:hover { opacity: 0.75; }
}
.edit-btn {background: var(--gray-hard-darkest) }
.delete-btn {background: var(--main) }
}
}

@media (min-width: 1024px) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def build(options = default_options)
coupon: r[:coupon],
groupName: r[:groupName],
}.merge(user_info_stat(r)))
stat[:stat] = (type == 'booking' ? 1 : r[:nb_hours])
stat[:stat] = (type == 'booking' ? (category == 'event' ? r[:nb_places] : 1) : r[:nb_hours])
stat["#{category}Id".to_sym] = r["#{category}_id".to_sym]

stat = add_custom_attributes(category, stat, r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<p><%= t('.body.reservation_saved_html', RESERVATION: @attached_object.reservable.name) %></p>

<p><%= t('.body.your_reserved_slots') %> </p>
<p><%= t('.body.your_reserved_slots') %></p>
<ul>
<% @attached_object.slots.each do |slot| %>
<% if @attached_object.reservable_type == 'Event' %>
Expand All @@ -14,3 +14,4 @@
<% end %>
<% end %>
</ul>
<p><%= t('.body.reservation_warning', RESERVATION: @attached_object.reservable.name) %></p>
Loading

0 comments on commit c770ab3

Please sign in to comment.