-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #204 from maltaesousa/v1
V1
- Loading branch information
Showing
18 changed files
with
138 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,19 +65,19 @@ def handle(self, *args, **options): | |
mma.identity.phone = '+41 32 000 00 00' | ||
mma.identity.save() | ||
|
||
mka = UserModel.objects.create_user( | ||
username='mka', password='mka') | ||
mka.identity.email = 'mka[email protected]' | ||
mka.identity.first_name = 'Michaël' | ||
mka.identity.last_name = 'Kalbermatten' | ||
mka.identity.street = 'Rue de Tivoli 22' | ||
mka.identity.postcode = '2000' | ||
mka.identity.city = 'Neuchâtel' | ||
mka.identity.country = 'Suisse' | ||
mka.identity.company_name = 'Service du Registre Foncier et de la Géomatique - SITN' | ||
mka.identity.phone = '+41 32 000 00 00' | ||
mka.identity.subscribed = True | ||
mka.identity.save() | ||
mka2 = UserModel.objects.create_user( | ||
username='mka2', password='mka2') | ||
mka2.identity.email = 'mka2[email protected]' | ||
mka2.identity.first_name = 'Michaël' | ||
mka2.identity.last_name = 'Kalbermatten' | ||
mka2.identity.street = 'Rue de Tivoli 22' | ||
mka2.identity.postcode = '2000' | ||
mka2.identity.city = 'Neuchâtel' | ||
mka2.identity.country = 'Suisse' | ||
mka2.identity.company_name = 'Service du Registre Foncier et de la Géomatique - SITN' | ||
mka2.identity.phone = '+41 32 000 00 00' | ||
mka2.identity.subscribed = True | ||
mka2.identity.save() | ||
|
||
# contacts | ||
contact1 = Contact.objects.create( | ||
|
@@ -116,7 +116,7 @@ def handle(self, *args, **options): | |
belongs_to=mmi | ||
) | ||
contact3.save() | ||
contact_mka = Contact.objects.create( | ||
contact_mka2 = Contact.objects.create( | ||
first_name='Jean', | ||
last_name='Doe', | ||
email='[email protected]', | ||
|
@@ -125,9 +125,9 @@ def handle(self, *args, **options): | |
country='Suisse', | ||
company_name='Marine de Colombier', | ||
phone='+41 00 787 29 16', | ||
belongs_to=mka | ||
belongs_to=mka2 | ||
) | ||
contact_mka.save() | ||
contact_mka2.save() | ||
|
||
order_geom = Polygon(( | ||
( | ||
|
@@ -195,15 +195,15 @@ def handle(self, *args, **options): | |
date_ordered=timezone.now()) | ||
order4.save() | ||
|
||
order_mka = Order.objects.create( | ||
order_mka2 = Order.objects.create( | ||
title='Plan de situation pour enquête', | ||
description='C\'est un test', | ||
order_type=order_type_prive, | ||
client=mka, | ||
client=mka2, | ||
geom=order_geom, | ||
invoice_reference='Dossier n°545454', | ||
date_ordered=timezone.now()) | ||
order_mka.save() | ||
order_mka2.save() | ||
|
||
order_download = Order.objects.create( | ||
title='Commande prête à être téléchargée', | ||
|
@@ -241,13 +241,13 @@ def handle(self, *args, **options): | |
OrderItem.objects.create(order=order2, product=product1), | ||
OrderItem.objects.create(order=order3, product=product1, data_format=data_format), | ||
OrderItem.objects.create(order=order4, product=product2), | ||
OrderItem.objects.create(order=order_mka, product=product1, data_format=data_format) | ||
OrderItem.objects.create(order=order_mka2, product=product1, data_format=data_format) | ||
] | ||
for order_item in orderitems: | ||
order_item.set_price() | ||
order_item.save() | ||
order_item_deprecated = OrderItem.objects.create( | ||
order=order_mka, product=product_deprecated, data_format=data_format) | ||
order=order_mka2, product=product_deprecated, data_format=data_format) | ||
order_item_deprecated.set_price(price=Money(400, 'CHF'), base_fee=Money(150, 'CHF')) | ||
order_item_deprecated.price_status = OrderItem.PricingStatus.CALCULATED | ||
order_item_deprecated.save() | ||
|
@@ -274,11 +274,11 @@ def handle(self, *args, **options): | |
|
||
order4.save() | ||
|
||
order_mka.invoice_contact = contact_mka | ||
order_mka.set_price() | ||
order_mka.date_ordered = datetime.datetime(2018, 12, 1, 8, 20, 3, 0, tzinfo=datetime.timezone.utc) | ||
order_mka.status = Order.OrderStatus.ARCHIVED | ||
order_mka.save() | ||
order_mka2.invoice_contact = contact_mka2 | ||
order_mka2.set_price() | ||
order_mka2.date_ordered = datetime.datetime(2018, 12, 1, 8, 20, 3, 0, tzinfo=datetime.timezone.utc) | ||
order_mka2.status = Order.OrderStatus.ARCHIVED | ||
order_mka2.save() | ||
|
||
order_download.set_price() | ||
empty_zip_data = b'PK\x05\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{% extends "email_base_template.html" %} | ||
{% load i18n %} | ||
{% block content %} | ||
{% blocktrans %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endblocktrans %} | ||
{% blocktrans %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endblocktrans %}<br><br> | ||
|
||
{% trans "Please go to the following page and choose a new password:" %} | ||
{% trans "Please go to the following page and choose a new password:" %}<br> | ||
{% block reset_link %} | ||
{{ protocol }}://{{ domain }}/auth/reset/{{ uid }}/{{ token }} | ||
{% endblock %} | ||
{% trans 'Your username, in case you’ve forgotten:' %} {{ user.get_username }} | ||
{% endblock %}<br><br> | ||
{% trans 'Your username, in case you’ve forgotten:' %}<strong> {{ user.get_username }}</strong> | ||
{% endblock %} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 14 additions & 22 deletions
36
front/src/app/account/profile/modify-profile.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,26 @@ | ||
:host { | ||
display: flex; | ||
justify-content: center; | ||
align-content: center; | ||
margin: 10px; | ||
height: calc(100vh - 84px); | ||
height: calc(100vh - 64px); | ||
|
||
.mat-card { | ||
display: flex; | ||
flex-direction: column; | ||
min-width: 720px; | ||
|
||
.mat-card-content { | ||
display: flex; | ||
flex-direction: column; | ||
flex: 1; | ||
} | ||
margin: 10px auto; | ||
flex: 1; | ||
max-width: 960px; | ||
} | ||
|
||
ul { | ||
list-style-type: none; | ||
form { | ||
height: calc(100vh - 64px - 60px - 30px); | ||
overflow-y: auto; | ||
} | ||
|
||
form { | ||
.bottom-container { | ||
display: flex; | ||
flex-direction: column; | ||
flex: 1; | ||
} | ||
justify-content: flex-end; | ||
|
||
.action-button-container { | ||
align-self: flex-end; | ||
margin-top: auto; | ||
.mat-button { | ||
&:only-child { | ||
margin-right: auto; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
$pwd = pwd | ||
foreach ($line in Get-Content $PSScriptRoot\..\back\.env.prod) { | ||
$args = $line -split "=" | ||
If ($args[0] -And !$args[0].StartsWith("#")) { | ||
$cmd = '$env:' + $args[0].Trim('"') + '="' + $args[1].Trim('"') + '"' | ||
Invoke-Expression $cmd | ||
} | ||
} | ||
|
||
$filename = ("geoshop.backup") | ||
$dumpFile = ("{0}\{1}"-f $PSScriptRoot, $filename) | ||
|
||
$previous_PGPASSWORD = $env:PGPASSWORD | ||
$env:PGPASSWORD = $env:PGPOSTGRESPASSWORD | ||
|
||
If (Test-Path $dumpFile) { | ||
Remove-Item $dumpFile | ||
} | ||
|
||
pg_dump -U postgres -F c -n $env:PGSCHEMA -b -f $dumpFile $env:PGDATABASE | ||
|
||
If (Test-Path $dumpFile) { | ||
psql -U postgres -h localhost -d geoshop -c "DROP SCHEMA IF EXISTS old_$env:PGSCHEMA CASCADE;" | ||
psql -U postgres -h localhost -d geoshop -c "ALTER SCHEMA $env:PGSCHEMA RENAME TO old_$env:PGSCHEMA;" | ||
pg_restore -U postgres -h localhost -F c -d geoshop $dumpFile | ||
} Else { | ||
Write-Host "$(Get-Date -Format g) pg_restore has not been done" | ||
} | ||
$env:PGPASSWORD = $previous_PGPASSWORD | ||
|
||
cd $pwd |
Oops, something went wrong.