Skip to content

Commit

Permalink
sync from source (#3)
Browse files Browse the repository at this point in the history
* Improved error handling

* Small fix

* Fixed small bug that might occur when an expense is updated
Previoulsy a string with contents "null" is transmitted and saved to the database when updating an expense with an empty note. This fix prevents that.
Please note that this fix still needs to be compiled with npm.

* add new minor version update 3.0.1

* refactor search problem

* Change project name in composer.json

* new frontend build

* add customer in expense

* add languages

* add customer filter on index

* add user to expense

* refactor and merge backend

* IT Italian translation

* remove unused components and update eslint + prettier config

* Update fr langugage

* add listener 310

* refactor line-chart

* add missing translation

* Updated German Language

* Payments and UnitItems in doubles issue fixed...

* fix 310 update issues

* update templates

* Refactor estimate pdf template

* refactor sales customers pdf template

* refactor sales items and customer pdfs

* refactor sales customers

* Refactor Estimate templates

* refactor profit loss pdfs

* refactor expenses pdf

* refactor taxt report pdf

* refactor sales customers pdf

* Refactor Invoice and Payment templates

* refactor reports pdfs

* Fix estimate template issues

* Fix issues on invoice template

* refactor heading text in payment

* Add Resend Email Option

* Add copy pdf url option

* refactor invoice 1 style

* Customer delete label

* refactor invoice2

* fix translation issue

* add aws-sdk-php package

* refactor estimate to invoice endpoint

* refactor estimate to invoice endpoint

* reset items on selection

* fix item selection and item loader

* refactoe issues

* refactor 310 update listener

* new build

* fix migration errors

* fix updater issue

* refactor language problem

* Refactor Self Update Endpoints and Add Update Console Command

* Add steps for update app

* build 310

* new build 310

* Update readme

* add credit to akaunting

* add credit to akaunting

* refactor docker setup

* fix docker errors

* update nginx port

* refactor checkValidUrl method

* fix email layout on mobile

* build 311

* refactor due status

* give the option to persist the database to the host

* Modify php and nginx to change upload file size

* Added Serbian Latin translation. Živela Srbija!

* Added Serbian translation. Živela Srbija!

* revert docker-compose 8080 port

* Serbian language support (latin) made better

* Added last slash so it ignores everything in the folder

.gitignore's magic still eludes me it seems!

* Serbian language support (latin) made better

* Serbian language support (latin) made better

* Improved Dutch version 3.1.1

* json file

* Few typo's

* More Dutch improvements

* Last improvements

* Typo

* better intro

* refactor factories

* Better

* clone string

* confirm_delete

* Link

* Cap case

* change

* Serbian language support (latin) made better

* Serbian language support (latin) made better

* merge

* Add copy_pdf_url missing key in spanish

* Add missing key resend_invoice in the spanish

* Added Iraqi Dinar in currencies table

* build public files

* get current virsions of php and extensions

* transfer code from update controller to updater class

* add version check validation

* fix update validation toaster

* new build

* add 320 listener

* add listener to provider

* hideupdate button for version 4.0.0

* fix updater issue and run production

* add v-html for description

* new build for version230

* fix updater issue & add optimize clear cmd

* remove listener & add version320 migration

* remove optimized cmd

* remove use from EventServiceProvider

* build version 400

* fix default seeder

* restrict update if the system requirements do not match

* add ability to delete files on update

* add ability to delete file from UI

* new build 400

* update readme

* More descriptive errors

* Password reset update

* update composer file

* add cmd for app key generate

* fix layout issue

* generate unique hash ids

* fix reset password issue

* fix date range issue in reports

* fix localhost img display issue

* change notes & description column type

* remove multiple toastr call

* fix pdf extenstion issue

* replace env with config

* check system using file disk type

* fix timezone issue

* new build 4.0.1

* fix reset pass validation message and add 401 migration

* fix update-app description style

* remove delete_files validation on update

* fix translation issues & formatting

* update readme and fix crater-invoice-inc#303

* Svenska

* PDF templates fix

DomPDF font-weight problems fix

* Adapt Serbian language to 4.0.1

* Adapt Serbian language to 4.0.1

* yarn run dev

* yarn run production

* Snart klar med  översättningen

* fix isLoading issue

* Fullständig översättning till svenska

* no message

* update code for SR

* Skatt => Moms
Fixed a misspelling

* Some more changes after using the translation

* fix amount int issue

* More corrections after using the program

* no message

* no message

* no message

* fix reset-app

* update license readme

* Sync language files from crowdin

* remove change emit from BaseDatePicker

* remove unnecessary comment

* refactor date issue

* refactor template

* re-style template selection modals

* fix infinite-looping issue

* change template button and note-button styles

* build 402

* fix eslint and prettier config

* fix next number issue on estimate & invoice

* fix floating errors

* fix translations & build 403

* add 403 migration

Co-authored-by: MakerLab-Dev <[email protected]>
Co-authored-by: Lukas Müller <[email protected]>
Co-authored-by: jayvirsinh_gohil <[email protected]>
Co-authored-by: Mohit Panjwani <[email protected]>
Co-authored-by: Jay Makwana <[email protected]>
Co-authored-by: Xiaohui Lam <[email protected]>
Co-authored-by: alessandrofuda <[email protected]>
Co-authored-by: Robin Delattre <[email protected]>
Co-authored-by: Jay Makwana <[email protected]>
Co-authored-by: Emmanuel Lampe <[email protected]>
Co-authored-by: satyaprakash10 <[email protected]>
Co-authored-by: radhu587 <[email protected]>
Co-authored-by: gohil jayvirsinh <[email protected]>
Co-authored-by: Jean-Philippe Murray <[email protected]>
Co-authored-by: Stefan Azaric <[email protected]>
Co-authored-by: René Loos <[email protected]>
Co-authored-by: Loduis Madariaga Barrios <[email protected]>
Co-authored-by: Khoshbin Ali Ahmed <[email protected]>
Co-authored-by: yogesh_gohil <[email protected]>
Co-authored-by: raishvaria <[email protected]>
Co-authored-by: MakerLab-Dev <[email protected]>
Co-authored-by: Joakim Andersson <[email protected]>
Co-authored-by: edevrob <[email protected]>
  • Loading branch information
24 people authored Jan 3, 2021
1 parent b52e8b6 commit aae23d2
Show file tree
Hide file tree
Showing 995 changed files with 81,446 additions and 56,020 deletions.
8 changes: 4 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ DB_PASSWORD="crater"

BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
SESSION_DRIVER=cookie
SESSION_LIFETIME=1440

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
Expand All @@ -31,6 +32,5 @@ PUSHER_APP_ID=
PUSHER_KEY=
PUSHER_SECRET=

PROXY_OAUTH_CLIENT_ID=2
PROXY_OAUTH_CLIENT_SECRET=SECRET-GENERATED-KEY-HERE
PROXY_OAUTH_GRANT_TYPE=password
SANCTUM_STATEFUL_DOMAINS=crater.test
SESSION_DOMAIN=crater.test
9 changes: 9 additions & 0 deletions .env.testing
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,12 @@ APP_ENV=testing
APP_DEBUG=true
APP_KEY=base64:IdDlpLmYyWA9z4Ruj5st1FSYrhCR7lPOscLGCz2Jf4I=
DB_CONNECTION=sqlite

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=587
MAIL_USERNAME=ff538f0e1037f4
MAIL_PASSWORD=c04c81145fcb73
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS="[email protected]"
MAIL_FROM_NAME="John Doe"
10 changes: 0 additions & 10 deletions .eslintrc

This file was deleted.

20 changes: 20 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
root: true,
env: {
node: true,
},
extends: [
'plugin:vue/recommended',
'eslint:recommended',
'prettier/vue',
'plugin:prettier/recommended',
],
parserOptions: {
parser: 'babel-eslint',
},
plugins: ['prettier'],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
},
}
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ Homestead.yaml
.rnd
/.expo
/.vscode
docker-compose.yml
docker-compose.yaml
/docker-compose/db/data/
5 changes: 5 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"semi": false,
"singleQuote": true,
"tabWidth": 2
}
74 changes: 30 additions & 44 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,53 +1,39 @@
##### STAGE 1 #####
FROM php:7.4-fpm

