From 654395a175981555f7b8c7d7ca0881fc60567b2b Mon Sep 17 00:00:00 2001 From: Jay Makwana Date: Tue, 19 May 2020 07:50:58 +0000 Subject: [PATCH] Add steps for update app --- app/Http/Controllers/UpdateController.php | 2 +- ...018_11_02_133956_create_expenses_table.php | 2 - resources/assets/js/plugins/ar.json | 13 +- resources/assets/js/plugins/de.json | 12 +- resources/assets/js/plugins/en.json | 13 +- resources/assets/js/plugins/es.json | 13 +- resources/assets/js/plugins/fr.json | 12 +- resources/assets/js/plugins/it.json | 13 +- resources/assets/js/plugins/pt-br.json | 13 +- .../assets/js/views/settings/UpdateApp.vue | 220 ++++++++++++++---- resources/assets/sass/pages/settings.scss | 78 +++++++ 11 files changed, 319 insertions(+), 72 deletions(-) diff --git a/app/Http/Controllers/UpdateController.php b/app/Http/Controllers/UpdateController.php index 65e98926..2b75d837 100644 --- a/app/Http/Controllers/UpdateController.php +++ b/app/Http/Controllers/UpdateController.php @@ -43,7 +43,7 @@ class UpdateController extends Controller return response()->json([ 'success' => false, 'error' => $e->getMessage() - ]); + ], 500); } } diff --git a/database/migrations/2018_11_02_133956_create_expenses_table.php b/database/migrations/2018_11_02_133956_create_expenses_table.php index a0e745a5..25912644 100644 --- a/database/migrations/2018_11_02_133956_create_expenses_table.php +++ b/database/migrations/2018_11_02_133956_create_expenses_table.php @@ -23,8 +23,6 @@ class CreateExpensesTable extends Migration $table->foreign('expense_category_id')->references('id')->on('expense_categories')->onDelete('cascade'); $table->integer('company_id')->unsigned()->nullable(); $table->foreign('company_id')->references('id')->on('companies')->onDelete('cascade'); - $table->integer('user_id')->unsigned()->nullable(); - $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); $table->timestamps(); }); } diff --git a/resources/assets/js/plugins/ar.json b/resources/assets/js/plugins/ar.json index 9307f192..38237085 100644 --- a/resources/assets/js/plugins/ar.json +++ b/resources/assets/js/plugins/ar.json @@ -62,14 +62,14 @@ "four_zero_four": "404", "you_got_lost": "عفواً! يبدو أنك قد تهت!", "go_home": "عودة إلى الرئيسية", - "setting_updated": "تم تحديث الإعدادات بنجاح", "select_state": "اختر الولاية/المنطقة", "select_country": "اختر الدولة", "select_city": "اختر المدينة", "street_1": "عنوان الشارع 1", "street_2": "عنوان الشارع 2", - "action_failed": "فشلت العملية" + "action_failed": "فشلت العملية", + "retry": "أعد المحاولة" }, "dashboard": { "select_year": "اختر السنة", @@ -752,7 +752,14 @@ "progress_text": "سوف يستغرق التحديث بضع دقائق. يرجى عدم تحديث الشاشة أو إغلاق النافذة قبل انتهاء التحديث", "update_success": "تم تحديث النظام! يرجى الانتظار حتى يتم إعادة تحميل نافذة المتصفح تلقائيًا.", "latest_message": "لا يوجد تحديثات متوفرة! لديك حالياً أحدث نسخة.", - "current_version": "النسخة الحالية" + "current_version": "النسخة الحالية", + "download_zip_file": "تنزيل ملف ZIP", + "unzipping_package": "حزمة فك الضغط", + "copying_files": "نسخ الملفات", + "running_migrations": "إدارة عمليات الترحيل", + "finishing_update": "تحديث التشطيب", + "update_failed": "فشل التحديث", + "update_failed_text": "آسف! فشل التحديث الخاص بك في: {step} خطوة" } }, "wizard": { diff --git a/resources/assets/js/plugins/de.json b/resources/assets/js/plugins/de.json index 8c972ff4..1c9fc869 100644 --- a/resources/assets/js/plugins/de.json +++ b/resources/assets/js/plugins/de.json @@ -76,7 +76,8 @@ "select_city": "Stadt wählen", "street_1": "Straße", "street_2": "Zusatz Strasse", - "action_failed": "Aktion fehlgeschlagen" + "action_failed": "Aktion fehlgeschlagen", + "retry": "Wiederholen" }, "dashboard": { "select_year": "Jahr wählen", @@ -775,7 +776,14 @@ "progress_text": "Es dauert nur ein paar Minuten. Bitte aktualisieren Sie den Bildschirm nicht und schließen Sie das Fenster nicht, bevor das Update abgeschlossen ist.", "update_success": "App wurde aktualisiert! Bitte warten Sie, während Ihr Browserfenster automatisch neu geladen wird.", "latest_message": "Kein Update verfügbar! Du bist auf der neuesten Version.", - "current_version": "Aktuelle Version" + "current_version": "Aktuelle Version", + "download_zip_file": "Laden Sie die ZIP-Datei herunter", + "unzipping_package": "Paket entpacken", + "copying_files": "Dateien kopieren", + "running_migrations": "Ausführen von Migrationen", + "finishing_update": "Update beenden", + "update_failed": "Update fehlgeschlagen", + "update_failed_text": "Es tut uns leid! Ihr Update ist am folgenden Schritt fehlgeschlagen: {step}" } }, "wizard": { diff --git a/resources/assets/js/plugins/en.json b/resources/assets/js/plugins/en.json index b0ec3b99..93ca0834 100644 --- a/resources/assets/js/plugins/en.json +++ b/resources/assets/js/plugins/en.json @@ -70,14 +70,14 @@ "go_home": "Go Home", "test_mail_conf": "Test Mail Configuration", "send_mail_successfully": "Mail sent successfully", - "setting_updated": "Setting updated successfully", "select_state": "Select state", "select_country": "Select Country", "select_city": "Select City", "street_1": "Street 1", "street_2": "Street 2", - "action_failed": "Action Failed" + "action_failed": "Action Failed", + "retry": "Retry" }, "dashboard": { "select_year": "Select year", @@ -787,7 +787,14 @@ "progress_text": "It will just take a few minutes. Please do not refresh the screen or close the window before the update finishes", "update_success": "App has been updated! Please wait while your browser window gets reloaded automatically.", "latest_message": "No update available! You are on the latest version.", - "current_version": "Current Version" + "current_version": "Current Version", + "download_zip_file": "Download ZIP file", + "unzipping_package": "Unzipping Package", + "copying_files": "Copying Files", + "running_migrations": "Running Migrations", + "finishing_update": "Finishing Update", + "update_failed": "Update Failed", + "update_failed_text": "Sorry! Your update failed on : {step} step" } }, "wizard": { diff --git a/resources/assets/js/plugins/es.json b/resources/assets/js/plugins/es.json index 6cbf75a7..8b9014b6 100644 --- a/resources/assets/js/plugins/es.json +++ b/resources/assets/js/plugins/es.json @@ -62,14 +62,14 @@ "four_zero_four": "404", "you_got_lost": "Whoops! ¡Te perdiste!", "go_home": "Volver al Inicio", - "setting_updated": "Configuración actualizada con éxito", "select_state": "Seleccionar estado", "select_country": "Seleccionar país", "select_city": "Seleccionar ciudad", "street_1": "Calle 1", "street_2": "Calle 2", - "action_failed": "Accion Fallida" + "action_failed": "Accion Fallida", + "retry": "Procesar de nuevo" }, "dashboard": { "select_year": "Seleccionar año", @@ -751,7 +751,14 @@ "progress_text": "Solo tomará unos minutos. No actualice la pantalla ni cierre la ventana antes de que finalice la actualización.", "update_success": "¡La aplicación ha sido actualizada! Espere mientras la ventana de su navegador se vuelve a cargar automáticamente.", "latest_message": "¡Actualización no disponible! Estás en la última versión.", - "current_version": "Versión actual" + "current_version": "Versión actual", + "download_zip_file": "Descargar archivo ZIP", + "unzipping_package": "Descomprimir paquete", + "copying_files": "Copiando documentos", + "running_migrations": "Ejecutar migraciones", + "finishing_update": "Actualización final", + "update_failed": "Actualización fallida", + "update_failed_text": "¡Lo siento! Su actualización falló el: {step} paso" } }, "wizard": { diff --git a/resources/assets/js/plugins/fr.json b/resources/assets/js/plugins/fr.json index 210e8b0e..2b3b9fb7 100644 --- a/resources/assets/js/plugins/fr.json +++ b/resources/assets/js/plugins/fr.json @@ -76,7 +76,8 @@ "ascending": "Ascendant", "descending": "Descendant", "subject": "matière", - "message": "Message" + "message": "Message", + "retry": "Réessayez" }, "dashboard": { "select_year": "Sélectionnez l'année", @@ -794,7 +795,14 @@ "progress_text": "Cela ne prendra que quelques minutes. S'il vous plaît ne pas actualiser l'écran ou fermer la fenêtre avant la fin de la mise à jour", "update_success": "App a été mis à jour! Veuillez patienter pendant le rechargement automatique de la fenêtre de votre navigateur.", "latest_message": "Pas de mise a jour disponible! Vous êtes sur la dernière version.", - "current_version": "Version actuelle" + "current_version": "Version actuelle", + "download_zip_file": "Télécharger le fichier ZIP", + "unzipping_package": "Dézipper le package", + "copying_files": "Copie de fichiers", + "running_migrations": "Exécution de migrations", + "finishing_update": "Mise à jour de finition", + "update_failed": "Mise à jour a échoué", + "update_failed_text": "Désolé! Votre mise à jour a échoué à: {step} étape" } }, "wizard": { diff --git a/resources/assets/js/plugins/it.json b/resources/assets/js/plugins/it.json index 8c288e51..57565458 100644 --- a/resources/assets/js/plugins/it.json +++ b/resources/assets/js/plugins/it.json @@ -71,14 +71,14 @@ "go_home": "Vai alla Home", "test_mail_conf": "Configurazione della mail di test", "send_mail_successfully": "Mail inviata con successo", - "setting_updated": "Configurazioni aggiornate con successo", "select_state": "Seleziona lo Stato", "select_country": "Seleziona Paese", "select_city": "Seleziona Città", "street_1": "Indirizzo 1", "street_2": "Indirizzo 2", - "action_failed": "Errore" + "action_failed": "Errore", + "retry": "Retry" }, "dashboard": { "select_year": "Seleziona anno", @@ -786,7 +786,14 @@ "progress_text": "Sarà necessario qualche minuto. Per favore non aggiornare la pagina e non chiudere la finestra prima che l'aggiornamento sia completato", "update_success": "L'App è aggiornata! Attendi che la pagina venga ricaricata automaticamente.", "latest_message": "Nessun aggiornamneto disponibile! Sei già alla versione più recente.", - "current_version": "Versione corrente" + "current_version": "Versione corrente", + "download_zip_file": "Scarica il file ZIP", + "unzipping_package": "Pacchetto di decompressione", + "copying_files": "Copia dei file", + "running_migrations": "Esecuzione delle migrazioni", + "finishing_update": "Aggiornamento di finitura", + "update_failed": "Aggiornamento non riuscito", + "update_failed_text": "Scusate! L'aggiornamento non è riuscito il: passaggio {step}" } }, "wizard": { diff --git a/resources/assets/js/plugins/pt-br.json b/resources/assets/js/plugins/pt-br.json index 6e8b05ee..84a35617 100644 --- a/resources/assets/js/plugins/pt-br.json +++ b/resources/assets/js/plugins/pt-br.json @@ -62,14 +62,14 @@ "four_zero_four": "404", "you_got_lost": "Ops! Se perdeu!", "go_home": "Ir para Home", - "setting_updated": "Configuração atualizada com sucesso", "select_state": "Selecione Estado", "select_country": "Selecionar pais", "select_city": "Selecionar cidade", "street_1": "Rua 1", "street_2": "Rua # 2", - "action_failed": "Ação: Falhou" + "action_failed": "Ação: Falhou", + "retry": "Atualização falhou" }, "dashboard": { "select_year": "Selecione Ano", @@ -751,7 +751,14 @@ "progress_text": "Levará apenas alguns minutos. Não atualize a tela ou feche a janela antes que a atualização seja concluída", "update_success": "O aplicativo foi atualizado! Aguarde enquanto a janela do navegador é recarregada automaticamente.", "latest_message": "Nenhuma atualização disponível! Você está na versão mais recente.", - "current_version": "Versão Atual" + "current_version": "Versão Atual", + "download_zip_file": "Baixar arquivo ZIP", + "unzipping_package": "Descompactando o pacote", + "copying_files": "Copiando arquivos", + "running_migrations": "Executando migrações", + "finishing_update": "Atualização de acabamento", + "update_failed": "Atualização falhou", + "update_failed_text": "Desculpa! Sua atualização falhou em: {step} step" } }, "wizard": { diff --git a/resources/assets/js/views/settings/UpdateApp.vue b/resources/assets/js/views/settings/UpdateApp.vue index f485f4af..96763a77 100644 --- a/resources/assets/js/views/settings/UpdateApp.vue +++ b/resources/assets/js/views/settings/UpdateApp.vue @@ -1,33 +1,76 @@