40 Commits

Author SHA1 Message Date
Bilal Catic
5b2e454c4a Merge branch 'allow-zip-upload' into 'development'
Allow zip upload

See merge request saburly/wiaas/wiaas-legacy!10
2018-10-02 15:32:24 +00:00
Bilal Catic
ad68aa9fdc keep uploads dir with sub-dirs without files in them 2018-10-02 17:21:57 +02:00
Bilal Catic
8cfd4a72f3 change ownership of application directory 2018-10-02 16:42:42 +02:00
Bilal Catic
c83ced1184 allo zip upload in other app parts 2018-10-02 12:55:57 +02:00
Bilal Catic
9fff6dae9d allow zip upload in order details in back office 2018-10-01 12:51:35 +02:00
Bilal Catic
bc4c7179e2 Merge branch 'incrase-max-item-quantity' into 'development'
Incrase max item quantity

See merge request saburly/wiaas/wiaas-legacy!9
2018-10-01 09:50:53 +00:00
Bilal Catic
288759582e Update coMarketConstants.js 2018-10-01 09:50:02 +00:00
Bilal Catic
da88acaf89 change messages according to max quantity 2018-09-30 23:07:13 +02:00
Bilal Catic
8477a5ac28 increase limit in backend 2018-09-30 23:03:33 +02:00
Bilal Catic
65f03e00b2 incease limit on frontend 2018-09-30 23:03:33 +02:00
Almira
522ecce279 Merge branch 'fix-getPriceType-typo' into 'development'
fix typo

See merge request saburly/wiaas/wiaas-legacy!8
2018-09-19 09:04:51 +00:00
Bilal Catic
2fb4f2a191 fix typo 2018-09-17 21:35:07 +02:00
Nedim Uka
4f4146f62d Merge branch 'show-billing-details-in-order-details-frontend-backend' into 'development'
Show billing details in order details frontend backend

See merge request saburly/wiaas/wiaas-legacy!7
2018-07-10 09:39:52 +00:00
GotPPay
786461be1b show billing info on order details - frontend panel 2018-07-09 20:15:31 +02:00
GotPPay
d2426d1270 show billing info on order details - backend panel 2018-07-09 20:15:13 +02:00
GotPPay
31dc7639af fetch billing details 2018-07-09 20:14:00 +02:00
Nedim Uka
a82d13ba1f Merge branch 'add-personal-info-to-delivery-address-and-order' into 'development'
Add personal info to delivery address and order

See merge request saburly/wiaas/wiaas-legacy!6
2018-06-27 08:55:05 +00:00
GotPPay
141727c238 add requested fields to delivery address form 2018-06-27 00:01:02 +02:00
GotPPay
4cbc207b6c add requested fields in order summary 2018-06-27 00:00:33 +02:00
GotPPay
33d1820884 dont' require name,last name or email to continue 2018-06-27 00:00:15 +02:00
GotPPay
f76b74b2ef add constants 2018-06-26 23:59:43 +02:00
GotPPay
02209eb558 store and read additional fields in delivery_addresses table 2018-06-26 23:59:27 +02:00
GotPPay
66e2b06fdd add requested fields to the orders table 2018-06-26 23:58:58 +02:00
GotPPay
4319459909 add migration 2018-06-26 23:58:37 +02:00
Nedim Uka
92f237c82f Merge branch 'start-using-migrations' into 'development'
Start using migrations

See merge request saburly/wiaas/wiaas-legacy!5
2018-06-26 14:38:56 +00:00
GotPPay
bea9ba5e67 restore URL-s to live server 2018-06-26 13:57:59 +02:00
GotPPay
9b26ff1cd4 create start-up script for migration 2018-06-26 13:47:39 +02:00
GotPPay
37c749a9d7 update composer.lock 2018-06-25 16:58:46 +02:00
GotPPay
a25f1772f2 run update with composer to install and update 2018-06-25 15:09:38 +02:00
GotPPay
eb28403d18 restore original composer.lock file 2018-06-25 15:08:55 +02:00
GotPPay
6f09dcf264 install and config phinx for migrations 2018-06-25 14:45:13 +02:00
GotPPay
8678e68792 start from original DB dump 2018-06-25 13:37:13 +02:00
Nedim Uka
13c68fdcdb Merge branch 'add-biling-details-to-order' into 'development'
Add biling details to order

See merge request saburly/wiaas/wiaas-legacy!4
2018-06-25 10:04:15 +00:00
GotPPay
6db387e5d1 update readme 2018-06-24 18:59:01 +02:00
GotPPay
f2f82ecea9 add first name, last name and mail to the orders table 2018-06-24 18:57:30 +02:00
Nedim Uka
98a3f4dad8 Merge branch 'fix-url-rewrite' into 'development'
fix url rewrite - redirect frontend urls to react router

See merge request saburly/wiaas/wiaas-legacy!3
2018-06-22 12:48:22 +00:00
GotPPay
0acc0da6ec fix url rewrite - redirect frontend urls to react router 2018-06-22 12:36:02 +02:00
Nedim Uka
f0dadd549f Merge branch 'remove-browser-autocomplete-billing-dellivery-address' into 'development'
Remove auto fill

See merge request saburly/wiaas/wiaas-legacy!2
2018-06-21 09:08:53 +00:00
GotPPay
908bf7864a Remove auto fill 2018-06-20 21:46:16 +02:00
Bilal Catic
06efa869bd Merge branch 'dockerized' into 'development'
Dockerized

See merge request saburly/wiaas/wiaas-legacy!1
2018-06-13 10:43:59 +00:00
46 changed files with 1315 additions and 43 deletions

View File

@@ -38,6 +38,7 @@ JavasScript (React + Redux)
## DOCKER
- install docker-ce and docker-compose
- Check env variables in php.dockerfile in root directory of project (for local testing, REACT_APP_DEV_URL should be set to http://localhost:8000/api-wiaas)
- from root of the project, execute `docker-compose build` and then `docker-compose up`
Application is now available on http://localhost:8000

View File

@@ -1,4 +1,3 @@
node_modules/
client/uploads
api-wiaas/client/js/bower_components
vendor

View File

@@ -147,6 +147,10 @@
'idCommercialLeadUser',
'idCustomerInstance',
'deliveryAddress',
'billingFirstName',
'billingLastName',
'billingMail',
'billingAddress',
'customerPhone',
'customerMail',
'commercialLeadPhone',

View File

@@ -0,0 +1,8 @@
# .gitignore sample
###################
# ignore all files in this dir...
*
# ... except for this one.
!.gitignore

View File

@@ -0,0 +1,8 @@
# .gitignore sample
###################
# ignore all files in this dir...
*
# ... except for this one.
!.gitignore

View File

@@ -0,0 +1,8 @@
# .gitignore sample
###################
# ignore all files in this dir...
*
# ... except for this one.
!.gitignore

View File

@@ -0,0 +1,8 @@
# .gitignore sample
###################
# ignore all files in this dir...
*
# ... except for this one.
!.gitignore

View File

@@ -0,0 +1,8 @@
# .gitignore sample
###################
# ignore all files in this dir...
*
# ... except for this one.
!.gitignore

View File

@@ -0,0 +1,8 @@
# .gitignore sample
###################
# ignore all files in this dir...
*
# ... except for this one.
!.gitignore

View File

@@ -0,0 +1,8 @@
# .gitignore sample
###################
# ignore all files in this dir...
*
# ... except for this one.
!.gitignore

View File

@@ -0,0 +1,8 @@
# .gitignore sample
###################
# ignore all files in this dir...
*
# ... except for this one.
!.gitignore

View File

@@ -0,0 +1,8 @@
# .gitignore sample
###################
# ignore all files in this dir...
*
# ... except for this one.
!.gitignore

View File

@@ -3,6 +3,7 @@
"sendgrid/sendgrid": "~5.1",
"phpoffice/phpexcel": "^1.8",
"firebase/php-jwt": "^5.0",
"cloudinary/cloudinary_php": "dev-master"
"cloudinary/cloudinary_php": "dev-master",
"robmorgan/phinx": "^0.10"
}
}

