You've already forked openaccounting-web
forked from cybercinch/openaccounting-web
update /orgs/new
This commit is contained in:
@@ -33,6 +33,14 @@
|
|||||||
<label for="precision">Decimal Places</label>
|
<label for="precision">Decimal Places</label>
|
||||||
<input formControlName="precision" type="text" class="form-control" id="precision" placeholder="Decimal Places">
|
<input formControlName="precision" type="text" class="form-control" id="precision" placeholder="Decimal Places">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="timezone">Timezone</label>
|
||||||
|
<select class="form-control" id="timezone" formControlName="timezone">
|
||||||
|
<option *ngFor="let tz of timezones" [value]="tz">
|
||||||
|
{{tz}}
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="createDefaultAccounts">Create default accounts<br>(can be customized later)</label>
|
<label for="createDefaultAccounts">Create default accounts<br>(can be customized later)</label>
|
||||||
<input formControlName="createDefaultAccounts" id="createDefaultAccounts" type="checkbox" class="form-control" />
|
<input formControlName="createDefaultAccounts" id="createDefaultAccounts" type="checkbox" class="form-control" />
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import { OrgService } from '../core/org.service';
|
|||||||
import { Org } from '../shared/org';
|
import { Org } from '../shared/org';
|
||||||
import { AppError } from '../shared/error';
|
import { AppError } from '../shared/error';
|
||||||
import { Util } from '../shared/util';
|
import { Util } from '../shared/util';
|
||||||
|
import { DateUtil } from '../shared/dateutil';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-neworg',
|
selector: 'app-neworg',
|
||||||
@@ -22,16 +23,22 @@ export class NewOrgPage {
|
|||||||
public error: AppError;
|
public error: AppError;
|
||||||
public joinOrgForm: FormGroup;
|
public joinOrgForm: FormGroup;
|
||||||
public joinOrgError: AppError;
|
public joinOrgError: AppError;
|
||||||
|
public timezones: string[];
|
||||||
|
public defaultTz: string;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private log: Logger,
|
private log: Logger,
|
||||||
private orgService: OrgService,
|
private orgService: OrgService,
|
||||||
private fb: FormBuilder
|
private fb: FormBuilder
|
||||||
) {
|
) {
|
||||||
|
this.timezones = DateUtil.getTimezones();
|
||||||
|
this.defaultTz = DateUtil.getDefaultTimezone();
|
||||||
|
|
||||||
this.form = fb.group({
|
this.form = fb.group({
|
||||||
'name': ['', Validators.required],
|
'name': ['', Validators.required],
|
||||||
'currency': ['USD', Validators.required],
|
'currency': ['USD', Validators.required],
|
||||||
'precision': [2, Validators.required],
|
'precision': [2, Validators.required],
|
||||||
|
'timezone': [this.defaultTz, Validators.required],
|
||||||
'createDefaultAccounts': [true, Validators.required]
|
'createDefaultAccounts': [true, Validators.required]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ export class OrgPage {
|
|||||||
this.timezones = DateUtil.getTimezones();
|
this.timezones = DateUtil.getTimezones();
|
||||||
this.defaultTz = DateUtil.getDefaultTimezone();
|
this.defaultTz = DateUtil.getDefaultTimezone();
|
||||||
|
|
||||||
console.log('defaultTz', this.defaultTz);
|
|
||||||
this.invites = null;
|
this.invites = null;
|
||||||
|
|
||||||
this.updateOrgForm = fb.group({
|
this.updateOrgForm = fb.group({
|
||||||
|
|||||||
Reference in New Issue
Block a user