You've already forked openaccounting-web
mirror of
https://github.com/openaccounting/oa-web.git
synced 2025-12-09 00:51:01 +13:00
update /orgs/new
This commit is contained in:
@@ -33,6 +33,14 @@
|
||||
<label for="precision">Decimal Places</label>
|
||||
<input formControlName="precision" type="text" class="form-control" id="precision" placeholder="Decimal Places">
|
||||
</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">
|
||||
<label for="createDefaultAccounts">Create default accounts<br>(can be customized later)</label>
|
||||
<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 { AppError } from '../shared/error';
|
||||
import { Util } from '../shared/util';
|
||||
import { DateUtil } from '../shared/dateutil';
|
||||
|
||||
@Component({
|
||||
selector: 'app-neworg',
|
||||
@@ -22,16 +23,22 @@ export class NewOrgPage {
|
||||
public error: AppError;
|
||||
public joinOrgForm: FormGroup;
|
||||
public joinOrgError: AppError;
|
||||
public timezones: string[];
|
||||
public defaultTz: string;
|
||||
|
||||
constructor(
|
||||
private log: Logger,
|
||||
private orgService: OrgService,
|
||||
private fb: FormBuilder
|
||||
) {
|
||||
this.timezones = DateUtil.getTimezones();
|
||||
this.defaultTz = DateUtil.getDefaultTimezone();
|
||||
|
||||
this.form = fb.group({
|
||||
'name': ['', Validators.required],
|
||||
'currency': ['USD', Validators.required],
|
||||
'precision': [2, Validators.required],
|
||||
'timezone': [this.defaultTz, Validators.required],
|
||||
'createDefaultAccounts': [true, Validators.required]
|
||||
});
|
||||
|
||||
|
||||
@@ -46,7 +46,6 @@ export class OrgPage {
|
||||
this.timezones = DateUtil.getTimezones();
|
||||
this.defaultTz = DateUtil.getDefaultTimezone();
|
||||
|
||||
console.log('defaultTz', this.defaultTz);
|
||||
this.invites = null;
|
||||
|
||||
this.updateOrgForm = fb.group({
|
||||
|
||||
Reference in New Issue
Block a user