850
api-wiaas/composer.lock generated
View File

@@ -1,23 +1,314 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "43b2e4e398624aacad266d3c9a1124d0",
"content-hash": "9f0b9ff3a219f8bf0181a900d221af66",
"packages": [
{
"name": "cakephp/cache",
"version": "3.6.6",
"source": {
"type": "git",
"url": "https://github.com/cakephp/cache.git",
"reference": "44cb339902344bf4bd866645047b533057b9df8a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/cakephp/cache/zipball/44cb339902344bf4bd866645047b533057b9df8a",
"reference": "44cb339902344bf4bd866645047b533057b9df8a",
"shasum": ""
},
"require": {
"cakephp/core": "^3.6.0",
"php": ">=5.6.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Cake\\Cache\\": "."
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "CakePHP Community",
"homepage": "https://github.com/cakephp/cache/graphs/contributors"
}
],
"description": "Easy to use Caching library with support for multiple caching backends",
"homepage": "https://cakephp.org",
"keywords": [
"cache",
"caching",
"cakephp"
],
"time": "2018-04-24T11:15:51+00:00"
},
{
"name": "cakephp/collection",
"version": "3.6.6",
"source": {
"type": "git",
"url": "https://github.com/cakephp/collection.git",
"reference": "c3cce01e8c76a98cb6149f958e9b7acae5e1aa74"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/cakephp/collection/zipball/c3cce01e8c76a98cb6149f958e9b7acae5e1aa74",
"reference": "c3cce01e8c76a98cb6149f958e9b7acae5e1aa74",
"shasum": ""
},
"require": {
"php": ">=5.6.0"
},
"type": "library",
"autoload": {
"psr-4": {
"Cake\\Collection\\": "."
},
"files": [
"functions.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "CakePHP Community",
"homepage": "https://github.com/cakephp/collection/graphs/contributors"
}
],
"description": "Work easily with arrays and iterators by having a battery of utility traversal methods",
"homepage": "https://cakephp.org",
"keywords": [
"arrays",
"cakephp",
"collections",
"iterators"
],
"time": "2018-06-10T19:23:43+00:00"
},
{
"name": "cakephp/core",
"version": "3.6.6",
"source": {
"type": "git",
"url": "https://github.com/cakephp/core.git",
"reference": "ad1ddaf85c88332392d999db4993ff1fb5429bea"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/cakephp/core/zipball/ad1ddaf85c88332392d999db4993ff1fb5429bea",
"reference": "ad1ddaf85c88332392d999db4993ff1fb5429bea",
"shasum": ""
},
"require": {
"cakephp/utility": "^3.6.0",
"php": ">=5.6.0"
},
"suggest": {
"cakephp/event": "To use PluginApplicationInterface or plugin applications."
},
"type": "library",
"autoload": {
"psr-4": {
"Cake\\Core\\": "."
},
"files": [
"functions.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "CakePHP Community",
"homepage": "https://github.com/cakephp/core/graphs/contributors"
}
],
"description": "CakePHP Framework Core classes",
"homepage": "https://cakephp.org",
"keywords": [
"cakephp",
"core",
"framework"
],
"time": "2018-06-21T02:41:27+00:00"
},
{
"name": "cakephp/database",
"version": "3.6.6",
"source": {
"type": "git",
"url": "https://github.com/cakephp/database.git",
"reference": "a7200722b2fbf22502700b9d8515581007616a77"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/cakephp/database/zipball/a7200722b2fbf22502700b9d8515581007616a77",
"reference": "a7200722b2fbf22502700b9d8515581007616a77",
"shasum": ""
},
"require": {
"cakephp/cache": "^3.6.0",
"cakephp/core": "^3.6.0",
"cakephp/datasource": "^3.6.0",
"php": ">=5.6.0"
},
"suggest": {
"cakephp/log": "Require this if you want to use the built-in query logger"
},
"type": "library",
"autoload": {
"psr-4": {
"Cake\\Database\\": "."
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "CakePHP Community",
"homepage": "https://github.com/cakephp/database/graphs/contributors"
}
],
"description": "Flexible and powerful Database abstraction library with a familiar PDO-like API",
"homepage": "https://cakephp.org",
"keywords": [
"abstraction",
"cakephp",
"database",
"database abstraction",
"pdo"
],
"time": "2018-06-13T23:11:10+00:00"
},
{
"name": "cakephp/datasource",
"version": "3.6.6",
"source": {
"type": "git",
"url": "https://github.com/cakephp/datasource.git",
"reference": "8ac1cd771b67bca472df53aa4f4105924419d8c8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/cakephp/datasource/zipball/8ac1cd771b67bca472df53aa4f4105924419d8c8",
"reference": "8ac1cd771b67bca472df53aa4f4105924419d8c8",
"shasum": ""
},
"require": {
"cakephp/core": "^3.6.0",
"php": ">=5.6.0"
},
"suggest": {
"cakephp/cache": "If you decide to use Query caching.",
"cakephp/collection": "If you decide to use ResultSetInterface.",
"cakephp/utility": "If you decide to use EntityTrait."
},
"type": "library",
"autoload": {
"psr-4": {
"Cake\\Datasource\\": "."
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "CakePHP Community",
"homepage": "https://github.com/cakephp/datasource/graphs/contributors"
}
],
"description": "Provides connection managing and traits for Entities and Queries that can be reused for different datastores",
"homepage": "https://cakephp.org",
"keywords": [
"cakephp",
"connection management",
"datasource",
"entity",
"query"
],
"time": "2018-06-20T18:56:54+00:00"
},
{
"name": "cakephp/utility",
"version": "3.6.6",
"source": {
"type": "git",
"url": "https://github.com/cakephp/utility.git",
"reference": "3478eba87128cca4755ea16b469e59d1155650cd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/cakephp/utility/zipball/3478eba87128cca4755ea16b469e59d1155650cd",
"reference": "3478eba87128cca4755ea16b469e59d1155650cd",
"shasum": ""
},
"require": {
"cakephp/core": "^3.6.0",
"php": ">=5.6.0"
},
"suggest": {
"ext-intl": "To use Text::transliterate() or Text::slug()",
"lib-ICU": "To use Text::transliterate() or Text::slug()"
},
"type": "library",
"autoload": {
"psr-4": {
"Cake\\Utility\\": "."
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "CakePHP Community",
"homepage": "https://github.com/cakephp/utility/graphs/contributors"
}
],
"description": "CakePHP Utility classes such as Inflector, String, Hash, and Security",
"homepage": "https://cakephp.org",
"keywords": [
"cakephp",
"hash",
"inflector",
"security",
"string",
"utility"
],
"time": "2018-05-31T20:11:56+00:00"
},
{
"name": "cloudinary/cloudinary_php",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/cloudinary/cloudinary_php.git",
"reference": "40190b47bf596020ae79608eeec47b9c5f86bb26"
"reference": "724eb4cc488c7b532af056dd165b6633b74b682c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/cloudinary/cloudinary_php/zipball/40190b47bf596020ae79608eeec47b9c5f86bb26",
"reference": "40190b47bf596020ae79608eeec47b9c5f86bb26",
"url": "https://api.github.com/repos/cloudinary/cloudinary_php/zipball/724eb4cc488c7b532af056dd165b6633b74b682c",
"reference": "724eb4cc488c7b532af056dd165b6633b74b682c",
"shasum": ""
},
"require": {
@@ -56,7 +347,7 @@
"image management",
"sdk"
],
"time": "2018-03-27 11:49:00"
"time": "2018-06-11T17:07:23+00:00"
},
{
"name": "firebase/php-jwt",
@@ -163,17 +454,138 @@
"time": "2015-05-01T07:00:55+00:00"
},
{
"name": "sendgrid/php-http-client",
"version": "3.9.5",
"name": "psr/log",
"version": "1.0.2",
"source": {
"type": "git",
"url": "https://github.com/sendgrid/php-http-client.git",
"reference": "dc5cc8d7f06ee94f634a856d39b88ccfc31a2f9c"
"url": "https://github.com/php-fig/log.git",
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sendgrid/php-http-client/zipball/dc5cc8d7f06ee94f634a856d39b88ccfc31a2f9c",
"reference": "dc5cc8d7f06ee94f634a856d39b88ccfc31a2f9c",
"url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Log\\": "Psr/Log/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interface for logging libraries",
"homepage": "https://github.com/php-fig/log",
"keywords": [
"log",
"psr",
"psr-3"
],
"time": "2016-10-10T12:19:37+00:00"
},
{
"name": "robmorgan/phinx",
"version": "0.10.3",
"source": {
"type": "git",
"url": "https://github.com/cakephp/phinx.git",
"reference": "25c5197af1b49fb1a4029fe943858a9e63b3c335"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/cakephp/phinx/zipball/25c5197af1b49fb1a4029fe943858a9e63b3c335",
"reference": "25c5197af1b49fb1a4029fe943858a9e63b3c335",
"shasum": ""
},
"require": {
"cakephp/collection": "^3.6",
"cakephp/database": "^3.6",
"php": ">=5.6",
"symfony/config": "^2.8|^3.0|^4.0",
"symfony/console": "^2.8|^3.0|^4.0",
"symfony/yaml": "^2.8|^3.0|^4.0"
},
"require-dev": {
"cakephp/cakephp-codesniffer": "^3.0",
"phpunit/phpunit": ">=5.7",
"sebastian/comparator": ">=1.2.3"
},
"bin": [
"bin/phinx"
],
"type": "library",
"autoload": {
"psr-4": {
"Phinx\\": "src/Phinx/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Woody Gilk",
"email": "woody.gilk@gmail.com",
"homepage": "http://shadowhand.me",
"role": "Developer"
},
{
"name": "Rob Morgan",
"email": "robbym@gmail.com",
"homepage": "https://robmorgan.id.au",
"role": "Lead Developer"
},
{
"name": "Richard Quadling",
"email": "rquadling@gmail.com",
"role": "Developer"
},
{
"name": "CakePHP Community",
"homepage": "https://github.com/cakephp/phinx/graphs/contributors"
}
],
"description": "Phinx makes it ridiculously easy to manage the database migrations for your PHP app.",
"homepage": "https://phinx.org",
"keywords": [
"database",
"database migrations",
"db",
"migrations",
"phinx"
],
"time": "2018-06-22T12:02:01+00:00"
},
{
"name": "sendgrid/php-http-client",
"version": "3.9.6",
"source": {
"type": "git",
"url": "https://github.com/sendgrid/php-http-client.git",
"reference": "e9a04d949ee2d19938ab83dc100933a3b41a8ec7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sendgrid/php-http-client/zipball/e9a04d949ee2d19938ab83dc100933a3b41a8ec7",
"reference": "e9a04d949ee2d19938ab83dc100933a3b41a8ec7",
"shasum": ""
},
"require": {
@@ -212,7 +624,7 @@
"rest",
"sendgrid"
],
"time": "2018-03-27T01:24:17+00:00"
"time": "2018-04-10T18:06:08+00:00"
},
{
"name": "sendgrid/sendgrid",
@@ -259,6 +671,418 @@
"sendgrid"
],
"time": "2017-06-30T04:48:44+00:00"
},
{
"name": "symfony/config",
"version": "v3.4.12",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
"reference": "1fffdeb349ff36a25184e5564c25289b1dbfc402"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/config/zipball/1fffdeb349ff36a25184e5564c25289b1dbfc402",
"reference": "1fffdeb349ff36a25184e5564c25289b1dbfc402",
"shasum": ""
},
"require": {
"php": "^5.5.9|>=7.0.8",
"symfony/filesystem": "~2.8|~3.0|~4.0",
"symfony/polyfill-ctype": "~1.8"
},
"conflict": {
"symfony/dependency-injection": "<3.3",
"symfony/finder": "<3.3"
},
"require-dev": {
"symfony/dependency-injection": "~3.3|~4.0",
"symfony/event-dispatcher": "~3.3|~4.0",
"symfony/finder": "~3.3|~4.0",
"symfony/yaml": "~3.0|~4.0"
},
"suggest": {
"symfony/yaml": "To use the yaml reference dumper"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.4-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Config\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Config Component",
"homepage": "https://symfony.com",
"time": "2018-06-19T14:02:58+00:00"
},
{
"name": "symfony/console",
"version": "v3.4.12",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "1b97071a26d028c9bd4588264e101e14f6e7cd00"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/1b97071a26d028c9bd4588264e101e14f6e7cd00",
"reference": "1b97071a26d028c9bd4588264e101e14f6e7cd00",
"shasum": ""
},
"require": {
"php": "^5.5.9|>=7.0.8",
"symfony/debug": "~2.8|~3.0|~4.0",
"symfony/polyfill-mbstring": "~1.0"
},
"conflict": {
"symfony/dependency-injection": "<3.4",
"symfony/process": "<3.3"
},
"require-dev": {
"psr/log": "~1.0",
"symfony/config": "~3.3|~4.0",
"symfony/dependency-injection": "~3.4|~4.0",
"symfony/event-dispatcher": "~2.8|~3.0|~4.0",
"symfony/lock": "~3.4|~4.0",
"symfony/process": "~3.3|~4.0"
},
"suggest": {
"psr/log-implementation": "For using the console logger",
"symfony/event-dispatcher": "",
"symfony/lock": "",
"symfony/process": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.4-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Console\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
"time": "2018-05-23T05:02:55+00:00"
},
{
"name": "symfony/debug",
"version": "v3.4.12",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
"reference": "47e6788c5b151cf0cfdf3329116bf33800632d75"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/debug/zipball/47e6788c5b151cf0cfdf3329116bf33800632d75",
"reference": "47e6788c5b151cf0cfdf3329116bf33800632d75",
"shasum": ""
},
"require": {
"php": "^5.5.9|>=7.0.8",
"psr/log": "~1.0"
},
"conflict": {
"symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2"
},
"require-dev": {
"symfony/http-kernel": "~2.8|~3.0|~4.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.4-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Debug\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Debug Component",
"homepage": "https://symfony.com",
"time": "2018-06-25T11:10:40+00:00"
},
{
"name": "symfony/filesystem",
"version": "v3.4.12",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
"reference": "8a721a5f2553c6c3482b1c5b22ed60fe94dd63ed"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/8a721a5f2553c6c3482b1c5b22ed60fe94dd63ed",
"reference": "8a721a5f2553c6c3482b1c5b22ed60fe94dd63ed",
"shasum": ""
},
"require": {
"php": "^5.5.9|>=7.0.8",
"symfony/polyfill-ctype": "~1.8"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.4-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Filesystem\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
"time": "2018-06-21T11:10:19+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.8.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/7cc359f1b7b80fc25ed7796be7d96adc9b354bae",
"reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.8-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Ctype\\": ""
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
},
{
"name": "Gert de Pagter",
"email": "BackEndTea@gmail.com"
}
],
"description": "Symfony polyfill for ctype functions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"ctype",
"polyfill",
"portable"
],
"time": "2018-04-30T19:57:29+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.8.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "3296adf6a6454a050679cde90f95350ad604b171"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171",
"reference": "3296adf6a6454a050679cde90f95350ad604b171",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"suggest": {
"ext-mbstring": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.8-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Mbstring\\": ""
},
"files": [
"bootstrap.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for the Mbstring extension",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"mbstring",
"polyfill",
"portable",
"shim"
],
"time": "2018-04-26T10:06:28+00:00"
},
{
"name": "symfony/yaml",
"version": "v3.4.12",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "c5010cc1692ce1fa328b1fb666961eb3d4a85bb0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/c5010cc1692ce1fa328b1fb666961eb3d4a85bb0",
"reference": "c5010cc1692ce1fa328b1fb666961eb3d4a85bb0",
"shasum": ""
},
"require": {
"php": "^5.5.9|>=7.0.8",
"symfony/polyfill-ctype": "~1.8"
},
"conflict": {
"symfony/console": "<3.4"
},
"require-dev": {
"symfony/console": "~3.4|~4.0"
},
"suggest": {
"symfony/console": "For validating YAML files using the lint command"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.4-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Yaml\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
"time": "2018-05-03T23:18:14+00:00"
}
],
"packages-dev": [],

