Compare commits

...

9 Commits

Author SHA1 Message Date
Huaoe 65147a9ac6 dev BDDD paswword 2019-09-13 14:00:00 +02:00
Huaoe a366ed749e merge Ad repo 2019-09-12 12:02:22 +02:00
Huaoe 87f6956958 isPrivate 2019-09-12 12:00:27 +02:00
Huaoe 3a78ac68f2 isPrivate in search ad 2019-09-11 16:21:11 +02:00
Sébastien 39774c1ed9 Merge branch 'master' of https://git.e-declic.net/talents-tube/website 2019-09-10 15:40:15 +02:00
Sébastien bd477b3354 Fix: ads order list 2019-09-10 15:38:13 +02:00
Sébastien 86e33a5e0a Fix: mysql-client to mariadb-client 2019-09-10 08:45:20 +02:00
Huaoe 365c71751d assetic fix 2019-09-09 17:27:40 +02:00
Huaoe 46399bd8ed typo notifications 2019-09-09 15:07:52 +02:00
8 changed files with 19 additions and 21 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
FROM php:7.1-fpm
FROM php:7.1-fpm-buster
ENV TERM=xterm
@@ -10,7 +10,7 @@ RUN echo 'fr_FR.UTF-8 UTF-8' > /etc/locale.gen \
&& /usr/sbin/locale-gen
RUN apt-get update \
&& apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev libmcrypt-dev libxslt-dev libicu-dev libxml2-dev libpq-dev libgeoip-dev libedit-dev mysql-client \
&& apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev libmcrypt-dev libxslt-dev libicu-dev libxml2-dev libpq-dev libgeoip-dev libedit-dev mariadb-client \
&& apt-get install -y --no-install-recommends libmagickwand-dev \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j4 gd mcrypt xsl zip intl gettext soap pdo_pgsql pdo_mysql mysqli pgsql json readline opcache \
+6
View File
@@ -14,6 +14,12 @@ Copy this before composer require : COMPOSER_MEMORY_LIMIT=-1
In php container, root@php:/home/www/website/www# php bin/console doctrine:schema:update --force
It'll update database based on entities
## For Js : use assetic commande inside server container
- do a cache-clear to update the assectic.yml file
bin/console cache:clear --env=prod --no-debug
- then
php bin/console assetic:dump --env=prod --no-debug
## To push notifications
- Create new .json file in web/push folder.
@@ -33,7 +33,7 @@
<input type="checkbox" id="notificationChecked" name="notificationChecked" {{isNotificationAllowed ? "checked=checked":""}}/>
<label for="notificationChecked">Autoriser les notificaitons</label>
<label for="notificationChecked">Autoriser les notifications</label>
</div>
</div>
@@ -5,8 +5,8 @@ assetic:
filters:
cssrewrite: ~
uglifyjs2:
bin: /usr/lib/node_modules/uglify-es/bin/uglifyjs
# bin: /usr/local/bin/uglifyjs2
#bin: /usr/lib/node_modules/uglify-es/bin/uglifyjs
bin: /usr/local/bin/uglifyjs #sym linked in container (see makefile)
assets:
vendors:
inputs:
@@ -46,6 +46,8 @@ assetic:
- 'js/vendors/datepicker.min.js'
- 'js/vendors/jquery.validate.min.js'
- 'js/talent.js'
- 'js/EdeclicTools.js'
- 'js/EdeclicPushAndNotificationClient.js'
admin:
inputs:
- 'admin/AdminLTE/plugins/jQuery/jquery-2.2.3.min.js'
@@ -10,7 +10,7 @@ parameters:
database_port: '5432'
database_name: database
database_user: user
database_password: edcl56
database_password: b|RN:iR<g,TNMqM6
mongodb_server: 'mongodb://tt-website.mongo.dev:27017'
prestashop_key: 9YUQ5jPqT4Z4x5s9B25pb1yuGBtpaeBDxpWDgicPF3CuP8F2p9aK18ZS
prestashop_path: /home/projects/prestashop1/store
@@ -60,7 +60,7 @@ class Company
*
* @ORM\Column(name="brand_name", type="string", length=255, options={"comment":"Nom commercial"}, nullable=true)
*
* @Groups({"ad_detail", "company_list", "company_detail", "answer_list", "answer_detail"})
* @Groups({"ad_detail", "ad_list", "company_list", "company_detail","answer_detail","answer_list"})
*/
private $brandName;
@@ -23,8 +23,9 @@ class AdRepository extends AbstractRepository
->createQueryBuilder('a')
->select('a')
->where('a.isVisible = true')
->orderBy('a.title', $order);
->andWhere('a.isPrivate = false')
->orderBy('a.title', $order)
->orderBy('a.publishedAt', 'desc');
$qb
->andWhere('a.isPromoted = ?3')
@@ -77,21 +77,10 @@ class CompanyRepository extends AbstractRepository
public function search($term, $order = 'asc', $limit = 10, $offset = 1,
$isEmphasis)
{
// $qb = $this
// ->createQueryBuilder('c')
// ->select('c')
// ->leftJoin('c.ads', 'a', 'WITH', 'a.status =:status')
// ->setParameter(':status', "PUBLISHED")
// ->where("c.type = 'COMPANY'")
// ->orWhere('c.presentationVideo IS NOT NULL')
// ->orderBy('a.publishedAt', 'DESC')
// ->orderBy('c.cTime', 'DESC');
$qb = $this->createQueryBuilder('c')
->select('c')
->where("c.type = 'COMPANY'")
->andWhere("c.isPrivate = false")
->leftJoin('c.ads', 'a', 'WITH', 'a.status =:status')
->setParameter(':status', "PUBLISHED")
->orderBy('a.publishedAt', 'DESC')