FROM composer as composer
# Arguments defined in docker-compose.yml
ARG user
ARG uid

# Copy composer files from project root into composer container's working dir
COPY composer.* /app/
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
curl \
libpng-dev \
libonig-dev \
libxml2-dev \
zip \
unzip \
libzip-dev \
libmagickwand-dev

# Copy database directory for autoloader optimization
COPY database /app/database
# Clear cache
RUN apt-get clean && rm -rf /var/lib/apt/lists/*

# Run composer to build dependencies in vendor folder
RUN composer install --no-scripts --no-suggest --no-interaction --prefer-dist --optimize-autoloader
RUN pecl install imagick \
&& docker-php-ext-enable imagick

# Copy everything from project root into composer container's working dir
COPY . /app

RUN composer dump-autoload --optimize --classmap-authoritative
# Install PHP extensions
RUN docker-php-ext-install pdo_mysql mbstring zip exif pcntl bcmath gd

##### STAGE 2 #####
# Get latest Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

FROM php:7.3.12-fpm-alpine
# Create system user to run Composer and Artisan Commands
RUN useradd -G www-data,root -u $uid -d /home/$user $user
RUN mkdir -p /home/$user/.composer && \
chown -R $user:$user /home/$user

# Use the default production configuration
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
# Set working directory
WORKDIR /var/www

RUN apk add --no-cache libpng-dev libxml2-dev oniguruma-dev libzip-dev gnu-libiconv && \
docker-php-ext-install bcmath ctype json gd mbstring pdo pdo_mysql tokenizer xml zip

ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php

# Set container's working dir
WORKDIR /app

# Copy everything from project root into php container's working dir
COPY . /app

# Copy vendor folder from composer container into php container
COPY --from=composer /app/vendor /app/vendor

RUN touch database/database.sqlite && \
cp .env.example .env && \
php artisan config:cache && \
php artisan passport:keys && \
php artisan key:generate && \
chown -R www-data:www-data . && \
chmod -R 755 . && \
chmod -R 775 storage/framework/ && \
chmod -R 775 storage/logs/ && \
chmod -R 775 bootstrap/cache/

EXPOSE 9000

CMD ["php-fpm", "--nodaemonize"]
USER $user
36 changes: 0 additions & 36 deletions app/Address.php

This file was deleted.

47 changes: 0 additions & 47 deletions app/CompanySetting.php

This file was deleted.

2 changes: 1 addition & 1 deletion app/Console/Commands/CheckEstimateStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use Illuminate\Console\Command;
use Carbon\Carbon;
use Crater\Estimate;
use Crater\Models\Estimate;

class CheckEstimateStatus extends Command
{
Expand Down
2 changes: 1 addition & 1 deletion app/Console/Commands/CheckInvoiceStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use Illuminate\Console\Command;
use Carbon\Carbon;
use Crater\Invoice;
use Crater\Models\Invoice;

class CheckInvoiceStatus extends Command
{
Expand Down
30 changes: 24 additions & 6 deletions app/Console/Commands/ResetApp.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,20 @@
namespace Crater\Console\Commands;

use Illuminate\Console\Command;
use Illuminate\Console\ConfirmableTrait;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Filesystem\Filesystem;

class ResetApp extends Command
{
use ConfirmableTrait;

/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'reset:app';
protected $signature = 'reset:app {--force}';

/**
* The console command description.
Expand All @@ -39,13 +42,28 @@ public function __construct()
*/
public function handle()
{
if ($this->confirm('Do you wish to continue? This will delete your tables')) {
Artisan::call('migrate:reset --force');
if (!$this->confirmToProceed()) {
return;
}

$this->info('Running migrate:fresh');

Artisan::call('migrate:fresh --seed --force');

\Storage::disk('local')->delete('database_created');
$this->info('Seeding database');

// $file = new Filesystem;
// $file->cleanDirectory('public/storage');
Artisan::call('db:seed', ['--class' => 'DemoSeeder', '--force' => true]);

$path = base_path('.env');

if (file_exists($path)) {
file_put_contents($path, str_replace(
'APP_DEBUG=true',
'APP_DEBUG=false',
file_get_contents($path)
));
}

$this->info('App has been reset successfully');
}
}
Loading

0 comments on commit aae23d2

Please sign in to comment.