View File

@@ -156,7 +156,6 @@ if (!defined('WIAAS_URL')){
getenv('WIAAS_URL') ? define('WIAAS_URL', $_ENV['WIAAS_URL']) : define('WIAAS_URL', 'http://localhost:8000');
}
const WIAAS_URL = APPLICATION_MODE === 'PROD' ? 'http://localhost:8000' : 'http://localhost:8000';
const WORKING_DAYS_KEY = 'you@gmail.com';
const JWT_API_SECRET_KEY = 'W11A$_AP1_S3CR3T';
const JWT_ALGORITHM ='HS512';

View File

@@ -0,0 +1,41 @@
<?php
use Phinx\Migration\AbstractMigration;
class AddBillingInfoToOrderMigration extends AbstractMigration
{
/**
* Change Method.
*
* Write your reversible migrations using this method.
*
* More information on writing migrations is available here:
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
*
* The following commands can be used in this method and Phinx will
* automatically reverse them when rolling back:
*
* createTable
* renameTable
* addColumn
* addCustomColumn
* renameColumn
* addIndex
* addForeignKey
*
* Any other distructive changes will result in an error when trying to
* rollback the migration.
*
* Remember to call "create()" or "update()" and NOT "save()" when working
* with the Table class.
*/
public function change()
{
$ordersTable = $this->table('orders');
$ordersTable->addColumn('billingFirstName', 'string', ['limit' => 100, 'null' => true, 'after'=>'billingAddress'])
->addColumn('billingLastName', 'string', ['limit'=>100, 'null'=> true, 'after'=>'billingFirstName'])
->addColumn('billingMail', 'string', ['limit'=>300, 'null' => true, 'after'=>'billingLastName'])
->save();
}
}

