Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions app/Classes/RcnApi/Entities/InstructionTranslation.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class InstructionTranslation implements \JsonSerializable, Arrayable
'warning',
'anticipated',
'assess_and_plan',
'mitigate_risks',
'mitigate_risk',
'prepare_to_respond',
'recover'
];
Expand Down Expand Up @@ -47,11 +47,11 @@ class InstructionTranslation implements \JsonSerializable, Arrayable
public static function createFromRequest(array $array)
{
$translation = new self();
$translation->lang = $array['lang'];
$translation->webUrl = $array['webUrl'];
$translation->title = $array['title'];
$translation->description = $array['description'];
$translation->stages = new Collection($array['stages']);
$translation->lang = $array['lang'];
$translation->webUrl = $array['webUrl'];
$translation->title = $array['title'];
$translation->description = $array['description'];
$translation->stages = new Collection($array['stages']);
return $translation;
}

Expand All @@ -60,12 +60,12 @@ public static function createFromResponse(array $array)
{
$translation = new self();

$translation->id = $array['id'];
$translation->lang = $array['lang'];
$translation->webUrl = $array['webUrl'];
$translation->title = $array['title'];
$translation->description = $array['description'];
$translation->stages = new Collection($array['stages']);
$translation->id = $array['id'];
$translation->lang = $array['lang'];
$translation->webUrl = $array['webUrl'];
$translation->title = $array['title'];
$translation->description = $array['description'];
$translation->stages = new Collection($array['stages']);
$translation->createdAt = new \DateTimeImmutable($array['createdAt']);
$translation->published = $array['published'];
return $translation;
Expand Down
20 changes: 13 additions & 7 deletions app/Classes/RcnApi/Importer/BulkUploadTemplateExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,31 @@ class BulkUploadTemplateExport implements FromArray, ShouldAutoSize, WithEvents
private $nationalSociety;
private $region;
private $headings = [
'Title', 'Description', 'URL', 'Hazard', 'Urgency Level', 'Safety Message'
'Title',
'Description',
'URL',
'Hazard',
'Urgency Level',
'Safety Message'
];
private $urgencyLevels = '"Immediate,Warning,Anticipated,Assess and Plan,Mitigate Risks,Prepare to Respond,Recover"';
private $urgencyLevels = '"Immediate,Warning,Anticipated,Assess and Plan,Mitigate Risk,Prepare to Respond,Recover"';

private $eventTypesDropdown = [];

private $data;

public function __construct(string $nationalSociety, string $region,array $data, int $maxSupportingMessages)
public function __construct(string $nationalSociety, string $region, array $data, int $maxSupportingMessages)
{
$eventTypes = EventType::whereNotIn('code', ['other'])->get()->toArray();
$this->nationalSociety = $nationalSociety;
$this->eventTypesDropdown = '"' . implode(',', array_map(function ($event) {
return "{$event['name']}";
}, $eventTypes)) . '"';
return "{$event['name']}";
}, $eventTypes)) . '"';
$this->subnational = $region;
$this->data = $data;
if($maxSupportingMessages <= 0) $maxSupportingMessages = 3;
for($i = 0; $i< $maxSupportingMessages; $i++){
if ($maxSupportingMessages <= 0)
$maxSupportingMessages = 3;
for ($i = 0; $i < $maxSupportingMessages; $i++) {
$this->headings[] = 'Supporting Message ' . ($i + 1);
}

Expand Down
7 changes: 5 additions & 2 deletions resources/assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@ Vue.use(VueMoment)

Vue.use(TscGTAG)

Vue.use(GoogleAuth, { client_id: window.config.google.client_id, scopes: 'profile email openid' })
Vue.googleAuth().load()
const googleClientId = window.config?.google?.client_id
if (googleClientId) {
Vue.use(GoogleAuth, { client_id: googleClientId, scopes: 'profile email openid' })
Vue.googleAuth().load()
}

Vue.config.productionTip = false

Expand Down
4 changes: 2 additions & 2 deletions resources/assets/js/pages/content/editWhatnow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ export default {
'warning',
'anticipated',
'assess_and_plan',
'mitigate_risks',
'mitigate_risk',
'prepare_to_respond',
'recover'
],
Expand All @@ -358,7 +358,7 @@ export default {
{
value: 'disaster_risk_reduction',
text: this.$t('content.edit_whatnow.disaster_risk_reduction'),
stages: ['assess_and_plan', 'mitigate_risks', 'prepare_to_respond'],
stages: ['assess_and_plan', 'mitigate_risk', 'prepare_to_respond'],
description: this.$t('content.edit_whatnow.disaster_risk_reduction_description')
},
{
Expand Down
4 changes: 2 additions & 2 deletions resources/assets/js/pages/content/whatnowContentItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export default {
{
value: 'disaster_risk_reduction',
text: this.$t('content.edit_whatnow.disaster_risk_reduction'),
stages: ['assess_and_plan', 'mitigate_risks', 'prepare_to_respond'],
stages: ['assess_and_plan', 'mitigate_risk', 'prepare_to_respond'],
description: this.$t('content.edit_whatnow.disaster_risk_reduction_description')
},
{
Expand Down Expand Up @@ -271,7 +271,7 @@ export default {
.btn {
font-size: 14px;
}
}
}
}

.hazard-cards-container {
Expand Down
6 changes: 3 additions & 3 deletions resources/assets/js/pages/content/whatnowSummary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default {
'warning',
'anticipated',
'assess_and_plan',
'mitigate_risks',
'mitigate_risk',
'prepare_to_respond',
'recover'
],
Expand All @@ -50,7 +50,7 @@ export default {
{
value: 'disaster_risk_reduction',
text: this.$t('content.edit_whatnow.disaster_risk_reduction'),
stages: ['assess_and_plan', 'mitigate_risks', 'prepare_to_respond'],
stages: ['assess_and_plan', 'mitigate_risk', 'prepare_to_respond'],
description: this.$t('content.edit_whatnow.disaster_risk_reduction_description')
},
{
Expand Down Expand Up @@ -123,4 +123,4 @@ export default {
color: $grey;
}
}
</style>
</style>
2 changes: 1 addition & 1 deletion resources/assets/js/store/models/contentTranslation.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const createStages = (stages) => {
warning: stages.warning || [],
anticipated: stages.anticipated || [],
assess_and_plan: stages.assess_and_plan || [],
mitigate_risks: stages.mitigate_risks || [],
mitigate_risk: stages.mitigate_risk || [],
prepare_to_respond: stages.prepare_to_respond || [],
recover: stages.recover || []
}
Expand Down
4 changes: 2 additions & 2 deletions resources/lang/am.json
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@
"warning": "ማስጠንቀቂያ",
"anticipated": "በቅድሚያ የተጠበቀ",
"assess_and_plan":"ግምገማ እና እቅድ",
"mitigate_risks":"አደጋዎችን መቀነስ",
"mitigate_risks":"አደጋን መቀነስ",
"prepare_to_respond":"ለመልስ ዝግጁ ይሁኑ",
"recover": "መልሶ ማግኛት"
},
Expand Down Expand Up @@ -536,7 +536,7 @@
"recover_extra": "እነዚህ አደገኛ ሁኔታን ተከትሎ አደጋን ለመቀነስ የሚወሰዱ የመከላከያ እርምጃዎች ናቸው።",
"anticipated": "በቅድሚያ የተጠበቀ",
"assess_and_plan": "ግምገማ እና እቅድ",
"mitigate_risks": "አደጋዎችን መቀነስ",
"mitigate_risks": "አደጋን መቀነስ",
"prepare_to_respond": "ለመልስ ዝግጁ ይሁኑ",
"updated": "የተሻሻለ",
"download_icon": "ምልክቶችን ያውርዱ",
Expand Down
4 changes: 2 additions & 2 deletions resources/lang/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@
"warning": "تحذير",
"anticipated": "متوقع",
"assess_and_plan":"تقييم وتخطيط",
"mitigate_risks":"تخفيف المخاطر",
"mitigate_risks":"تخفيف المخاطرة",
"prepare_to_respond":"الاستعداد للاستجابة",
"recover": "التعافي"
},
Expand Down Expand Up @@ -560,7 +560,7 @@
"recover_extra": "اتخذ هذه الإجراءات بعد وقوع الحدث الخطير لضمان السلامة.",
"anticipated": "متوقع",
"assess_and_plan": "تقييم وتخطيط",
"mitigate_risks": "تخفيف المخاطر",
"mitigate_risks": "تخفيف المخاطرة",
"prepare_to_respond": "الاستعداد للاستجابة",
"updated": "تم التحديث",
"download_icon": "تنزيل الأيقونة",
Expand Down
4 changes: 2 additions & 2 deletions resources/lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@
"warning": "Warnung",
"anticipated": "Erwartet",
"assess_and_plan":"Bewerten und planen",
"mitigate_risks":"Risiken mindern",
"mitigate_risks":"Risiko mindern",
"prepare_to_respond":"Auf die Reaktion vorbereiten",
"recover": "Wiederherstellen"
},
Expand Down Expand Up @@ -538,7 +538,7 @@
"recover_extra": "Dies sind Schutzmaßnahmen, die zu ergreifen sind, um das Risiko nach einem gefährlichen Ereignis zu verringern.",
"anticipated": "Erwartet",
"assess_and_plan": "Bewerten und planen",
"mitigate_risks": "Risiken mindern",
"mitigate_risks": "Risiko mindern",
"prepare_to_respond": "Auf die Reaktion vorbereiten",
"updated": "aktualisiert",
"download_icon": "Icon herunterladen",
Expand Down
12 changes: 5 additions & 7 deletions resources/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@
"app_detail": "App Detail",
"all_terms": "All Terms and Conditions"
},

"documentation": {
"heading": "IFRC NS Preparedness Messages API Documentation",
"sidebar": {
Expand Down Expand Up @@ -237,7 +236,6 @@
"api_usage": "This is where you can see who is using the API and what applications are being built with it.",
"wellcome": "Welcome",
"wellcome_description": "Here you can edit and publish IFRC National Society Preparedness Messages content."

},
"languages": {
"am": "አማርኛ",
Expand Down Expand Up @@ -464,9 +462,9 @@
"immediate": "Immediate",
"warning": "Warning",
"anticipated": "Anticipated",
"assess_and_plan":"Assess and Plan",
"mitigate_risks":"Mitigate Risks",
"prepare_to_respond":"Prepare to Respond",
"assess_and_plan": "Assess and Plan",
"mitigate_risks": "Mitigate Risk",
"prepare_to_respond": "Prepare to Respond",
"recover": "Recover"
},
"content": {
Expand Down Expand Up @@ -575,7 +573,7 @@
"recover_extra": "Take these actions after the hazard event to ensure safety.",
"anticipated": "Anticipated",
"assess_and_plan": "Assess and Plan",
"mitigate_risks": "Mitigate Risks",
"mitigate_risks": "Mitigate Risk",
"prepare_to_respond": "Prepare to Respond",
"updated": "updated",
"download_icon": "Download Icon",
Expand Down Expand Up @@ -1073,4 +1071,4 @@
"draft": "Draft",
"bulkUploadDraft": "Message File Upload Draft"
}
}
}
4 changes: 2 additions & 2 deletions resources/lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@
"warning": "Advertencia",
"anticipated": "Anticipado",
"assess_and_plan": "Evaluar y Planificar",
"mitigate_risks": "Mitigar Riesgos",
"mitigate_risks": "Mitigar Riesgo",
"prepare_to_respond": "Prepararse para Responder",
"recover": "Recuperación"
},
Expand Down Expand Up @@ -560,7 +560,7 @@
"recover_extra": "Toma estas acciones después del evento de peligro para garantizar la seguridad.",
"anticipated": "Anticipado",
"assess_and_plan": "Evaluar y Planificar",
"mitigate_risks": "Mitigar Riesgos",
"mitigate_risks": "Mitigar Riesgo",
"prepare_to_respond": "Prepararse para Responder",
"updated": "actualizado",
"download_icon": "Descargar Icono",
Expand Down
4 changes: 2 additions & 2 deletions resources/lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@
"warning": "Avertissement",
"anticipated": "Anticipé",
"assess_and_plan": "Évaluer et Planifier",
"mitigate_risks": "Atténuer les Risques",
"mitigate_risks": "Atténuer le Risque",
"prepare_to_respond": "Se Préparer à Réagir",
"recover": "Rétablissement"
},
Expand Down Expand Up @@ -560,7 +560,7 @@
"recover_extra": "Prenez ces mesures après l'événement dangereux pour assurer la sécurité.",
"anticipated": "Anticipé",
"assess_and_plan": "Évaluer et Planifier",
"mitigate_risks": "Atténuer les Risques",
"mitigate_risks": "Atténuer le Risque",
"prepare_to_respond": "Se Préparer à Réagir",
"updated": "mis à jour",
"download_icon": "Télécharger l'Icône",
Expand Down
4 changes: 2 additions & 2 deletions resources/lang/ht.json
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@
"warning": "Avètisman",
"anticipated": "Antisipe",
"assess_and_plan":"Evalye epi Planifye",
"mitigate_risks":"Diminye Risk yo",
"mitigate_risks":"Diminye Risk",
"prepare_to_respond":"Prepare pou Reponn",
"recover": "Rekipere"
},
Expand Down Expand Up @@ -534,7 +534,7 @@
"recover_extra": "Sa yo se aksyon pwotektiv pran pou diminye risk aprè yon evènman danjere.\n",
"anticipated": "Antisipe",
"assess_and_plan": "Evalye epi Planifye",
"mitigate_risks": "Diminye Risk yo",
"mitigate_risks": "Diminye Risk",
"prepare_to_respond": "Prepare pou Reponn",
"updated": "Ajou",
"download_icon": "Telechaje ikòn",
Expand Down
4 changes: 2 additions & 2 deletions resources/lang/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@
"warning": "Warning",
"anticipated": "Anticipated",
"assess_and_plan":"Assess and Plan",
"mitigate_risks":"Mitigate Risks",
"mitigate_risks":"Mitigate Risk",
"prepare_to_respond":"Prepare to Respond",
"recover": "Recover"
},
Expand Down Expand Up @@ -538,7 +538,7 @@
"recover_extra": "Berikut ini adalah tindakan perlindungan yang harus dilakukan untuk mengurangi risiko setelah terjadi peristiwa berbahaya.",
"anticipated": "Anticipated",
"assess_and_plan": "Assess and Plan",
"mitigate_risks": "Mitigate Risks",
"mitigate_risks": "Mitigate Risk",
"prepare_to_respond": "Prepare to Respond",
"updated": "diperbarui",
"download_icon": "Unduh Ikon",
Expand Down
4 changes: 2 additions & 2 deletions resources/lang/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@
"warning": "Avviso",
"anticipated": "Previsto",
"assess_and_plan":"Valuta e Pianifica",
"mitigate_risks":"Mitiga i Rischi",
"mitigate_risks":"Mitiga il Rischio",
"prepare_to_respond":"Preparati a Rispondere",
"recover": "Recupera"
},
Expand Down Expand Up @@ -538,7 +538,7 @@
"recover_extra": "Queste sono le misure protettive da prendere per ridurre il rischio in seguito a un evento pericoloso.",
"anticipated": "Previsto",
"assess_and_plan": "Valuta e Pianifica",
"mitigate_risks": "Mitiga i Rischi",
"mitigate_risks": "Mitiga il Rischio",
"prepare_to_respond": "Preparati a Rispondere",
"updated": "aggiornato",
"download_icon": "Icona Download",
Expand Down
4 changes: 2 additions & 2 deletions resources/lang/my.json
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@
"warning": "သတိပေးချက်",
"anticipated": "မျှော်မှန်းထားသည်",
"assess_and_plan":"အကဲဖြတ်ပြီး စီစဉ်ပါ",
"mitigate_risks":"အန္တရာယ်များကို လျှော့ချပါ",
"mitigate_risks":"အန္တရာယ်ကို လျှော့ချပါ",
"prepare_to_respond":"တုံ့ပြန်ရန် ပြင်ဆင်ပါ",
"recover": "ပြန်လည်နာလန်ထူပါ"
},
Expand Down Expand Up @@ -535,7 +535,7 @@
"recover_extra": "ဤအရာများသည် ဘေးအန္တရာယ်ရှိသော ဖြစ်စဉ်တစ်ခု ဖြစ်ပြီးနောက် ဘေးအန္တရာယ်လျှော့ချရန် ကြိုတင်ကာကွယ်သည့် လုပ်ဆောင်ချက်များဖြစ်သည်။",
"anticipated": "မျှော်မှန်းထားသည်",
"assess_and_plan": "အကဲဖြတ်ပြီး စီစဉ်ပါ",
"mitigate_risks": "အန္တရာယ်များကို လျှော့ချပါ",
"mitigate_risks": "အန္တရာယ်ကို လျှော့ချပါ",
"prepare_to_respond": "တုံ့ပြန်ရန် ပြင်ဆင်ပါ",
"updated": "မွမ်းမံထားပြီး",
"download_icon": "ဒေါင်းလုပ်အိုင်ကွန်",
Expand Down
4 changes: 2 additions & 2 deletions resources/lang/ne.json
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@
"warning": "चेतावनी",
"anticipated": "अपेक्षित",
"assess_and_plan":"मूल्याङ्कन र योजना",
"mitigate_risks":"जोखिमहरू कम गर्नुहोस्",
"mitigate_risks":"जोखिम कम गर्नुहोस्",
"prepare_to_respond":"प्रतिक्रिया दिन तयार हुनुहोस्",
"recover": "पुनर्प्राप्त गर्नुहोस्"
},
Expand Down Expand Up @@ -535,7 +535,7 @@
"recover_extra": "खतरनाक घटना भैरहेको बेला यी सुरक्षित कार्यहरु जोखिम घटाउनको लागि अपनाउनु पर्छ ।",
"anticipated": "अपेक्षित",
"assess_and_plan": "मूल्याङ्कन र योजना",
"mitigate_risks": "जोखिमहरू कम गर्नुहोस्",
"mitigate_risks": "जोखिम कम गर्नुहोस्",
"prepare_to_respond": "प्रतिक्रिया दिन तयार हुनुहोस्",
"updated": "अध्यावधिक गरिएको",
"download_icon": "आईकन\/संकेत डाउनलोड गर्नुहोस",
Expand Down
Loading
Loading