View File

@@ -0,0 +1,47 @@
<?php
use Phinx\Migration\AbstractMigration;
class AddPersonalInfoToDeliveryAddressAndOrder extends AbstractMigration
{
/**
* Change Method.
*
* Write your reversible migrations using this method.
*
* More information on writing migrations is available here:
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
*
* The following commands can be used in this method and Phinx will
* automatically reverse them when rolling back:
*
* createTable
* renameTable
* addColumn
* addCustomColumn
* renameColumn
* addIndex
* addForeignKey
*
* Any other distructive changes will result in an error when trying to
* rollback the migration.
*
* Remember to call "create()" or "update()" and NOT "save()" when working
* with the Table class.
*/
public function change()
{
$deliveryAddressesTable = $this->table('delivery_addresses');
$deliveryAddressesTable->addColumn('firstName', 'string', ['limit' => 100, 'null' => true, 'after'=>'idUser'])
->addColumn('lastName', 'string', ['limit'=>100, 'null'=> true, 'after'=>'firstName'])
->addColumn('deliveryMail', 'string', ['limit'=>300, 'null' => true, 'after'=>'lastName'])
->save();
$ordersTable = $this->table('orders');
$ordersTable->addColumn('deliveryFirstName', 'string', ['limit' => 100, 'null' => true, 'after'=>'deliveryAddress'])
->addColumn('deliveryLastName', 'string', ['limit'=>100, 'null'=> true, 'after'=>'deliveryFirstName'])
->addColumn('deliveryMail', 'string', ['limit'=>300, 'null' => true, 'after'=>'deliveryLastName'])
->save();
}
}

41
api-wiaas/phinx.php Normal file
View File

@@ -0,0 +1,41 @@
<?php
return
[
'paths' => [
'migrations' => '%%PHINX_CONFIG_DIR%%/db/migrations',
'seeds' => '%%PHINX_CONFIG_DIR%%/db/seeds'
],
'environments' => [
'default_migration_table' => 'phinxlog',
'default_database' => 'development',
'production' => [
'adapter' => 'mysql',
'host' => $_ENV['PROD_DB_HOST'],
'name' => $_ENV['PROD_DB_NAME'],
'user' => $_ENV['PROD_DB_USER'],
'pass' => $_ENV['PROD_DB_PASS'],
'port' => $_ENV['PROD_DB_PORT'],
'charset' => 'utf8',
],
'development' => [
'adapter' => 'mysql',
'host' => $_ENV['DEV_DB_HOST'],
'name' => $_ENV['DEV_DB_NAME'],
'user' => $_ENV['DEV_DB_USER'],
'pass' => $_ENV['DEV_DB_PASS'],
'port' => $_ENV['DEV_DB_PORT'],
'charset' => 'utf8',
],
'testing' => [
'adapter' => 'mysql',
'host' => $_ENV['TEST_DB_HOST'],
'name' => $_ENV['TEST_DB_NAME'],
'user' => $_ENV['TEST_DB_USER'],
'pass' => $_ENV['TEST_DB_PASS'],
'port' => $_ENV['TEST_DB_PORT'],
'charset' => 'utf8',
]
],
'version_order' => 'creation'
];

View File

@@ -36,7 +36,7 @@
ng-model="files"
ngf-drag-over-class="'dragover'"
ngf-select="uploadFile($file)"
ngf-pattern="'.pdf,.docx,.doc,.xlsx,.xls,.odt,.ods'"
ngf-pattern="'.pdf,.docx,.doc,.xlsx,.xls,.odt,.ods,.zip'"
ngf-max-size="20MB"
class="drop-box">{{'documents.headers.SELECT_DOCUMENT' | translate}}</div>
</form>

View File

@@ -31,6 +31,10 @@ class OrdersModel{
'o.idCustomerInstance' => 'idCustomerInstance',
'rclc.IdCustomer' => 'idCustomer',
'cust.name' => 'customer',
'o.billingFirstName' => 'billingFirstName',
'o.billingLastName' => 'billingLastName',
'o.billingMail' => 'billingMail',
'o.billingAddress' => 'billingAddress',
'rclc.idCommercialLead' => 'idCommercialLead',
'cl.name' => 'commercialLead',
'IFNULL(b.name, \'\')' => 'assignedTo',
@@ -55,6 +59,10 @@ class OrdersModel{
'rclc.idCommercialLead' => 'idCommercialLead',
'cl.name' => 'commercialLead',
'o.orderDate' => 'orderDate',
'o.billingFirstName' => 'billingFirstName',
'o.billingLastName' => 'billingLastName',
'o.billingMail' => 'billingMail',
'o.billingAddress' => 'billingAddress',
'o.estimatedDeliveryDate' => 'estimatedDeliveryDate',
'\'\'' => 'orderItems',
'SUM(rop.packageFixedPrice)' => 'orderTotalPrice',
@@ -75,6 +83,10 @@ class OrdersModel{
'o.idCustomerInstance' => 'idCustomerInstance',
'rclc.IdCustomer' => 'idCustomer',
'cust.name' => 'customer',
'o.billingFirstName' => 'billingFirstName',
'o.billingLastName' => 'billingLastName',
'o.billingMail' => 'billingMail',
'o.billingAddress' => 'billingAddress',
'o.orderDate' => 'orderDate',
'o.estimatedDeliveryDate' => 'estimatedDeliveryDate',
'\'\'' => 'orderItems',
@@ -225,6 +237,10 @@ class OrdersModel{
'o.idCustomerInstance' => 'idCustomerInstance',
'rclc.IdCustomer' => 'idCustomer',
'cust.name' => 'customer',
'o.billingFirstName' => 'billingFirstName',
'o.billingLastName' => 'billingLastName',
'o.billingMail' => 'billingMail',
'o.billingAddress' => 'billingAddress',
'rclc.idCommercialLead' => 'idCommercialLead',
'cl.name' => 'commercialLead',
'o.orderDate' => 'orderDate',
@@ -250,6 +266,10 @@ class OrdersModel{
'rclc.idCommercialLead' => 'idCommercialLead',
'cl.name' => 'commercialLead',
'o.orderDate' => 'orderDate',
'o.billingFirstName' => 'billingFirstName',
'o.billingLastName' => 'billingLastName',
'o.billingMail' => 'billingMail',
'o.billingAddress' => 'billingAddress',
'o.estimatedDeliveryDate' => 'estimatedDeliveryDate',
'o.deliveryDate' => 'deliveryDate',
'MAX(rop.endOfLife)' => 'endOfLife',
@@ -272,6 +292,10 @@ class OrdersModel{
'o.idCustomerInstance' => 'idCustomerInstance',
'rclc.IdCustomer' => 'idCustomer',
'cust.name' => 'customer',
'o.billingFirstName' => 'billingFirstName',
'o.billingLastName' => 'billingLastName',
'o.billingMail' => 'billingMail',
'o.billingAddress' => 'billingAddress',
'o.orderDate' => 'orderDate',
'o.estimatedDeliveryDate' => 'estimatedDeliveryDate',
'o.deliveryDate' => 'deliveryDate',

View File

@@ -38,7 +38,7 @@
ng-model="files"
ngf-drag-over-class="'dragover'"
ngf-select="uploadFile($file)"
ngf-pattern="'.pdf,.docx,.doc,.xlsx,.xls,.odt,.ods,.png,.jpg,.jpeg'"
ngf-pattern="'.pdf,.docx,.doc,.xlsx,.xls,.odt,.ods,.png,.jpg,.jpeg,.zip'"
ngf-max-size="20MB"
class="drop-box">{{'orders.headers.SELECT_DOCUMENT' | translate}}</div>
</div>

View File

@@ -52,7 +52,7 @@
ng-model="files"
ngf-drag-over-class="'dragover'"
ngf-select="uploadFile($file)"
ngf-pattern="'.pdf,.docx,.doc,.xlsx,.xls,.odt,.ods,.png,.jpg,.jpeg'"
ngf-pattern="'.pdf,.docx,.doc,.xlsx,.xls,.odt,.ods,.png,.jpg,.jpeg,.zip'"
ngf-max-size="20MB"
class="drop-box">{{'orders.headers.SELECT_INSTALL_DOCUMENT' | translate}}</div>
</form>

View File

@@ -21,7 +21,7 @@
ng-model="files"
ngf-drag-over-class="'dragover'"
ngf-select="uploadFile($file)"
ngf-pattern="'.pdf,.docx,.doc,.xlsx,.xls,.odt,.ods,.png,.jpg,.jpeg'"
ngf-pattern="'.pdf,.docx,.doc,.xlsx,.xls,.odt,.ods,.png,.jpg,.jpeg,.zip'"
ngf-max-size="20MB"
class="drop-box">{{'orders.headers.SELECT_INSTALL_DOCUMENT' | translate}}</div>
</form>

View File

@@ -9,4 +9,16 @@
<div class="order-details-label">{{'orders.tables.headers.mail' | translate}}:</div>
<div class="order-details-info">{{data.customerMail}}</div>
<div class="order-details-label">{{'orders.tables.headers.billingFirstName' | translate}}:</div>
<div class="order-details-info">{{data.billingFirstName}}</div>
<div class="order-details-label">{{'orders.tables.headers.billingLastName' | translate}}:</div>
<div class="order-details-info">{{data.billingLastName}}</div>
<div class="order-details-label">{{'orders.tables.headers.billingMail' | translate}}:</div>
<div class="order-details-info">{{data.billingMail}}</div>
<div class="order-details-label">{{'orders.tables.headers.billingAddress' | translate}}:</div>
<div class="order-details-info">{{data.billingAddress}}</div>
</div>

View File

@@ -21,7 +21,7 @@
ng-model="files"
ngf-drag-over-class="'dragover'"
ngf-select="uploadFile($file)"
ngf-pattern="'.pdf,.docx,.doc,.xlsx,.xls,.odt,.ods,.jpg,.png,.jpeg'"
ngf-pattern="'.pdf,.docx,.doc,.xlsx,.xls,.odt,.ods,.jpg,.png,.jpeg,.zip'"
ngf-max-size="20MB"
class="drop-box">{{'orders.headers.SELECT_ACCEPT_DOCUMENT' | translate}}</div>
</form>

View File

@@ -15,7 +15,7 @@
ng-model="files"
ngf-drag-over-class="'dragover'"
ngf-select="uploadFile($file, supplier.idSupplier)"
ngf-pattern="'.pdf,.docx,.doc,.xlsx,.xls,.odt,.ods'"
ngf-pattern="'.pdf,.docx,.doc,.xlsx,.xls,.odt,.ods,.zip'"
ngf-max-size="20MB"
class="drop-box">{{'orders.headers.SELECT_CONFIG_DOCUMENT' | translate}}</div>
</form>

View File

@@ -41,7 +41,7 @@
ng-model="files"
ngf-drag-over-class="'dragover'"
ngf-select="uploadFile($file, document.idDocument)"
ngf-pattern="'.pdf,.docx,.doc,.xlsx,.xls,.odt,.ods'"
ngf-pattern="'.pdf,.docx,.doc,.xlsx,.xls,.odt,.ods,.zip'"
ngf-max-size="20MB"
class="drop-box">{{'orders.headers.SELECT_QUESTIONAIRE' | translate}}</div>
</form>

View File

@@ -203,7 +203,7 @@ class Prices{
$data['productsPrices'][$row['productType']]['recurringPrice'] += $totalUnitCost;
$data['productsPrices'][$row['productType']]['recurringVatPrice'] += $totalVatCost;
} else {
if(!isset($data['productsPrices'][$row['productType']]['recurringPrice'])) {
if(!isset($data['productsPrices'][$row['productType']]['fixedPrice'])) {
$data['productsPrices'][$row['productType']]['fixedPrice'] = 0;
$data['productsPrices'][$row['productType']]['fixedVatPrice'] = 0;
}

View File

@@ -73,7 +73,7 @@
ng-model="files"
ngf-drag-over-class="'dragover'"
ngf-select="uploadFile($file, document.idPackage, 'questionnaire')"
ngf-pattern="'.pdf,.docx,.doc,.xlsx,.xls,.odt,.ods'"
ngf-pattern="'.pdf,.docx,.doc,.xlsx,.xls,.odt,.ods,.zip'"
ngf-max-size="20MB"
class="drop-box">{{'shop.labels.SELECT_QUESTIONAIRE' | translate}}</div>
</form>
@@ -113,7 +113,7 @@
ng-model="files"
ngf-drag-over-class="'dragover'"
ngf-select="uploadFile($file, document.idPackage, 'agreement')"
ngf-pattern="'.pdf,.docx,.doc,.xlsx,.xls,.odt,.ods,.png,.jpg,.jpeg'"
ngf-pattern="'.pdf,.docx,.doc,.xlsx,.xls,.odt,.ods,.png,.jpg,.jpeg,.zip'"
ngf-max-size="20MB"
class="drop-box">{{'shop.labels.SELECT_AGREEMENT' | translate}}</div>
</form>

View File

@@ -40,7 +40,7 @@
ng-model="files"
ngf-drag-over-class="'dragover'"
ngf-select="uploadFile($file)"
ngf-pattern="'.pdf,.docx,.doc,.xlsx,.xls,.odt,.ods,.png,.jpg,.jpeg'"
ngf-pattern="'.pdf,.docx,.doc,.xlsx,.xls,.odt,.ods,.png,.jpg,.jpeg,.zip'"
ngf-max-size="20MB"
class="drop-box">Select Document</div>
</div>

View File

@@ -864,7 +864,11 @@
"uploadFile" : "Upload files for order package",
"idProject" : "Id project",
"projectName" : "Project name",
"isAvailable" : "Is available"
"isAvailable" : "Is available",
"billingFirstName" : "Billing first name",
"billingLastName" : "Billing last name",
"billingMail" : "Invoice mail",
"billingAddress" : "Billing address"
},
"extra" : {
"NOT_ASSIGNED" : "Unassigned",

View File

@@ -273,7 +273,7 @@
$idCustomerInstance = $database->escapeValue($idCustomerInstance);
$quantity = $database->escapeValue($quantity);
if($database->invalidNumber('QUANTITY', $quantity, 1, 100)){
if($database->invalidNumber('QUANTITY', $quantity, 1, 65000)){
$err_mes = [
'code' => 'error',
'message' => 'INVALID_QUANTITY'
@@ -1207,6 +1207,12 @@
$concatenatedDeliveryAddress = $deliveryInfo['detailedAddress'].", ".$deliveryInfo['city'].", $countryName, ".$deliveryInfo['zipCode'];
$billingCountryDetails = $this->getCountryDetailsById($billingInfo['idCountrySelected'])[0];
$concatenatedBillingAddress = $billingInfo['detailedAddress'].", ".$billingInfo['city'].", ".$billingCountryDetails['countryName'].", ".$billingInfo['zipCode'];
$deliveryFirstName = $deliveryInfo['firstName'];
$deliveryLastName = $deliveryInfo['lastName'];
$deliveryMail = $deliveryInfo['deliveryMail'];
$billingFirstName = $billingInfo['firstName'];
$billingLastName = $billingInfo['lastName'];
$billingMail = $billingInfo['invoiceMail'];
$projectNumber = $countryCode . $orderNumber;
$orderDate = $today->format('Y-m-d H:m:s');
@@ -1219,7 +1225,7 @@
$sql = "
INSERT INTO ".TABLES['orders']."
(idCustomerInstance, orderNumber, orderDate, reference, tender, projectNumber, deliveryAddress, billingAddress, idTerms, idOrderType, idProject)
(idCustomerInstance, orderNumber, orderDate, reference, tender, projectNumber, deliveryAddress, deliveryFirstName, deliveryLastName, deliveryMail, billingAddress, billingFirstName, billingLastName, billingMail, idTerms, idOrderType, idProject)
VALUES (
$idCustomerInstance,
'".$orderNumber."',
@@ -1228,7 +1234,13 @@
'".$tender."',
'".$projectNumber."',
'".$concatenatedDeliveryAddress."',
'".$deliveryFirstName."',
'".$deliveryLastName."',
'".$deliveryMail."',
'".$concatenatedBillingAddress."',
'".$billingFirstName."',
'".$billingLastName."',
'".$billingMail."',
'".$terms['idTemrs']."',
'".$orderType."',
".$idProject."

View File

@@ -9,6 +9,9 @@ class AddressHelper{
$sqlDelivery = "SELECT
da.id,
da.firstName as firstName,
da.lastName as lastName,
da.deliveryMail as deliveryMail,
da.detailedAddress AS detailedAddress,
da.city AS city,
da.zip AS zipCode,
@@ -187,6 +190,23 @@ class AddressHelper{
$data['messages'][] = $checkMessage;
}
if($type === 'profileAddress'){
if(isset($info->deliveryMail) && !empty($info->deliveryMail)) {
$checkMessage = $database->invalidLength('deliveryMail', $info->deliveryMail, 300);
if($checkMessage){
$data['messages'][] = $checkMessage;
}
if(!filter_var($info->deliveryMail, FILTER_VALIDATE_EMAIL)){
$data['messages'][] = [
'code' => 'error',
'message' => 'INVALID_DELIVERY_MAIL'
];
}
}
}
if($type === 'billingAddress'){
if(isset($info->invoiceMail) && !empty($info->invoiceMail)) {
$checkMessage = $database->invalidLength('invoiceMail', $info->invoiceMail, 300);
@@ -245,14 +265,20 @@ class AddressHelper{
$idAddress = isset($profileAddress->id) ? $profileAddress->id : 'null';
$sql = "INSERT INTO ".TABLES['delivery_addresses']." (id, idUser, idCountry, city, detailedAddress, zip)
$sql = "INSERT INTO ".TABLES['delivery_addresses']." (id, idUser, firstName, lastName, deliveryMail, idCountry, city, detailedAddress, zip)
VALUES(".$idAddress.",
".$idUser.",
'".$profileAddress->firstName."',
'".$profileAddress->lastName."',
'".$profileAddress->deliveryMail."',
".$profileAddress->idCountrySelected.",
'".$profileAddress->city."',
'".$profileAddress->detailedAddress."',
'".$profileAddress->zipCode."')
ON DUPLICATE KEY UPDATE
firstName= VALUES(firstName),
lastName= VALUES(lastName),
deliveryMail= VALUES(deliveryMail),
idCountry= VALUES(idCountry),
city= VALUES(city),
detailedAddress=VALUES(detailedAddress),

View File

@@ -115,6 +115,10 @@ class OrdersModel{
'o.idCustomerInstance' => 'idCustomerInstance',
'rclc.IdCustomer' => 'idCustomer',
'cust.name' => 'customer',
'o.billingFirstName' => 'billingFirstName',
'o.billingLastName' => 'billingLastName',
'o.billingMail' => 'billingMail',
'o.billingAddress' => 'billingAddress',
'rclc.idCommercialLead' => 'idCommercialLead',
'cl.name' => 'commercialLead',
'IFNULL(b.name, \'\')' => 'assignedTo',
@@ -139,6 +143,10 @@ class OrdersModel{
'rclc.idCommercialLead' => 'idCommercialLead',
'uc.id' => 'idCustomerUser',
'cust.name' => 'customerName',
'o.billingFirstName' => 'billingFirstName',
'o.billingLastName' => 'billingLastName',
'o.billingMail' => 'billingMail',
'o.billingAddress' => 'billingAddress',
'cust.phone' => 'phone',
'uc.mail' => 'mail',
'cl.contactName' => 'clContactName',
@@ -164,6 +172,10 @@ class OrdersModel{
'o.idCustomerInstance' => 'idCustomerInstance',
'rclc.IdCustomer' => 'idCustomer',
'cust.name' => 'customer',
'o.billingFirstName' => 'billingFirstName',
'o.billingLastName' => 'billingLastName',
'o.billingMail' => 'billingMail',
'o.billingAddress' => 'billingAddress',
'o.orderDate' => 'orderDate',
'o.estimatedDeliveryDate' => 'estimatedDeliveryDate',
'\'\'' => 'orderItems',
@@ -318,6 +330,10 @@ class OrdersModel{
'o.idCustomerInstance' => 'idCustomerInstance',
'rclc.IdCustomer' => 'idCustomer',
'cust.name' => 'customer',
'o.billingFirstName' => 'billingFirstName',
'o.billingLastName' => 'billingLastName',
'o.billingMail' => 'billingMail',
'o.billingAddress' => 'billingAddress',
'rclc.idCommercialLead' => 'idCommercialLead',
'cl.name' => 'commercialLead',
'o.orderDate' => 'orderDate',
@@ -344,6 +360,10 @@ class OrdersModel{
'rclc.idCommercialLead' => 'idCommercialLead',
'uc.id' => 'idCustomerUser',
'cust.name' => 'customerName',
'o.billingFirstName' => 'billingFirstName',
'o.billingLastName' => 'billingLastName',
'o.billingMail' => 'billingMail',
'o.billingAddress' => 'billingAddress',
'cust.phone' => 'phone',
'uc.mail' => 'mail',
'cl.name' => 'clName',
@@ -371,6 +391,10 @@ class OrdersModel{
'o.idCustomerInstance' => 'idCustomerInstance',
'rclc.IdCustomer' => 'idCustomer',
'cust.name' => 'customer',
'o.billingFirstName' => 'billingFirstName',
'o.billingLastName' => 'billingLastName',
'o.billingMail' => 'billingMail',
'o.billingAddress' => 'billingAddress',
'o.orderDate' => 'orderDate',
'o.estimatedDeliveryDate' => 'estimatedDeliveryDate',
'o.deliveryDate' => 'deliveryDate',
@@ -761,6 +785,10 @@ class OrdersModel{
o.orderNumber,
DATE_FORMAT(o.orderDate, '%D %b, %y') as orderDate,
o.estimatedDeliveryDate,
o.billingFirstName,
o.billingLastName,
o.billingMail,
o.billingAddress,
o.status,
o.reference,
o.tender,

View File

@@ -65,7 +65,7 @@ export const cartMessages = {
QUANTITY_UPDATED: "Quantity has been updated for the package!",
INVALID_PACKAGE_FOR_REMOVE: "This package is not available in your cart! In case this error persists contact Co-Market!",
PACKAGE_REMOVED_FROM_CART: "The package has been removed from the cart!",
INVALID_QUANTITY: "The quantity can be a number between 1 and 100!",
INVALID_QUANTITY: "The quantity can be a number between 1 and 65000!",
CART_EMPTY: "You must have at least one package in the cart!",
NO_DELIVERY_ADDRESS: "No delivery address was added! Please fill the necessary info",
INCOMPLETE_DELIVERY_ADDRESS: "Incomplete delivery address. Please review!",
@@ -162,7 +162,8 @@ export const cartTexts = {
SERVICES: 'Services',
ACTIONS: 'Actions',
PROJECT: 'Project',
INVOICE_MAIL: 'Invoice mail'
INVOICE_MAIL: 'Invoice mail',
DELIVERY_MAIL: 'Delivery mail'
},
buttons: {
YES: 'Yes',

View File

@@ -161,7 +161,11 @@ export const orderTexts = {
INSTALLATION_DATE: 'Installation date',
INSTALLATION_NOT_REQUIRED:'Installation is not required for this package',
PRELIMINARY_INSTALLATION_DATE_LABEL: 'Preliminary installation date',
PROJECT: 'Project'
PROJECT: 'Project',
BILLING_FIRST_NAME: 'Billing first name',
BILLING_LAST_NAME: 'Billing last name',
BILLING_MAIL: 'Invoice mail',
BILLING_ADDRESS: 'Billing address'
},
buttons: {
ACCEPT_INSTALLATION: 'I agree',

View File

@@ -35,7 +35,8 @@ export const profileTexts = {
FIRST_NAME: 'First Name',
LAST_NAME: 'Last Name',
DELEGATE: 'Attention',
INVOICE_MAIL: 'Invoice Mail'
INVOICE_MAIL: 'Invoice Mail',
DELIVERY_MAIL: 'Delivery Mail'
},
buttons: {
SAVE: 'Save',

View File

@@ -123,7 +123,7 @@ class CartCustomerDetailsContainer extends Component {
checkIfInfoCompleted() {
const {delivery, billing} = this.state;
const isDeliveryAddressCompleted = Object.keys(delivery).length ? Object.keys(delivery).every(delivKey => {
return delivery[delivKey] !== '';
return delivery[delivKey] !== ''|| delivKey === 'firstName' || delivKey === 'lastName' || delivKey === 'deliveryMail';;
}) : false;
const isBillingAddressCompleted = Object.keys(billing).length ? Object.keys(billing).every(billingKey => {
return billing[billingKey] !== '' || billingKey === 'firstName' || billingKey === 'lastName' || billingKey === 'invoiceMail';

View File

@@ -94,6 +94,18 @@ class CartReviewOrderContainer extends Component {
</Row>
<div>
<h4>{cartTexts.labels.DELIVERY_ADDRESS}</h4>
<Row className="cart-customer-main-info-row">
<Col md="4">{cartTexts.labels.FIRST_NAME}</Col>
<Col md="4" id="review-address-first-name">{customerDetails.delivery.firstName || '-'}</Col>
</Row>
<Row className="cart-customer-main-info-row">
<Col md="4">{cartTexts.labels.LAST_NAME}</Col>
<Col md="4" id="review-delivery-last-name">{customerDetails.delivery.lastName || '-'}</Col>
</Row>
<Row className="cart-customer-main-info-row">
<Col md="4">{cartTexts.labels.DELIVERY_MAIL}</Col>
<Col md="4" id="review-delivery-mail">{customerDetails.delivery.deliveryMail || '-'}</Col>
</Row>
<Row className="cart-customer-main-info-row">
<Col md="4">{cartTexts.labels.ADDRESS}</Col>
<Col md="4"id="review-delivery-address">{customerDetails.delivery.detailedAddress}</Col>

View File

@@ -34,7 +34,7 @@ class CartItem extends Component {
}
isQuantityValid(quantity) {
return quantity > 0 && quantity <= 100;
return quantity > 0 && quantity <= 65000;
}
updateQuantity(cartItem, quantity) {

View File

@@ -65,6 +65,16 @@ class OrderInfo extends Component {
<span>{orderInfo.commercialLead}</span>
</Col>
<Col xl="2">
<div className="subtitle"><h6>{orderTexts.labels.BILLING_FIRST_NAME}:</h6></div>
<span>{orderInfo.billingFirstName || '-'}</span>
<div className="subtitle"><h6>{orderTexts.labels.BILLING_LAST_NAME}:</h6></div>
<span>{orderInfo.billingLastName || '-'}</span>
<div className="subtitle"><h6>{orderTexts.labels.BILLING_MAIL}:</h6></div>
<span>{orderInfo.billingMail || '-'}</span>
<div className="subtitle"><h6>{orderTexts.labels.BILLING_ADDRESS}:</h6></div>
<span>{orderInfo.billingAddress || '-'}</span>
</Col>
<Col xl="2">
<div>
<div className="subtitle"><h6>{orderTexts.labels.REFERENCE}:</h6></div>

View File

@@ -41,6 +41,7 @@ class AddEditBillingAddress extends Component {
<FormGroup>
<Label for="address-first-name">{profileTexts.labels.FIRST_NAME}</Label>
<Input value={firstName}
autoComplete="nope"
onChange={this.handleChange}
type="text"
name="firstName"
@@ -51,6 +52,7 @@ class AddEditBillingAddress extends Component {
<FormGroup>
<Label for="address-last-name">{profileTexts.labels.LAST_NAME}</Label>
<Input value={lastName}
autoComplete="nope"
onChange={this.handleChange}
type="text"
name="lastName"
@@ -61,6 +63,7 @@ class AddEditBillingAddress extends Component {
<FormGroup>
<Label for="address-invoice-mail">{profileTexts.labels.INVOICE_MAIL}</Label>
<Input value={invoiceMail}
autoComplete="nope"
onChange={this.handleChange}
type="text"
name="invoiceMail"
@@ -73,6 +76,7 @@ class AddEditBillingAddress extends Component {
<Label for="address-country">{profileTexts.labels.ADDRESS_COUNTRY}<span className="required-icon">*</span></Label>
<Input value={idCountrySelected}
type="select"
autoComplete="nope"
onChange={this.handleChange}
name="idCountrySelected"
id="address-country"
@@ -88,6 +92,7 @@ class AddEditBillingAddress extends Component {
<FormGroup>
<Label for="address-city">{profileTexts.labels.ADDRESS_CITY}<span className="required-icon">*</span></Label>
<Input value={city}
autoComplete="nope"
onChange={this.handleChange}
type="text"
name="city"
@@ -98,6 +103,7 @@ class AddEditBillingAddress extends Component {
<FormGroup>
<Label for="address-details">{profileTexts.labels.ADDRESS_DETAILS}<span className="required-icon">*</span></Label>
<Input value={detailedAddress}
autoComplete="nope"
onChange={this.handleChange}
type="textarea"
name="detailedAddress"
@@ -108,6 +114,7 @@ class AddEditBillingAddress extends Component {
<FormGroup>
<Label for="address-zip">{profileTexts.labels.ADDRESS_ZIP}<span className="required-icon">*</span></Label>
<Input value={zipCode}
autoComplete="nope"
onChange={this.handleChange}
type="text"
name="zipCode"

View File

@@ -12,7 +12,10 @@ class AddEditProfileAddress extends Component {
idCountrySelected: address.idCountrySelected || this.props.params.countries[0].idCountry,
city: address.city || '',
detailedAddress: address.detailedAddress || '',
zipCode: address.zipCode || ''
zipCode: address.zipCode || '',
firstName: address.firstName || '',
lastName: address.lastName || '',
deliveryMail: address.deliveryMail || ''
};
this.props.params.onAddressChange(this.state);
@@ -30,16 +33,52 @@ class AddEditProfileAddress extends Component {
}
render() {
const {idCountrySelected, city, detailedAddress, zipCode} = this.state;
const {idCountrySelected, city, detailedAddress, zipCode, firstName, lastName, deliveryMail} = this.state;
const {countries} = this.props.params;
return (
<div className="address-add-edit-content">
<Form className="address-edit-content">
<h5>{profileTexts.labels.DELEGATE}</h5>
<FormGroup>
<Label for="address-first-name">{profileTexts.labels.FIRST_NAME}</Label>
<Input value={firstName}
autoComplete="nope"
onChange={this.handleChange}
type="text"
name="firstName"
id="address-first-name"
placeholder={profileTexts.labels.FIRST_NAME} />
</FormGroup>
<FormGroup>
<Label for="address-last-name">{profileTexts.labels.LAST_NAME}</Label>
<Input value={lastName}
autoComplete="nope"
onChange={this.handleChange}
type="text"
name="lastName"
id="address-last-name"
placeholder={profileTexts.labels.LAST_NAME} />
</FormGroup>
<FormGroup>
<Label for="address-delivery-mail">{profileTexts.labels.DELIVERY_MAIL}</Label>
<Input value={deliveryMail}
autoComplete="nope"
onChange={this.handleChange}
type="text"
name="deliveryMail"
id="address-delivery-mail"
placeholder={profileTexts.labels.DELIVERY_MAIL} />
</FormGroup>
<h5>{profileTexts.labels.BILLING_ADDRESSES}</h5>
<FormGroup>
<Label for="address-country">{profileTexts.labels.ADDRESS_COUNTRY}<span className="required-icon">*</span></Label>
<Input value={idCountrySelected}
type="select"
autoComplete="nope"
onChange={this.handleChange}
name="idCountrySelected"
id="address-country"
@@ -56,6 +95,7 @@ class AddEditProfileAddress extends Component {
<Label for="address-city">{profileTexts.labels.ADDRESS_CITY}<span className="required-icon">*</span></Label>
<Input value={city}
onChange={this.handleChange}
autoComplete="nope"
type="text"
name="city"
id="address-city"
@@ -65,6 +105,7 @@ class AddEditProfileAddress extends Component {
<FormGroup>
<Label for="address-details">{profileTexts.labels.ADDRESS_DETAILS}<span className="required-icon">*</span></Label>
<Input value={detailedAddress}
autoComplete="nope"
onChange={this.handleChange}
type="textarea"
name="detailedAddress"
@@ -75,6 +116,7 @@ class AddEditProfileAddress extends Component {
<FormGroup>
<Label for="address-zip">{profileTexts.labels.ADDRESS_ZIP}<span className="required-icon">*</span></Label>
<Input value={zipCode}
autoComplete="nope"
onChange={this.handleChange}
type="text"
name="zipCode"

12
docker/php/.htaccess Normal file
View File

@@ -0,0 +1,12 @@
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.html [L]
</IfModule>

13
docker/php/startup.sh Normal file
View File

@@ -0,0 +1,13 @@
#!/bin/sh
#migrate DB
cd /var/www/html/api-wiaas
while ! mysqladmin ping -h"db" --silent; do
sleep 1
done
echo "Ready...."
vendor/bin/phinx migrate -e development
#start image
exec apache2-foreground

View File

@@ -1,10 +1,38 @@
FROM php:7.0-apache
#for frontend config
ENV REACT_APP_TEST_URL=http://localhost:8000/api-wiaas \
REACT_APP_PROD_URL=http://localhost:8000/api-wiaas \
REACT_APP_DEV_URL=http://legacy.wiaas.saburly.com/api-wiaas
RUN apt-get update && apt-get install -y git unzip gnupg
#for api-wiaas config
ENV WIAAS_URL=http://legacy.wiaas.saburly.com
ENV DB_SERVER=db \
DB_NAME=ricoh_dash \
DB_USER=developer \
DB_PASS=developer
#for phinx config
ENV DEV_DB_HOST=db \
DEV_DB_NAME=ricoh_dash \
DEV_DB_USER=developer \
DEV_DB_PASS=developer \
DEV_DB_PORT=3306
ENV PROD_DB_HOST=db \
PROD_DB_NAME=ricoh_dash \
PROD_DB_USER=developer \
PROD_DB_PASS=developer \
DEV_DB_PORT=3306
ENV TEST_DB_HOST=db \
TEST_DB_NAME=ricoh_dash \
TEST_DB_USER=developer \
TEST_DB_PASS=developer \
DEV_DB_PORT=3306
RUN apt-get update && apt-get install -y git unzip gnupg mysql-client
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get install -y nodejs
@@ -13,8 +41,9 @@ RUN a2enmod rewrite
COPY docker/php/apache2.conf /etc/apache2/
COPY docker/php/composer.phar /usr/local/bin/composer
COPY docker/php/startup.sh /init-scripts/
RUN chmod 755 /usr/local/bin/composer
RUN chmod 755 /usr/local/bin/composer && chmod +x /init-scripts/startup.sh
COPY api-wiaas /home/wiaas/api-wiaas
COPY client-wiaas /home/wiaas/client-wiaas
@@ -29,3 +58,9 @@ WORKDIR /home/wiaas/client-wiaas
RUN npm rebuild node-sass --force
RUN npm install && npm run build
RUN cp -r build/* /var/www/html/
COPY docker/php/.htaccess /var/www/html/
RUN chown -R www-data:www-data /var/www/html
CMD /init-scripts/startup.sh